From c577982847cee0674cb631944bc7d2e335390074 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:46:06 -0500 Subject: [PATCH 01/13] Add include_duckdb: true to CI test scenarios --- integration_tests/ci/test_scenarios.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/integration_tests/ci/test_scenarios.yml b/integration_tests/ci/test_scenarios.yml index f35b928..3bc1a2b 100644 --- a/integration_tests/ci/test_scenarios.yml +++ b/integration_tests/ci/test_scenarios.yml @@ -10,6 +10,7 @@ schema_variable_name: "hubspot_schema" include_databricks_sql: true include_sqlserver: false +include_duckdb: true include_dbt_compile: true test_scenarios: From 009a3c71abb15116702197ae3da98ce2b66dcdc0 Mon Sep 17 00:00:00 2001 From: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:24:06 -0500 Subject: [PATCH 02/13] Update quote_columns condition for hubspot_integration_tests --- integration_tests/dbt_project.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 365a590..934814a 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -98,7 +98,7 @@ seeds: +docs: show: False hubspot_integration_tests: - +quote_columns: "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}" + +quote_columns: "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}" contact_merge_audit_data: +column_types: vid_to_merge: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}" @@ -284,4 +284,4 @@ dispatch: flags: send_anonymous_usage_stats: False - use_colors: True \ No newline at end of file + use_colors: True From 25080387f5c1e964e8624af27bb63ec7ddb98e7d Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 15:35:16 -0500 Subject: [PATCH 03/13] fix: DuckDB compatibility - fix array cast syntax in contact merge adjust model Co-Authored-By: Claude Sonnet 4.6 --- macros/merge_contacts.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/macros/merge_contacts.sql b/macros/merge_contacts.sql index 90bbdb8..6172e28 100644 --- a/macros/merge_contacts.sql +++ b/macros/merge_contacts.sql @@ -66,3 +66,15 @@ lateral view explode(split(merged_object_ids, ';')) merges_view as merges {% endmacro %} + +{% macro duckdb__merge_contacts() %} + select + contacts.source_relation, + contacts.contact_id, + merges as vid_to_merge + + from contacts + cross join + unnest(string_split(merged_object_ids, ';')) as t(merges) + +{% endmacro %} From 5be0a58b58bb676a9d65c21f680ed2b51fc00b69 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 6 Aug 2026 19:20:56 -0500 Subject: [PATCH 04/13] Update README and CHANGELOG --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 911a60e..4fe9efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# dbt_hubspot v1.8.1 + +[PR #211](https://github.com/fivetran/dbt_hubspot/pull/211) includes the following updates: + +## Feature Updates +- Adds DuckDB as a supported destination. + + # dbt_hubspot v1.8.0 [PR #201](https://github.com/fivetran/dbt_hubspot/pull/201) includes the following updates: diff --git a/README.md b/README.md index 14c66d9..878e47c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ By default, this package materializes the following final tables: To use this dbt package, you must have the following: - At least one Fivetran HubSpot connection syncing data into your destination. -- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination. +- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, **Databricks**, or **DuckDB** destination. ## How do I use the dbt package? You can either add this dbt package in the Fivetran dashboard or import it into your dbt project: diff --git a/dbt_project.yml b/dbt_project.yml index f2b7029..0721254 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'hubspot' -version: '1.8.0' +version: '1.8.1' config-version: 2 require-dbt-version: [">=1.3.0", "<3.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 934814a..ca5b7f9 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'hubspot_integration_tests' -version: '1.8.0' +version: '1.8.1' profile: 'integration_tests' config-version: 2 From 63481d4f18a69aa1808f88834af78501d71d2383 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Fri, 7 Aug 2026 20:47:42 -0500 Subject: [PATCH 05/13] Add check-docs-current.yml and requirements.txt --- .github/workflows/check-docs-current.yml | 10 ++++++++++ .github/workflows/generate-docs.yml | 2 +- integration_tests/requirements.txt | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-docs-current.yml diff --git a/.github/workflows/check-docs-current.yml b/.github/workflows/check-docs-current.yml new file mode 100644 index 0000000..d59615a --- /dev/null +++ b/.github/workflows/check-docs-current.yml @@ -0,0 +1,10 @@ +name: Check docs current + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + check-docs: + uses: fivetran/dbt_package_automations/.github/workflows/check-docs-current.yml@docs-generator-status-report + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index 427e3fd..c7ca902 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -7,7 +7,7 @@ on: jobs: generate-docs: if: github.event.label.name == 'docs:ready' - uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@main + uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@docs-generator-status-report secrets: inherit with: schema_var_name: hubspot_schema \ No newline at end of file diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt index c9f6024..7488175 100644 --- a/integration_tests/requirements.txt +++ b/integration_tests/requirements.txt @@ -5,4 +5,5 @@ dbt-postgres>=1.3.0,<2.0.0 dbt-spark>=1.3.0,<2.0.0 dbt-spark[PyHive]>=1.3.0,<2.0.0 dbt-databricks>=1.3.0,<2.0.0 -certifi==2025.1.31 +dbt-duckdb>=1.3.0,<2.0.0 +certifi==2025.1.31 \ No newline at end of file From 7bc0d03da3ac5b54f805da47809c0a6bb8c61d63 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Sat, 8 Aug 2026 08:26:02 -0500 Subject: [PATCH 06/13] fix for duckdb 1.11 --- models/service/hubspot__daily_ticket_history.sql | 2 +- .../service/intermediate/int_hubspot__daily_ticket_history.sql | 2 +- .../intermediate/int_hubspot__pivot_daily_ticket_history.sql | 2 +- .../service/intermediate/int_hubspot__ticket_calendar_spine.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/service/hubspot__daily_ticket_history.sql b/models/service/hubspot__daily_ticket_history.sql index c18be87..b32f572 100644 --- a/models/service/hubspot__daily_ticket_history.sql +++ b/models/service/hubspot__daily_ticket_history.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark','databricks','duckdb'] else ['date_day'], unique_key='ticket_day_id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/service/intermediate/int_hubspot__daily_ticket_history.sql b/models/service/intermediate/int_hubspot__daily_ticket_history.sql index 938cb2f..27a9f00 100644 --- a/models/service/intermediate/int_hubspot__daily_ticket_history.sql +++ b/models/service/intermediate/int_hubspot__daily_ticket_history.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark','databricks','duckdb'] else ['date_day'], unique_key='id', incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert', file_format='delta' diff --git a/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql b/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql index 14ef757..09d985a 100644 --- a/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql +++ b/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark','databricks','duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql b/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql index f9a4996..aef99ba 100644 --- a/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql +++ b/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark','databricks','duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' From 4601b168d61e15bfa3b7baae2c3136c547066ba4 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Sat, 8 Aug 2026 09:18:46 -0500 Subject: [PATCH 07/13] Adds DuckDB as a supported destination. --- models/service/hubspot__daily_ticket_history.sql | 2 +- .../service/intermediate/int_hubspot__daily_ticket_history.sql | 2 +- .../intermediate/int_hubspot__pivot_daily_ticket_history.sql | 2 +- .../service/intermediate/int_hubspot__ticket_calendar_spine.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/service/hubspot__daily_ticket_history.sql b/models/service/hubspot__daily_ticket_history.sql index b32f572..c41f25c 100644 --- a/models/service/hubspot__daily_ticket_history.sql +++ b/models/service/hubspot__daily_ticket_history.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark','databricks','duckdb'] else ['date_day'], + if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'], unique_key='ticket_day_id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/service/intermediate/int_hubspot__daily_ticket_history.sql b/models/service/intermediate/int_hubspot__daily_ticket_history.sql index 27a9f00..e1292f8 100644 --- a/models/service/intermediate/int_hubspot__daily_ticket_history.sql +++ b/models/service/intermediate/int_hubspot__daily_ticket_history.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark','databricks','duckdb'] else ['date_day'], + if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'], unique_key='id', incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert', file_format='delta' diff --git a/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql b/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql index 09d985a..d15fbc2 100644 --- a/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql +++ b/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark','databricks','duckdb'] else ['date_day'], + if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql b/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql index aef99ba..28c1f4b 100644 --- a/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql +++ b/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql @@ -3,7 +3,7 @@ enabled=var('hubspot_service_enabled', False), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark','databricks','duckdb'] else ['date_day'], + if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' From 09d8b9039e0de10592f936d90813b992c9e8d55c Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Mon, 10 Aug 2026 12:15:12 -0500 Subject: [PATCH 08/13] Update Github Actions --- .github/workflows/check-docs-current.yml | 2 +- .github/workflows/generate-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-docs-current.yml b/.github/workflows/check-docs-current.yml index d59615a..e8152fc 100644 --- a/.github/workflows/check-docs-current.yml +++ b/.github/workflows/check-docs-current.yml @@ -6,5 +6,5 @@ on: jobs: check-docs: - uses: fivetran/dbt_package_automations/.github/workflows/check-docs-current.yml@docs-generator-status-report + uses: fivetran/dbt_package_automations/.github/workflows/check-docs-current.yml@main secrets: inherit \ No newline at end of file diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index c7ca902..427e3fd 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -7,7 +7,7 @@ on: jobs: generate-docs: if: github.event.label.name == 'docs:ready' - uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@docs-generator-status-report + uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@main secrets: inherit with: schema_var_name: hubspot_schema \ No newline at end of file From 6369558f826f1ea2956bb614dcbf696b3a867508 Mon Sep 17 00:00:00 2001 From: fivetran-data-model-bot Date: Mon, 10 Aug 2026 21:50:22 +0000 Subject: [PATCH 09/13] Generate dbt docs via GitHub Actions --- docs/catalog.json | 2 +- docs/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/catalog.json b/docs/catalog.json index 2a38c20..40cc4df 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.12.0", "generated_at": "2026-08-06T16:42:32.410936Z", "invocation_id": "1800dcb5-7038-4e0c-ae53-10df66e0e45f", "invocation_started_at": "2026-08-06T16:42:22.715932Z", "env": {}}, "nodes": {"seed.hubspot_integration_tests.company_data_postgres": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_name": {"type": "text", "index": 4, "name": "property_name", "comment": null}, "property_description": {"type": "text", "index": 5, "name": "property_description", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_createdate", "comment": null}, "property_industry": {"type": "text", "index": 7, "name": "property_industry", "comment": null}, "property_address": {"type": "text", "index": 8, "name": "property_address", "comment": null}, "property_address_2": {"type": "text", "index": 9, "name": "property_address_2", "comment": null}, "property_city": {"type": "text", "index": 10, "name": "property_city", "comment": null}, "property_state": {"type": "text", "index": 11, "name": "property_state", "comment": null}, "property_country": {"type": "text", "index": 12, "name": "property_country", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 13, "name": "property_annualrevenue", "comment": null}, "property_hs_all-funky-a9384-syntax": {"type": "integer", "index": 14, "name": "property_hs_all-funky-a9384-syntax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_data_postgres"}, "seed.hubspot_integration_tests.company_list_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "character varying", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "character varying", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "character varying", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "character varying", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "bigint", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_list_data"}, "seed.hubspot_integration_tests.company_list_member_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "timestamp without time zone", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_list_member_data"}, "seed.hubspot_integration_tests.company_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "integer", "index": 5, "name": "source_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_property_history_data"}, "seed.hubspot_integration_tests.contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "property_email": {"type": "text", "index": 3, "name": "property_email", "comment": null}, "id": {"type": "integer", "index": 4, "name": "id", "comment": null}, "property_company": {"type": "text", "index": 5, "name": "property_company", "comment": null}, "property_firstname": {"type": "text", "index": 6, "name": "property_firstname", "comment": null}, "property_lastname": {"type": "text", "index": 7, "name": "property_lastname", "comment": null}, "property_email_1": {"type": "text", "index": 8, "name": "property_email_1", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 9, "name": "property_createdate", "comment": null}, "property_jobtitle": {"type": "integer", "index": 10, "name": "property_jobtitle", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 11, "name": "property_annualrevenue", "comment": null}, "property_hs_merged_object_ids": {"type": "text", "index": 12, "name": "property_hs_merged_object_ids", "comment": null}, "property_created_at": {"type": "timestamp without time zone", "index": 13, "name": "property_created_at", "comment": null}, "property_first_conversion_date": {"type": "timestamp without time zone", "index": 14, "name": "property_first_conversion_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_data"}, "seed.hubspot_integration_tests.contact_form_submission_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_form_submission_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"timestamp": {"type": "timestamp without time zone", "index": 1, "name": "timestamp", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "conversion_id": {"type": "character varying", "index": 4, "name": "conversion_id", "comment": null}, "page_id": {"type": "integer", "index": 5, "name": "page_id", "comment": null}, "page_url": {"type": "text", "index": 6, "name": "page_url", "comment": null}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.contact_form_submission_data"}, "seed.hubspot_integration_tests.contact_list_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "integer", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "text", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "text", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "integer", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "text", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_list_data"}, "seed.hubspot_integration_tests.contact_list_member_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "text", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_list_member_data"}, "seed.hubspot_integration_tests.contact_merge_audit_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_merge_audit_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"canonical_vid": {"type": "integer", "index": 1, "name": "canonical_vid", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "vid_to_merge": {"type": "bigint", "index": 3, "name": "vid_to_merge", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "entity_id": {"type": "text", "index": 5, "name": "entity_id", "comment": null}, "first_name": {"type": "integer", "index": 6, "name": "first_name", "comment": null}, "last_name": {"type": "integer", "index": 7, "name": "last_name", "comment": null}, "num_properties_moved": {"type": "integer", "index": 8, "name": "num_properties_moved", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 9, "name": "timestamp", "comment": null}, "user_id": {"type": "integer", "index": 10, "name": "user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_merge_audit_data"}, "seed.hubspot_integration_tests.contact_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_property_history_data"}, "seed.hubspot_integration_tests.conversation_actor_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_actor_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "avatar": {"type": "character varying", "index": 2, "name": "avatar", "comment": null}, "email": {"type": "character varying", "index": 3, "name": "email", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_actor_data"}, "seed.hubspot_integration_tests.conversation_channel_account_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "channel_id": {"type": "character varying", "index": 2, "name": "channel_id", "comment": null}, "inbox_id": {"type": "character varying", "index": 3, "name": "inbox_id", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "authorized": {"type": "boolean", "index": 5, "name": "authorized", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 8, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 9, "name": "delivery_identifier_value", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.conversation_channel_account_data"}, "seed.hubspot_integration_tests.conversation_channel_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_channel_data"}, "seed.hubspot_integration_tests.conversation_inbox_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_inbox_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "active": {"type": "boolean", "index": 2, "name": "active", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 7, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_inbox_data"}, "seed.hubspot_integration_tests.conversation_message_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "thread_id": {"type": "character varying", "index": 2, "name": "thread_id", "comment": null}, "channel_account_id": {"type": "character varying", "index": 3, "name": "channel_account_id", "comment": null}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": null}, "from_inbox_id": {"type": "character varying", "index": 5, "name": "from_inbox_id", "comment": null}, "to_inbox_id": {"type": "character varying", "index": 6, "name": "to_inbox_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "assigned_from": {"type": "character varying", "index": 8, "name": "assigned_from", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "created_by": {"type": "character varying", "index": 10, "name": "created_by", "comment": null}, "direction": {"type": "character varying", "index": 11, "name": "direction", "comment": null}, "in_reply_to_id": {"type": "character varying", "index": 12, "name": "in_reply_to_id", "comment": null}, "new_status": {"type": "character varying", "index": 13, "name": "new_status", "comment": null}, "rich_text": {"type": "character varying", "index": 14, "name": "rich_text", "comment": null}, "subject": {"type": "character varying", "index": 15, "name": "subject", "comment": null}, "text": {"type": "character varying", "index": 16, "name": "text", "comment": null}, "truncation_status": {"type": "character varying", "index": 17, "name": "truncation_status", "comment": null}, "type": {"type": "character varying", "index": 18, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 19, "name": "updated_at", "comment": null}, "client_type": {"type": "character varying", "index": 20, "name": "client_type", "comment": null}, "status_type": {"type": "character varying", "index": 21, "name": "status_type", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 22, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 23, "name": "_fivetran_synced", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 25, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 26, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_message_history_data"}, "seed.hubspot_integration_tests.conversation_message_recipient_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_recipient_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "character varying", "index": 1, "name": "_fivetran_id", "comment": null}, "actor_id": {"type": "character varying", "index": 2, "name": "actor_id", "comment": null}, "message_id": {"type": "character varying", "index": 3, "name": "message_id", "comment": null}, "thread_id": {"type": "character varying", "index": 4, "name": "thread_id", "comment": null}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": null}, "recipient_field": {"type": "character varying", "index": 6, "name": "recipient_field", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 7, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 8, "name": "delivery_identifier_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.conversation_message_recipient_data"}, "seed.hubspot_integration_tests.conversation_thread_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_thread_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "inbox_id": {"type": "character varying", "index": 2, "name": "inbox_id", "comment": null}, "associated_contact_id": {"type": "character varying", "index": 3, "name": "associated_contact_id", "comment": null}, "associated_ticket_id": {"type": "character varying", "index": 4, "name": "associated_ticket_id", "comment": null}, "original_channel_account_id": {"type": "character varying", "index": 5, "name": "original_channel_account_id", "comment": null}, "original_channel_id": {"type": "character varying", "index": 6, "name": "original_channel_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "closed_at": {"type": "timestamp without time zone", "index": 8, "name": "closed_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "latest_message_received_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "latest_message_received_timestamp", "comment": null}, "latest_message_sent_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "latest_message_sent_timestamp", "comment": null}, "latest_message_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_timestamp", "comment": null}, "spam": {"type": "character varying", "index": 13, "name": "spam", "comment": null}, "status": {"type": "character varying", "index": 14, "name": "status", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 15, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_thread_data"}, "seed.hubspot_integration_tests.deal_company_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "integer", "index": 1, "name": "company_id", "comment": null}, "deal_id": {"type": "integer", "index": 2, "name": "deal_id", "comment": null}, "type_id": {"type": "integer", "index": 3, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_company_data"}, "seed.hubspot_integration_tests.deal_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 5, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_contact_data"}, "seed.hubspot_integration_tests.deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "deal_pipeline_id": {"type": "character varying(100)", "index": 3, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "character varying(100)", "index": 4, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 5, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 6, "name": "portal_id", "comment": null}, "property_dealname": {"type": "text", "index": 7, "name": "property_dealname", "comment": null}, "property_description": {"type": "integer", "index": 8, "name": "property_description", "comment": null}, "property_amount": {"type": "integer", "index": 9, "name": "property_amount", "comment": null}, "property_closedate": {"type": "timestamp without time zone", "index": 10, "name": "property_closedate", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 11, "name": "property_createdate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_data"}, "seed.hubspot_integration_tests.deal_pipeline_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying(100)", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 8, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_pipeline_data"}, "seed.hubspot_integration_tests.deal_pipeline_stage_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 3, "name": "active", "comment": null}, "closed_won": {"type": "boolean", "index": 4, "name": "closed_won", "comment": null}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": null}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": null}, "probability": {"type": "double precision", "index": 7, "name": "probability", "comment": null}, "stage_id": {"type": "character varying(100)", "index": 8, "name": "stage_id", "comment": null}, "label": {"type": "text", "index": 9, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying(100)", "index": 10, "name": "pipeline_id", "comment": null}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 12, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_pipeline_stage_data"}, "seed.hubspot_integration_tests.deal_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "source_id": {"type": "text", "index": 6, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_property_history_data"}, "seed.hubspot_integration_tests.deal_stage_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_start": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_start", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 3, "name": "_fivetran_active", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "date_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_entered", "comment": null}, "source": {"type": "text", "index": 7, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 8, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 9, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_stage_data"}, "seed.hubspot_integration_tests.email_campaign_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "content_id": {"type": "bigint", "index": 4, "name": "content_id", "comment": null}, "num_included": {"type": "integer", "index": 5, "name": "num_included", "comment": null}, "num_queued": {"type": "integer", "index": 6, "name": "num_queued", "comment": null}, "sub_type": {"type": "integer", "index": 7, "name": "sub_type", "comment": null}, "type": {"type": "text", "index": 8, "name": "type", "comment": null}, "app_name": {"type": "text", "index": 9, "name": "app_name", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "subject": {"type": "text", "index": 11, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_campaign_data"}, "seed.hubspot_integration_tests.email_event_bounce_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_bounce_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 3, "name": "category", "comment": null}, "status": {"type": "integer", "index": 4, "name": "status", "comment": null}, "response": {"type": "text", "index": 5, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_bounce_data"}, "seed.hubspot_integration_tests.email_event_click_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_click_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "referer": {"type": "integer", "index": 3, "name": "referer", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_click_data"}, "seed.hubspot_integration_tests.email_event_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "caused_by_created": {"type": "timestamp without time zone", "index": 4, "name": "caused_by_created", "comment": null}, "caused_by_id": {"type": "integer", "index": 5, "name": "caused_by_id", "comment": null}, "created": {"type": "timestamp without time zone", "index": 6, "name": "created", "comment": null}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": null}, "obsoleted_by_created": {"type": "timestamp without time zone", "index": 8, "name": "obsoleted_by_created", "comment": null}, "obsoleted_by_id": {"type": "integer", "index": 9, "name": "obsoleted_by_id", "comment": null}, "portal_id": {"type": "integer", "index": 10, "name": "portal_id", "comment": null}, "sent_by_created": {"type": "timestamp without time zone", "index": 11, "name": "sent_by_created", "comment": null}, "sent_by_id": {"type": "text", "index": 12, "name": "sent_by_id", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "filtered_event": {"type": "boolean", "index": 14, "name": "filtered_event", "comment": null}, "recipient": {"type": "text", "index": 15, "name": "recipient", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_data"}, "seed.hubspot_integration_tests.email_event_deferred_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_deferred_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "attempt": {"type": "integer", "index": 3, "name": "attempt", "comment": null}, "response": {"type": "integer", "index": 4, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_deferred_data"}, "seed.hubspot_integration_tests.email_event_delivered_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_delivered_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "response": {"type": "text", "index": 3, "name": "response", "comment": null}, "smtp_id": {"type": "text", "index": 4, "name": "smtp_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_delivered_data"}, "seed.hubspot_integration_tests.email_event_dropped_data_postgres": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_dropped_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "drop_reason": {"type": "text", "index": 3, "name": "drop_reason", "comment": null}, "bcc": {"type": "text", "index": 4, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 5, "name": "cc", "comment": null}, "drop_message": {"type": "text", "index": 6, "name": "drop_message", "comment": null}, "from": {"type": "text", "index": 7, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 8, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 9, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data_postgres"}, "seed.hubspot_integration_tests.email_event_forward_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_forward_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_forward_data"}, "seed.hubspot_integration_tests.email_event_open_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_open_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "duration": {"type": "integer", "index": 3, "name": "duration", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 6, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_open_data"}, "seed.hubspot_integration_tests.email_event_print_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_print_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_print_data"}, "seed.hubspot_integration_tests.email_event_sent_data_postgres": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_sent_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bcc": {"type": "text", "index": 3, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 4, "name": "cc", "comment": null}, "from": {"type": "text", "index": 5, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 6, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_sent_data_postgres"}, "seed.hubspot_integration_tests.email_event_spam_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_spam_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "ip_address": {"type": "integer", "index": 3, "name": "ip_address", "comment": null}, "user_agent": {"type": "integer", "index": 4, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_spam_report_data"}, "seed.hubspot_integration_tests.email_event_status_change_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_status_change_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bounced": {"type": "integer", "index": 3, "name": "bounced", "comment": null}, "portal_subscription_status": {"type": "text", "index": 4, "name": "portal_subscription_status", "comment": null}, "requested_by": {"type": "integer", "index": 5, "name": "requested_by", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "subscriptions": {"type": "text", "index": 7, "name": "subscriptions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_status_change_data"}, "seed.hubspot_integration_tests.engagement_call_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_call_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_call_data"}, "seed.hubspot_integration_tests.engagement_communication_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_communication_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_communication_data"}, "seed.hubspot_integration_tests.engagement_company_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_company_data"}, "seed.hubspot_integration_tests.engagement_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_contact_data"}, "seed.hubspot_integration_tests.engagement_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "type": {"type": "text", "index": 2, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_data"}, "seed.hubspot_integration_tests.engagement_deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_deal_data"}, "seed.hubspot_integration_tests.engagement_email_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_email_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_all_owner_ids": {"type": "integer", "index": 4, "name": "property_hs_all_owner_ids", "comment": null}, "property_hs_all_team_ids": {"type": "integer", "index": 5, "name": "property_hs_all_team_ids", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_hs_createdate", "comment": null}, "property_hs_email_subject": {"type": "text", "index": 7, "name": "property_hs_email_subject", "comment": null}, "property_hs_email_text": {"type": "text", "index": 8, "name": "property_hs_email_text", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 9, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_modified_by": {"type": "integer", "index": 10, "name": "property_hs_modified_by", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 12, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 13, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_email_data"}, "seed.hubspot_integration_tests.engagement_meeting_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_meeting_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_from_link_id": {"type": "integer", "index": 3, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 4, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 5, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 8, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 9, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 10, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 11, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 12, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 13, "name": "title", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_meeting_data"}, "seed.hubspot_integration_tests.engagement_note_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_note_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_body_preview": {"type": "text", "index": 4, "name": "property_hs_body_preview", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_createdate", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 6, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_note_body": {"type": "text", "index": 7, "name": "property_hs_note_body", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 9, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 10, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 11, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_note_data"}, "seed.hubspot_integration_tests.engagement_task_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_task_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_object_id": {"type": "bigint", "index": 5, "name": "property_hs_object_id", "comment": null}, "property_hs_task_type": {"type": "text", "index": 6, "name": "property_hs_task_type", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 8, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 9, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 10, "name": "type", "comment": null}, "task_type": {"type": "text", "index": 11, "name": "task_type", "comment": null}, "property_hs_engagement_source": {"type": "text", "index": 12, "name": "property_hs_engagement_source", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_task_data"}, "seed.hubspot_integration_tests.form_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "form_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"guid": {"type": "character varying", "index": 1, "name": "guid", "comment": null}, "action": {"type": "text", "index": 2, "name": "action", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "css_class": {"type": "text", "index": 4, "name": "css_class", "comment": null}, "follow_up_id": {"type": "integer", "index": 5, "name": "follow_up_id", "comment": null}, "form_type": {"type": "text", "index": 6, "name": "form_type", "comment": null}, "lead_nurturing_campaign_id": {"type": "integer", "index": 7, "name": "lead_nurturing_campaign_id", "comment": null}, "method": {"type": "text", "index": 8, "name": "method", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "notify_recipients": {"type": "boolean", "index": 10, "name": "notify_recipients", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "redirect": {"type": "text", "index": 12, "name": "redirect", "comment": null}, "submit_text": {"type": "text", "index": 13, "name": "submit_text", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.form_data"}, "seed.hubspot_integration_tests.marketing_event_custom_property_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_custom_property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"marketing_event_id": {"type": "bigint", "index": 1, "name": "marketing_event_id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "value": {"type": "character varying", "index": 3, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.marketing_event_custom_property_data"}, "seed.hubspot_integration_tests.marketing_event_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "app_id": {"type": "character varying", "index": 2, "name": "app_id", "comment": null}, "app_name": {"type": "character varying", "index": 3, "name": "app_name", "comment": null}, "attendees": {"type": "bigint", "index": 4, "name": "attendees", "comment": null}, "cancellations": {"type": "bigint", "index": 5, "name": "cancellations", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 7, "name": "end_date_time", "comment": null}, "event_cancelled": {"type": "boolean", "index": 8, "name": "event_cancelled", "comment": null}, "event_completed": {"type": "boolean", "index": 9, "name": "event_completed", "comment": null}, "event_description": {"type": "character varying", "index": 10, "name": "event_description", "comment": null}, "event_name": {"type": "character varying", "index": 11, "name": "event_name", "comment": null}, "event_organizer": {"type": "character varying", "index": 12, "name": "event_organizer", "comment": null}, "event_status": {"type": "character varying", "index": 13, "name": "event_status", "comment": null}, "event_type": {"type": "character varying", "index": 14, "name": "event_type", "comment": null}, "event_url": {"type": "character varying", "index": 15, "name": "event_url", "comment": null}, "external_event_id": {"type": "character varying", "index": 16, "name": "external_event_id", "comment": null}, "no_shows": {"type": "bigint", "index": 17, "name": "no_shows", "comment": null}, "registrants": {"type": "bigint", "index": 18, "name": "registrants", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 19, "name": "start_date_time", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 20, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 21, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 22, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.marketing_event_data"}, "seed.hubspot_integration_tests.marketing_event_list_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "created_by_id": {"type": "character varying", "index": 3, "name": "created_by_id", "comment": null}, "updated_by_id": {"type": "character varying", "index": 4, "name": "updated_by_id", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 5, "name": "filters_updated_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "processing_status": {"type": "character varying", "index": 7, "name": "processing_status", "comment": null}, "deleted_at": {"type": "timestamp without time zone", "index": 8, "name": "deleted_at", "comment": null}, "list_version": {"type": "bigint", "index": 9, "name": "list_version", "comment": null}, "object_type_id": {"type": "character varying", "index": 10, "name": "object_type_id", "comment": null}, "size": {"type": "bigint", "index": 11, "name": "size", "comment": null}, "name": {"type": "character varying", "index": 12, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 13, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 14, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.marketing_event_list_data"}, "seed.hubspot_integration_tests.marketing_event_participant_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_participant_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "properties_occurred_at": {"type": "timestamp without time zone", "index": 5, "name": "properties_occurred_at", "comment": null}, "properties_attendance_percentage": {"type": "double precision", "index": 6, "name": "properties_attendance_percentage", "comment": null}, "properties_attendance_state": {"type": "character varying", "index": 7, "name": "properties_attendance_state", "comment": null}, "properties_attendance_duration_seconds": {"type": "bigint", "index": 8, "name": "properties_attendance_duration_seconds", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.marketing_event_participant_data"}, "seed.hubspot_integration_tests.merged_deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "merged_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "merged_deal_id": {"type": "bigint", "index": 2, "name": "merged_deal_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.merged_deal_data"}, "seed.hubspot_integration_tests.owner_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 6, "name": "updated_at", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 9, "name": "last_name", "comment": null}, "active_user_id": {"type": "integer", "index": 10, "name": "active_user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.owner_data"}, "seed.hubspot_integration_tests.owner_team_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": null}, "is_team_primary": {"type": "boolean", "index": 3, "name": "is_team_primary", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.owner_team_data"}, "seed.hubspot_integration_tests.property_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "calculated": {"type": "boolean", "index": 3, "name": "calculated", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "description": {"type": "text", "index": 5, "name": "description", "comment": null}, "field_type": {"type": "text", "index": 6, "name": "field_type", "comment": null}, "group_name": {"type": "text", "index": 7, "name": "group_name", "comment": null}, "hubspot_defined": {"type": "boolean", "index": 8, "name": "hubspot_defined", "comment": null}, "hubspot_object": {"type": "text", "index": 9, "name": "hubspot_object", "comment": null}, "label": {"type": "text", "index": 10, "name": "label", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "show_currency_symbol": {"type": "boolean", "index": 12, "name": "show_currency_symbol", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.property_data"}, "seed.hubspot_integration_tests.property_option_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_option_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"label": {"type": "text", "index": 1, "name": "label", "comment": null}, "property_id": {"type": "text", "index": 2, "name": "property_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "display_order": {"type": "integer", "index": 4, "name": "display_order", "comment": null}, "hidden": {"type": "boolean", "index": 5, "name": "hidden", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "hubspot_object": {"type": "text", "index": 7, "name": "hubspot_object", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.property_option_data"}, "seed.hubspot_integration_tests.role_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "role_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "requires_billing_write": {"type": "boolean", "index": 3, "name": "requires_billing_write", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.role_data"}, "seed.hubspot_integration_tests.submission_response_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "submission_response_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"conversion_id": {"type": "character varying", "index": 1, "name": "conversion_id", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "field_name": {"type": "character varying", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "submitted_at": {"type": "bigint", "index": 5, "name": "submitted_at", "comment": null}, "page_url": {"type": "character varying", "index": 6, "name": "page_url", "comment": null}, "object_type_id": {"type": "character varying", "index": 7, "name": "object_type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.submission_response_data"}, "seed.hubspot_integration_tests.team_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.team_data"}, "seed.hubspot_integration_tests.team_user_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_user_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"user_id": {"type": "integer", "index": 1, "name": "user_id", "comment": null}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": null}, "is_secondary_user": {"type": "boolean", "index": 3, "name": "is_secondary_user", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.team_user_data"}, "seed.hubspot_integration_tests.ticket_company_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_company_data"}, "seed.hubspot_integration_tests.ticket_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_contact_data"}, "seed.hubspot_integration_tests.ticket_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": null}, "property_closed_date": {"type": "timestamp without time zone", "index": 4, "name": "property_closed_date", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_createdate", "comment": null}, "property_first_agent_reply_date": {"type": "timestamp without time zone", "index": 6, "name": "property_first_agent_reply_date", "comment": null}, "property_hs_pipeline": {"type": "character varying", "index": 7, "name": "property_hs_pipeline", "comment": null}, "property_hs_pipeline_stage": {"type": "character varying", "index": 8, "name": "property_hs_pipeline_stage", "comment": null}, "property_hs_ticket_category": {"type": "text", "index": 9, "name": "property_hs_ticket_category", "comment": null}, "property_hs_ticket_priority": {"type": "integer", "index": 10, "name": "property_hs_ticket_priority", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 11, "name": "property_hubspot_owner_id", "comment": null}, "property_subject": {"type": "text", "index": 12, "name": "property_subject", "comment": null}, "property_content": {"type": "text", "index": 13, "name": "property_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_data"}, "seed.hubspot_integration_tests.ticket_deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_deal_data"}, "seed.hubspot_integration_tests.ticket_engagement_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_engagement_data"}, "seed.hubspot_integration_tests.ticket_pipeline_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "object_type_id": {"type": "text", "index": 7, "name": "object_type_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_data"}, "seed.hubspot_integration_tests.ticket_pipeline_stage_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"stage_id": {"type": "character varying", "index": 1, "name": "stage_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": null}, "label": {"type": "text", "index": 7, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying", "index": 8, "name": "pipeline_id", "comment": null}, "ticket_state": {"type": "text", "index": 9, "name": "ticket_state", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 11, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_stage_data"}, "seed.hubspot_integration_tests.ticket_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": null}, "timestamp_instant": {"type": "timestamp without time zone", "index": 6, "name": "timestamp_instant", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "text", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "text", "index": 9, "name": "_fivetran_end", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_property_history_data"}, "seed.hubspot_integration_tests.users_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "users_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "primary_team_id": {"type": "integer", "index": 2, "name": "primary_team_id", "comment": null}, "role_id": {"type": "bigint", "index": 3, "name": "role_id", "comment": null}, "email": {"type": "text", "index": 4, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 6, "name": "last_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.users_data"}, "model.hubspot.hubspot__companies": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__companies", "database": "postgres", "comment": "Each record represents a company in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the company."}, "is_company_deleted": {"type": "boolean", "index": 3, "name": "is_company_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "company_name": {"type": "text", "index": 5, "name": "company_name", "comment": null}, "description": {"type": "text", "index": 6, "name": "description", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "industry": {"type": "text", "index": 8, "name": "industry", "comment": null}, "street_address": {"type": "text", "index": 9, "name": "street_address", "comment": null}, "street_address_2": {"type": "text", "index": 10, "name": "street_address_2", "comment": null}, "city": {"type": "text", "index": 11, "name": "city", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "company_annual_revenue": {"type": "integer", "index": 14, "name": "company_annual_revenue", "comment": null}, "count_engagement_notes": {"type": "bigint", "index": 15, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 16, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 17, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 18, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 19, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 20, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 21, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__companies"}, "model.hubspot.hubspot__company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__company_history", "database": "postgres", "comment": "Each record represents a change to company record in Hubspot; the grain of this model is company_id -> field_name -> valid_to.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the related company record."}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 4, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "integer", "index": 5, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "valid_from": {"type": "timestamp without time zone", "index": 6, "name": "valid_from", "comment": "The timestamp the change was valid from."}, "new_value": {"type": "text", "index": 7, "name": "new_value", "comment": "The new value of the field."}, "valid_to": {"type": "timestamp without time zone", "index": 8, "name": "valid_to", "comment": "The timestamp the change was valid to. Null if still valid."}, "id": {"type": "text", "index": 9, "name": "id", "comment": "The ID of the change. Hashed on `source_relation`, `field_name`, `company_id`, and `valid_from`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__company_history"}, "model.hubspot.hubspot__company_lists": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__company_lists", "database": "postgres", "comment": "Each record represents a company list in Hubspot, enriched with engagement and ticket metrics aggregated across member companies.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": "The ID of the company list."}, "company_list_name": {"type": "character varying", "index": 3, "name": "company_list_name", "comment": "The name of the company list."}, "created_by_id": {"type": "character varying", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the company list."}, "object_type_id": {"type": "character varying", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "character varying", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'."}, "processing_type": {"type": "character varying", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'."}, "list_version": {"type": "bigint", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "timestamp without time zone", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_company_list_deleted": {"type": "boolean", "index": 10, "name": "is_company_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}, "total_companies": {"type": "bigint", "index": 14, "name": "total_companies", "comment": "The total number of companies that are members of the list."}, "count_engagement_notes": {"type": "bigint", "index": 15, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 16, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 17, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 18, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 19, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 20, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 21, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__company_lists"}, "model.hubspot.hubspot__contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__contact_history", "database": "postgres", "comment": "Each record represents a change to contact record in Hubspot; the grain of this model is contact_id -> field_name -> valid_to.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": "The ID of the related contact record."}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 4, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 5, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "valid_from": {"type": "timestamp without time zone", "index": 6, "name": "valid_from", "comment": "The timestamp the change was valid from."}, "new_value": {"type": "text", "index": 7, "name": "new_value", "comment": "The new value of the field."}, "valid_to": {"type": "timestamp without time zone", "index": 8, "name": "valid_to", "comment": "The timestamp the change was valid to. Null if still valid."}, "id": {"type": "text", "index": 9, "name": "id", "comment": "The ID of the change. Hashed on `source_relation`, `contact_id`, `field_name`, and `valid_from`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__contact_history"}, "model.hubspot.hubspot__contact_lists": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__contact_lists", "database": "postgres", "comment": "Each record represents a contact list in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": "The ID of the contact list."}, "contact_list_name": {"type": "text", "index": 3, "name": "contact_list_name", "comment": "The name of the contact list."}, "created_by_id": {"type": "integer", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the contact list."}, "object_type_id": {"type": "text", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "text", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'."}, "processing_type": {"type": "text", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists."}, "list_version": {"type": "integer", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "text", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_contact_list_deleted": {"type": "boolean", "index": 10, "name": "is_contact_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}, "total_bounces": {"type": "numeric", "index": 14, "name": "total_bounces", "comment": "The total number of bounce email events."}, "total_unique_bounces": {"type": "bigint", "index": 15, "name": "total_unique_bounces", "comment": "The total number of unique email sends with a bounce email event."}, "total_clicks": {"type": "numeric", "index": 16, "name": "total_clicks", "comment": "The total number of click email events."}, "total_unique_clicks": {"type": "bigint", "index": 17, "name": "total_unique_clicks", "comment": "The total number of unique email sends with a click email event."}, "total_deferrals": {"type": "numeric", "index": 18, "name": "total_deferrals", "comment": "The total number of deferral email events."}, "total_unique_deferrals": {"type": "bigint", "index": 19, "name": "total_unique_deferrals", "comment": "The total number of unique email sends with a deferral email event."}, "total_deliveries": {"type": "numeric", "index": 20, "name": "total_deliveries", "comment": "The total number of delivery email events."}, "total_unique_deliveries": {"type": "bigint", "index": 21, "name": "total_unique_deliveries", "comment": "The total number of unique email sends with a delivery email event."}, "total_drops": {"type": "numeric", "index": 22, "name": "total_drops", "comment": "The total number of drop email events."}, "total_unique_drops": {"type": "bigint", "index": 23, "name": "total_unique_drops", "comment": "The total number of unique email sends with a drop email event."}, "total_forwards": {"type": "numeric", "index": 24, "name": "total_forwards", "comment": "The total number of forward email events."}, "total_unique_forwards": {"type": "bigint", "index": 25, "name": "total_unique_forwards", "comment": "The total number of unique email sends with a forward email event."}, "total_opens": {"type": "numeric", "index": 26, "name": "total_opens", "comment": "The total number of open email events."}, "total_unique_opens": {"type": "bigint", "index": 27, "name": "total_unique_opens", "comment": "The total number of unique email sends with a opens email event."}, "total_prints": {"type": "numeric", "index": 28, "name": "total_prints", "comment": "The total number of print email events."}, "total_unique_prints": {"type": "bigint", "index": 29, "name": "total_unique_prints", "comment": "The total number of unique email sends with a print email event."}, "total_spam_reports": {"type": "numeric", "index": 30, "name": "total_spam_reports", "comment": "The total number of spam report email events."}, "total_unique_spam_reports": {"type": "bigint", "index": 31, "name": "total_unique_spam_reports", "comment": "The total number of unique email sends with a spam report email event."}, "total_unsubscribes": {"type": "numeric", "index": 32, "name": "total_unsubscribes", "comment": "The total number of unsubscribe email events."}, "total_unique_unsubscribes": {"type": "bigint", "index": 33, "name": "total_unique_unsubscribes", "comment": "The total number of unique email sends with a unsubscribe email event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__contact_lists"}, "model.hubspot.hubspot__contacts": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__contacts", "database": "postgres", "comment": "Each record represents a contact in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": "The ID of the contact."}, "is_contact_deleted": {"type": "boolean", "index": 3, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "merged_object_ids": {"type": "text", "index": 4, "name": "merged_object_ids", "comment": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.\n"}, "email": {"type": "text", "index": 5, "name": "email", "comment": "The email address of the contact."}, "contact_company": {"type": "text", "index": 6, "name": "contact_company", "comment": "The name of the contact's company"}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": "The contact's first name."}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": "The contact's last name."}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": "The date that the contact was created in your HubSpot account."}, "job_title": {"type": "integer", "index": 10, "name": "job_title", "comment": "The contact's job title."}, "company_annual_revenue": {"type": "integer", "index": 11, "name": "company_annual_revenue", "comment": "The contact's annual company revenue."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "total_bounces": {"type": "numeric", "index": 13, "name": "total_bounces", "comment": "The total number of bounce email events."}, "total_unique_bounces": {"type": "bigint", "index": 14, "name": "total_unique_bounces", "comment": "The total number of unique email sends with a bounce email event."}, "total_clicks": {"type": "numeric", "index": 15, "name": "total_clicks", "comment": "The total number of click email events."}, "total_unique_clicks": {"type": "bigint", "index": 16, "name": "total_unique_clicks", "comment": "The total number of unique email sends with a click email event."}, "total_deferrals": {"type": "numeric", "index": 17, "name": "total_deferrals", "comment": "The total number of deferral email events."}, "total_unique_deferrals": {"type": "bigint", "index": 18, "name": "total_unique_deferrals", "comment": "The total number of unique email sends with a deferral email event."}, "total_deliveries": {"type": "numeric", "index": 19, "name": "total_deliveries", "comment": "The total number of delivery email events."}, "total_unique_deliveries": {"type": "bigint", "index": 20, "name": "total_unique_deliveries", "comment": "The total number of unique email sends with a delivery email event."}, "total_drops": {"type": "numeric", "index": 21, "name": "total_drops", "comment": "The total number of drop email events."}, "total_unique_drops": {"type": "bigint", "index": 22, "name": "total_unique_drops", "comment": "The total number of unique email sends with a drop email event."}, "total_forwards": {"type": "numeric", "index": 23, "name": "total_forwards", "comment": "The total number of forward email events."}, "total_unique_forwards": {"type": "bigint", "index": 24, "name": "total_unique_forwards", "comment": "The total number of unique email sends with a forward email event."}, "total_opens": {"type": "numeric", "index": 25, "name": "total_opens", "comment": "The total number of open email events."}, "total_unique_opens": {"type": "bigint", "index": 26, "name": "total_unique_opens", "comment": "The total number of unique email sends with a opens email event."}, "total_prints": {"type": "numeric", "index": 27, "name": "total_prints", "comment": "The total number of print email events."}, "total_unique_prints": {"type": "bigint", "index": 28, "name": "total_unique_prints", "comment": "The total number of unique email sends with a print email event."}, "total_spam_reports": {"type": "numeric", "index": 29, "name": "total_spam_reports", "comment": "The total number of spam report email events."}, "total_unique_spam_reports": {"type": "bigint", "index": 30, "name": "total_unique_spam_reports", "comment": "The total number of unique email sends with a spam report email event."}, "total_unsubscribes": {"type": "numeric", "index": 31, "name": "total_unsubscribes", "comment": "The total number of unsubscribe email events."}, "total_unique_unsubscribes": {"type": "bigint", "index": 32, "name": "total_unique_unsubscribes", "comment": "The total number of unique email sends with a unsubscribe email event."}, "count_engagement_notes": {"type": "bigint", "index": 33, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 34, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 35, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 36, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 37, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 38, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 39, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}, "calculated_first_conversion_form_id": {"type": "character varying", "index": 40, "name": "calculated_first_conversion_form_id", "comment": "ID of the form associated with the contact's first conversion, calculated by this package."}, "calculated_first_conversion_date": {"type": "timestamp without time zone", "index": 41, "name": "calculated_first_conversion_date", "comment": "Timestamp of the contact's first form submission, calculated by this package."}, "calculated_first_conversion_form_name": {"type": "text", "index": 42, "name": "calculated_first_conversion_form_name", "comment": "Name of the form submitted during the contact's first conversion, calculated by this package."}, "calculated_first_conversion_form_type": {"type": "text", "index": 43, "name": "calculated_first_conversion_form_type", "comment": "Type of form submitted during the contact's first conversion (e.g., regular, pop-up), calculated by this package."}, "calculated_first_conversion_fields_responded_to": {"type": "text", "index": 44, "name": "calculated_first_conversion_fields_responded_to", "comment": "Comma-separated list of unique field names submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "calculated_first_conversion_total_responses": {"type": "bigint", "index": 45, "name": "calculated_first_conversion_total_responses", "comment": "Number of fields submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "calculated_most_recent_conversion_form_id": {"type": "character varying", "index": 46, "name": "calculated_most_recent_conversion_form_id", "comment": "ID of the form associated with the contact's most recent conversion, calculated by this package."}, "calculated_most_recent_conversion_date": {"type": "timestamp without time zone", "index": 47, "name": "calculated_most_recent_conversion_date", "comment": "Timestamp of the contact's most recent form submission, calculated by this package."}, "calculated_most_recent_conversion_form_name": {"type": "text", "index": 48, "name": "calculated_most_recent_conversion_form_name", "comment": "Name of the form submitted during the contact's most recent conversion, calculated by this package."}, "calculated_most_recent_conversion_form_type": {"type": "text", "index": 49, "name": "calculated_most_recent_conversion_form_type", "comment": "Type of form submitted during the contact's most recent conversion (e.g., regular, pop-up), calculated by this package."}, "calculated_most_recent_conversion_fields_responded_to": {"type": "text", "index": 50, "name": "calculated_most_recent_conversion_fields_responded_to", "comment": "Comma-separated list of unique field names submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "calculated_most_recent_conversion_total_responses": {"type": "bigint", "index": 51, "name": "calculated_most_recent_conversion_total_responses", "comment": "Number of fields submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "total_form_submissions": {"type": "bigint", "index": 52, "name": "total_form_submissions", "comment": "Total number of form submissions made by the contact."}, "total_unique_form_submissions": {"type": "bigint", "index": 53, "name": "total_unique_form_submissions", "comment": "Count of distinct forms submitted by the contact."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__contacts"}, "model.hubspot.hubspot__conversations": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__conversations", "database": "postgres", "comment": "Each record represents a conversation thread in HubSpot. Enriches each thread with inbox, channel, channel account details, and aggregated message metrics derived from the message history. Optionally joins to ticket and contact data when the respective features are enabled.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "conversation_thread_id": {"type": "character varying", "index": 3, "name": "conversation_thread_id", "comment": "Unique ID of the conversation thread."}, "inbox_id": {"type": "character varying", "index": 4, "name": "inbox_id", "comment": "ID of the inbox the thread belongs to."}, "associated_contact_id": {"type": "integer", "index": 5, "name": "associated_contact_id", "comment": "ID of the contact associated with the thread."}, "associated_ticket_id": {"type": "integer", "index": 6, "name": "associated_ticket_id", "comment": "ID of the ticket associated with the thread."}, "original_channel_account_id": {"type": "character varying", "index": 7, "name": "original_channel_account_id", "comment": "ID of the channel account through which the thread was originally created."}, "original_channel_id": {"type": "character varying", "index": 8, "name": "original_channel_id", "comment": "ID of the channel through which the thread was originally created."}, "assigned_to_actor_id": {"type": "character varying", "index": 9, "name": "assigned_to_actor_id", "comment": "ID of the actor the thread is currently assigned to."}, "closed_at": {"type": "timestamp without time zone", "index": 10, "name": "closed_at", "comment": "Timestamp when the thread was closed."}, "created_at": {"type": "timestamp without time zone", "index": 11, "name": "created_at", "comment": "Timestamp when the thread was created."}, "latest_message_at": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_at", "comment": "Timestamp of the most recent message (sent or received) in the thread."}, "latest_message_received_at": {"type": "timestamp without time zone", "index": 13, "name": "latest_message_received_at", "comment": "Timestamp of the most recently received message in the thread."}, "latest_message_sent_at": {"type": "timestamp without time zone", "index": 14, "name": "latest_message_sent_at", "comment": "Timestamp of the most recently sent message in the thread."}, "is_spam": {"type": "character varying", "index": 15, "name": "is_spam", "comment": "Indicates whether the thread has been marked as spam."}, "status": {"type": "character varying", "index": 16, "name": "status", "comment": "Current status of the thread (e.g., OPEN, CLOSED)."}, "assignee_name": {"type": "character varying", "index": 17, "name": "assignee_name", "comment": "Name of the actor currently assigned to this conversation thread."}, "assignee_email": {"type": "character varying", "index": 18, "name": "assignee_email", "comment": "Email address of the actor currently assigned to this conversation thread."}, "inbox_name": {"type": "character varying", "index": 19, "name": "inbox_name", "comment": "Display name of the inbox the thread belongs to."}, "inbox_type": {"type": "text", "index": 20, "name": "inbox_type", "comment": "Type of the inbox (e.g., HELP_DESK, INBOX)."}, "is_inbox_active": {"type": "boolean", "index": 21, "name": "is_inbox_active", "comment": "Boolean indicating whether the inbox is active."}, "is_inbox_deleted": {"type": "boolean", "index": 22, "name": "is_inbox_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_name": {"type": "character varying", "index": 23, "name": "channel_name", "comment": "Display name of the channel through which the thread was created."}, "is_channel_deleted": {"type": "boolean", "index": 24, "name": "is_channel_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_account_name": {"type": "character varying", "index": 25, "name": "channel_account_name", "comment": "Display name of the channel account through which the thread was created."}, "channel_account_delivery_identifier_type": {"type": "character varying", "index": 26, "name": "channel_account_delivery_identifier_type", "comment": "The type of delivery identifier for the channel account (e.g., HS_EMAIL_ADDRESS)."}, "channel_account_delivery_identifier_value": {"type": "character varying", "index": 27, "name": "channel_account_delivery_identifier_value", "comment": "The value of the delivery identifier for the channel account (e.g., the email address)."}, "is_channel_account_deleted": {"type": "boolean", "index": 28, "name": "is_channel_account_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "ticket_subject": {"type": "text", "index": 29, "name": "ticket_subject", "comment": "Short summary of the associated ticket."}, "ticket_content": {"type": "text", "index": 30, "name": "ticket_content", "comment": "Text in the body of the associated ticket."}, "ticket_created_date": {"type": "timestamp without time zone", "index": 31, "name": "ticket_created_date", "comment": "Date the associated ticket was created."}, "ticket_closed_date": {"type": "timestamp without time zone", "index": 32, "name": "ticket_closed_date", "comment": "Date the associated ticket was closed."}, "ticket_category": {"type": "text", "index": 33, "name": "ticket_category", "comment": "Category of the associated ticket."}, "ticket_owner_id": {"type": "integer", "index": 34, "name": "ticket_owner_id", "comment": "ID of the owner of the associated ticket."}, "is_ticket_deleted": {"type": "boolean", "index": 35, "name": "is_ticket_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "ticket_owner_email_address": {"type": "text", "index": 36, "name": "ticket_owner_email_address", "comment": "Email address of the associated ticket owner."}, "ticket_owner_full_name": {"type": "text", "index": 37, "name": "ticket_owner_full_name", "comment": "Full name of the associated ticket owner."}, "ticket_owner_primary_team_id": {"type": "bigint", "index": 38, "name": "ticket_owner_primary_team_id", "comment": "ID of the primary team assigned to the associated ticket owner."}, "ticket_owner_primary_team_name": {"type": "text", "index": 39, "name": "ticket_owner_primary_team_name", "comment": "Name of the primary team assigned to the associated ticket owner."}, "ticket_owner_role_id": {"type": "bigint", "index": 40, "name": "ticket_owner_role_id", "comment": "ID of the role assigned to the associated ticket owner."}, "ticket_owner_role_name": {"type": "text", "index": 41, "name": "ticket_owner_role_name", "comment": "Name of the role assigned to the associated ticket owner."}, "ticket_owner_active_user_id": {"type": "integer", "index": 42, "name": "ticket_owner_active_user_id", "comment": "Unique ID of the active HubSpot user who owns the associated ticket."}, "contact_email": {"type": "text", "index": 43, "name": "contact_email", "comment": "Email address of the associated contact."}, "contact_first_name": {"type": "text", "index": 44, "name": "contact_first_name", "comment": "First name of the associated contact."}, "contact_last_name": {"type": "text", "index": 45, "name": "contact_last_name", "comment": "Last name of the associated contact."}, "contact_company": {"type": "text", "index": 46, "name": "contact_company", "comment": "Company of the associated contact."}, "is_contact_deleted": {"type": "boolean", "index": 47, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "first_response_time_seconds": {"type": "double precision", "index": 48, "name": "first_response_time_seconds", "comment": "Time taken to respond to the first incoming message in the thread (in seconds). Negative values indicate that the conversation was initiated by an internal agent or bot."}, "resolution_time_seconds": {"type": "double precision", "index": 49, "name": "resolution_time_seconds", "comment": "Time taken to resolve the thread (in seconds), starting at the first incoming message and ending at thread close."}, "first_message_at": {"type": "timestamp without time zone", "index": 50, "name": "first_message_at", "comment": "Timestamp of the first message (any direction) in the thread."}, "first_message_received_at": {"type": "timestamp without time zone", "index": 51, "name": "first_message_received_at", "comment": "Timestamp of the first incoming message in the thread."}, "first_message_sent_at": {"type": "timestamp without time zone", "index": 52, "name": "first_message_sent_at", "comment": "Timestamp of the first outgoing message in the thread."}, "total_message_count": {"type": "bigint", "index": 53, "name": "total_message_count", "comment": "Total number of distinct messages in the thread."}, "incoming_message_count": {"type": "bigint", "index": 54, "name": "incoming_message_count", "comment": "Number of distinct incoming messages in the thread."}, "outgoing_message_count": {"type": "bigint", "index": 55, "name": "outgoing_message_count", "comment": "Number of distinct outgoing messages in the thread."}, "agent_outgoing_message_count": {"type": "bigint", "index": 56, "name": "agent_outgoing_message_count", "comment": "Number of distinct outgoing messages sent by an agent."}, "bot_outgoing_message_count": {"type": "bigint", "index": 57, "name": "bot_outgoing_message_count", "comment": "Number of distinct outgoing messages sent by a bot."}, "system_outgoing_message_count": {"type": "bigint", "index": 58, "name": "system_outgoing_message_count", "comment": "Number of distinct outgoing messages sent by a system actor."}, "comment_count": {"type": "bigint", "index": 59, "name": "comment_count", "comment": "Number of internal comments on the thread."}, "assignment_count": {"type": "bigint", "index": 60, "name": "assignment_count", "comment": "Number of assignment events on the thread."}, "thread_status_change_count": {"type": "bigint", "index": 61, "name": "thread_status_change_count", "comment": "Number of status change events on the thread."}, "unique_assignee_count": {"type": "bigint", "index": 62, "name": "unique_assignee_count", "comment": "Number of distinct actors the thread has been assigned to."}, "involved_agent_count": {"type": "bigint", "index": 63, "name": "involved_agent_count", "comment": "Number of distinct agents who have created any conversation event (message, comment, etc) in the thread."}, "agent_author_count": {"type": "bigint", "index": 64, "name": "agent_author_count", "comment": "Number of distinct agents who sent an outgoing message in the thread."}, "visitor_author_count": {"type": "bigint", "index": 65, "name": "visitor_author_count", "comment": "Number of distinct visitors who sent an incoming message in the thread."}, "visitor_recipient_count": {"type": "bigint", "index": 66, "name": "visitor_recipient_count", "comment": "Number of distinct visitors who received an outgoing message in the thread."}, "has_welcome_message": {"type": "boolean", "index": 67, "name": "has_welcome_message", "comment": "Boolean indicating whether the thread includes a welcome message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__conversations"}, "model.hubspot.hubspot__daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_company_history", "database": "postgres", "comment": "Each record represents a company's day in Hubspot with tracked properties pivoted into columns. By default, tracks the company's owner and lifecycle stage on each day.\n", "owner": "postgres"}, "columns": {"company_day_id": {"type": "text", "index": 1, "name": "company_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `company_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the company had these values."}, "company_id": {"type": "bigint", "index": 4, "name": "company_id", "comment": "Unique id of a company in Hubspot."}, "owner_full_name": {"type": "text", "index": 5, "name": "owner_full_name", "comment": "The full name of the company owner on that day."}, "owner_email_address": {"type": "text", "index": 6, "name": "owner_email_address", "comment": "The email address of the company owner on that day."}, "hubspot_owner_id": {"type": "text", "index": 7, "name": "hubspot_owner_id", "comment": "The ID of the company owner on that day."}, "lifecyclestage": {"type": "text", "index": 8, "name": "lifecyclestage", "comment": "The lifecycle stage of the company on that day."}, "count_engagement_notes": {"type": "bigint", "index": 9, "name": "count_engagement_notes", "comment": "The number of notes logged against the company on that day."}, "count_engagement_tasks": {"type": "bigint", "index": 10, "name": "count_engagement_tasks", "comment": "The number of tasks logged against the company on that day."}, "count_engagement_calls": {"type": "bigint", "index": 11, "name": "count_engagement_calls", "comment": "The number of calls logged against the company on that day."}, "count_engagement_meetings": {"type": "bigint", "index": 12, "name": "count_engagement_meetings", "comment": "The number of meetings logged against the company on that day."}, "count_engagement_emails": {"type": "bigint", "index": 13, "name": "count_engagement_emails", "comment": "The number of emails logged against the company on that day."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 14, "name": "count_engagement_incoming_emails", "comment": "The number of incoming emails logged against the company on that day."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 15, "name": "count_engagement_forwarded_emails", "comment": "The number of forwarded emails logged against the company on that day."}, "count_engagement_communications": {"type": "bigint", "index": 16, "name": "count_engagement_communications", "comment": "The number of communication engagements logged against the company on that day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_company_history"}, "model.hubspot.hubspot__daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_contact_history", "database": "postgres", "comment": "Each record represents a contact's day in Hubspot with tracked properties pivoted into columns. By default, tracks the contact's lifecycle stage, likelihood-to-close score, and owner on each day and includes engagement and email event metrics.\n", "owner": "postgres"}, "columns": {"contact_day_id": {"type": "text", "index": 1, "name": "contact_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `contact_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the contact had these values."}, "contact_id": {"type": "integer", "index": 4, "name": "contact_id", "comment": "Unique id of a contact in Hubspot."}, "owner_full_name": {"type": "text", "index": 5, "name": "owner_full_name", "comment": "The full name of the contact owner on that day."}, "owner_email_address": {"type": "text", "index": 6, "name": "owner_email_address", "comment": "The email address of the contact owner on that day."}, "lifecyclestage": {"type": "text", "index": 7, "name": "lifecyclestage", "comment": "The lifecycle stage of the contact on that day."}, "hs_predictivecontactscore_v2": {"type": "text", "index": 8, "name": "hs_predictivecontactscore_v2", "comment": "HubSpot's predicted likelihood (0\u2013100) that the contact will close as a customer on that day."}, "hubspot_owner_id": {"type": "text", "index": 9, "name": "hubspot_owner_id", "comment": "The ID of the contact owner on that day."}, "count_engagement_notes": {"type": "bigint", "index": 10, "name": "count_engagement_notes", "comment": "Number of note engagements logged for the contact on that day."}, "count_engagement_tasks": {"type": "bigint", "index": 11, "name": "count_engagement_tasks", "comment": "Number of task engagements logged for the contact on that day."}, "count_engagement_calls": {"type": "bigint", "index": 12, "name": "count_engagement_calls", "comment": "Number of call engagements logged for the contact on that day."}, "count_engagement_meetings": {"type": "bigint", "index": 13, "name": "count_engagement_meetings", "comment": "Number of meeting engagements logged for the contact on that day."}, "count_engagement_emails": {"type": "bigint", "index": 14, "name": "count_engagement_emails", "comment": "Number of outbound email engagements logged for the contact on that day."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 15, "name": "count_engagement_incoming_emails", "comment": "Number of inbound email engagements logged for the contact on that day."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 16, "name": "count_engagement_forwarded_emails", "comment": "Number of forwarded email engagements logged for the contact on that day."}, "count_engagement_communications": {"type": "bigint", "index": 17, "name": "count_engagement_communications", "comment": "Number of communication engagements logged for the contact on that day."}, "count_emails_sent": {"type": "bigint", "index": 18, "name": "count_emails_sent", "comment": "Number of emails sent to the contact on that day."}, "count_email_deliveries": {"type": "bigint", "index": 19, "name": "count_email_deliveries", "comment": "Number of emails delivered to the contact on that day."}, "count_email_opens": {"type": "bigint", "index": 20, "name": "count_email_opens", "comment": "Number of email opens by the contact on that day."}, "count_email_clicks": {"type": "bigint", "index": 21, "name": "count_email_clicks", "comment": "Number of email link clicks by the contact on that day."}, "count_email_bounces": {"type": "bigint", "index": 22, "name": "count_email_bounces", "comment": "Number of email bounces for the contact on that day."}, "count_email_spam_reports": {"type": "bigint", "index": 23, "name": "count_email_spam_reports", "comment": "Number of spam reports by the contact on that day."}, "count_email_unsubscribes": {"type": "bigint", "index": 24, "name": "count_email_unsubscribes", "comment": "Number of email unsubscribes by the contact on that day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_contact_history"}, "model.hubspot.hubspot__daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_deal_history", "database": "postgres", "comment": "Each record represents a deal's day in Hubspot with tracked properties pivoted into columns. By default, tracks the deal's pipeline, pipeline stage, amount, team, and owner on each day.\n", "owner": "postgres"}, "columns": {"deal_day_id": {"type": "text", "index": 1, "name": "deal_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `deal_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the deal had these values."}, "deal_id": {"type": "bigint", "index": 4, "name": "deal_id", "comment": "Unique id of a deal in Hubspot."}, "is_deal_closed": {"type": "boolean", "index": 5, "name": "is_deal_closed", "comment": "Boolean indicating whether the deal's pipeline stage is closed."}, "pipeline_label": {"type": "text", "index": 6, "name": "pipeline_label", "comment": "The human-readable label for the deal pipeline."}, "pipeline_stage_label": {"type": "text", "index": 7, "name": "pipeline_stage_label", "comment": "The human-readable label for the deal's stage."}, "owner_full_name": {"type": "text", "index": 8, "name": "owner_full_name", "comment": "The full name of the deal owner on that day."}, "owner_email_address": {"type": "text", "index": 9, "name": "owner_email_address", "comment": "The email address of the deal owner on that day."}, "hubspot_team_name": {"type": "text", "index": 10, "name": "hubspot_team_name", "comment": "The name of the Hubspot team associated with the deal on that day."}, "deal_pipeline_id": {"type": "text", "index": 11, "name": "deal_pipeline_id", "comment": "ID of the deal pipeline."}, "pipeline_stage_id": {"type": "text", "index": 12, "name": "pipeline_stage_id", "comment": "ID of the deal pipeline stage."}, "amount": {"type": "text", "index": 13, "name": "amount", "comment": "The amount of the deal on that day."}, "amount_in_home_currency": {"type": "text", "index": 14, "name": "amount_in_home_currency", "comment": "The amount of the deal in the account's home currency on that day."}, "owner_id": {"type": "text", "index": 15, "name": "owner_id", "comment": "The ID of the deal owner on that day."}, "hubspot_team_id": {"type": "text", "index": 16, "name": "hubspot_team_id", "comment": "The ID of the Hubspot team associated with the deal on that day."}, "count_engagement_notes": {"type": "bigint", "index": 17, "name": "count_engagement_notes", "comment": "Number of notes logged against the deal on that day."}, "count_engagement_tasks": {"type": "bigint", "index": 18, "name": "count_engagement_tasks", "comment": "Number of tasks logged against the deal on that day."}, "count_engagement_calls": {"type": "bigint", "index": 19, "name": "count_engagement_calls", "comment": "Number of calls logged against the deal on that day."}, "count_engagement_meetings": {"type": "bigint", "index": 20, "name": "count_engagement_meetings", "comment": "Number of meetings logged against the deal on that day."}, "count_engagement_emails": {"type": "bigint", "index": 21, "name": "count_engagement_emails", "comment": "Number of outbound emails logged against the deal on that day."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 22, "name": "count_engagement_incoming_emails", "comment": "Number of inbound emails logged against the deal on that day."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 23, "name": "count_engagement_forwarded_emails", "comment": "Number of forwarded emails logged against the deal on that day."}, "count_engagement_communications": {"type": "bigint", "index": 24, "name": "count_engagement_communications", "comment": "Number of communications (LinkedIn, WhatsApp, SMS) logged against the deal on that day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_deal_history"}, "model.hubspot.hubspot__daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_ticket_history", "database": "postgres", "comment": "Each record represents a ticket's day in Hubspot with tracked properties from the `TICKET_PROPERTY_HISTORY` source table pivoted out into columns. Enabled by setting `hubspot_service_enabled` to `True`.\nBy default, tracks the ticket's pipeline, pipeline stage, and state. Additional properties can be tracked by configuring the `hubspot__ticket_property_history_columns` variable.\nThe start of a ticket's history is its creation date, and its end is by default the close date (or the current date if still open). The history of ticket can be extended past its close date by configuring the `ticket_history_extension_days` variable.\n", "owner": "postgres"}, "columns": {"ticket_day_id": {"type": "text", "index": 1, "name": "ticket_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `ticket_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the ticket had these values."}, "ticket_id": {"type": "integer", "index": 4, "name": "ticket_id", "comment": "Unique id of a ticket in Hubspot."}, "ticket_state": {"type": "text", "index": 5, "name": "ticket_state", "comment": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED."}, "hs_pipeline_label": {"type": "text", "index": 6, "name": "hs_pipeline_label", "comment": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot."}, "hs_pipeline_stage_label": {"type": "text", "index": 7, "name": "hs_pipeline_stage_label", "comment": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot."}, "hs_pipeline": {"type": "text", "index": 8, "name": "hs_pipeline", "comment": "ID of the ticket pipeline."}, "hs_pipeline_stage": {"type": "text", "index": 9, "name": "hs_pipeline_stage", "comment": "ID of the ticket pipeline stage."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_ticket_history"}, "model.hubspot.hubspot__deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__deal_history", "database": "postgres", "comment": "Each record represents a change to deal record in Hubspot; the grain of this model is deal_id -> field_name -> valid_to.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": "The ID of the related deal record."}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 4, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 5, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "valid_from": {"type": "timestamp without time zone", "index": 6, "name": "valid_from", "comment": "The timestamp the change was valid from."}, "new_value": {"type": "text", "index": 7, "name": "new_value", "comment": "The new value of the field."}, "valid_to": {"type": "timestamp without time zone", "index": 8, "name": "valid_to", "comment": "The timestamp the change was valid to. Null if still valid."}, "id": {"type": "text", "index": 9, "name": "id", "comment": "The ID of the change. Hashed on `source_relation`, `field_name`, `deal_id`, and `valid_from`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__deal_history"}, "model.hubspot.hubspot__deal_stages": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__deal_stages", "database": "postgres", "comment": "Each record represents when a deal stage changes in Hubspot, enriched with metrics about deal activities", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_stage_id": {"type": "text", "index": 2, "name": "deal_stage_id", "comment": "The unique deal stage identifier."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "The ID of the deal."}, "deal_name": {"type": "text", "index": 4, "name": "deal_name", "comment": "The name you have given this deal."}, "merged_deal_ids": {"type": "bigint[]", "index": 5, "name": "merged_deal_ids", "comment": "A list of deals that had previously been merged into this record."}, "date_stage_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_stage_entered", "comment": "The timestamp the deal stage was entered."}, "date_stage_exited": {"type": "timestamp without time zone", "index": 7, "name": "date_stage_exited", "comment": "The Fivetran calculated exit time of the deal stage."}, "is_stage_active": {"type": "boolean", "index": 8, "name": "is_stage_active", "comment": "Boolean indicating whether the deal stage active."}, "pipeline_stage_id": {"type": "text", "index": 9, "name": "pipeline_stage_id", "comment": "The ID of the deal's pipeline stage."}, "pipeline_stage_label": {"type": "text", "index": 10, "name": "pipeline_stage_label", "comment": "The label of the deal's pipeline stage."}, "pipeline_id": {"type": "text", "index": 11, "name": "pipeline_id", "comment": "The ID of the deal's pipeline."}, "pipeline_label": {"type": "text", "index": 12, "name": "pipeline_label", "comment": "The label of the deal's pipeline."}, "source": {"type": "text", "index": 13, "name": "source", "comment": "The relevant source of the deal stage."}, "source_id": {"type": "text", "index": 14, "name": "source_id", "comment": "Reference to the source."}, "is_pipeline_stage_active": {"type": "boolean", "index": 15, "name": "is_pipeline_stage_active", "comment": "Boolean indicating if the pipeline stage is active."}, "is_pipeline_active": {"type": "boolean", "index": 16, "name": "is_pipeline_active", "comment": "Boolean indicating if the pipeline is active."}, "is_pipeline_stage_closed": {"type": "boolean", "index": 17, "name": "is_pipeline_stage_closed", "comment": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal, refer to the pipeline_stage_label column."}, "pipeline_stage_display_order": {"type": "integer", "index": 18, "name": "pipeline_stage_display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "pipeline_display_order": {"type": "integer", "index": 19, "name": "pipeline_display_order", "comment": "Used to determine the order in which the pipelines appear when viewed in HubSpot."}, "pipeline_stage_probability": {"type": "double precision", "index": 20, "name": "pipeline_stage_probability", "comment": "The probability that the deal will close. Used for the deal forecast."}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 21, "name": "is_deal_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 22, "name": "is_deal_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "is_deal_deleted": {"type": "boolean", "index": 23, "name": "is_deal_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "deal_pipeline_stage_created_at": {"type": "text", "index": 24, "name": "deal_pipeline_stage_created_at", "comment": "A timestamp representing when the deal_pipeline_stage was created."}, "deal_pipeline_stage_updated_at": {"type": "text", "index": 25, "name": "deal_pipeline_stage_updated_at", "comment": "A timestamp representing when the deal_pipeline_stage was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__deal_stages"}, "model.hubspot.hubspot__deals": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__deals", "database": "postgres", "comment": "Each record represents a deal in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_name": {"type": "text", "index": 2, "name": "deal_name", "comment": "The name you have given this deal."}, "closed_date": {"type": "timestamp without time zone", "index": 3, "name": "closed_date", "comment": "The day the deal is expected to close, or was closed."}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": "The date the deal was created. This property is set automatically by HubSpot."}, "is_deal_deleted": {"type": "boolean", "index": 5, "name": "is_deal_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 7, "name": "deal_id", "comment": "The ID of the deal"}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": "The ID of the deal's pipeline."}, "deal_pipeline_stage_id": {"type": "text", "index": 9, "name": "deal_pipeline_stage_id", "comment": "The ID of the deal's pipeline stage."}, "owner_id": {"type": "bigint", "index": 10, "name": "owner_id", "comment": "The ID of the deal's owner."}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": "The hub ID."}, "description": {"type": "integer", "index": 12, "name": "description", "comment": "A brief description of the deal."}, "amount": {"type": "integer", "index": 13, "name": "amount", "comment": "The total value of the deal in the deal's currency."}, "merged_deal_ids": {"type": "bigint[]", "index": 14, "name": "merged_deal_ids", "comment": "A list of deals that had previously been merged into this record."}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 15, "name": "is_deal_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "pipeline_label": {"type": "text", "index": 16, "name": "pipeline_label", "comment": "The label of the deal's pipeline."}, "is_pipeline_active": {"type": "boolean", "index": 17, "name": "is_pipeline_active", "comment": "Boolean indicating if the pipeline is active."}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 18, "name": "is_deal_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "deal_pipeline_created_at": {"type": "text", "index": 19, "name": "deal_pipeline_created_at", "comment": "A timestamp representing when the deal_pipeline was created."}, "deal_pipeline_updated_at": {"type": "text", "index": 20, "name": "deal_pipeline_updated_at", "comment": "A timestamp representing when the deal_pipeline was updated."}, "pipeline_stage_label": {"type": "text", "index": 21, "name": "pipeline_stage_label", "comment": "The label of the deal's pipeline stage."}, "owner_active_user_id": {"type": "integer", "index": 22, "name": "owner_active_user_id", "comment": "Unique ID of the active HubSpot user who owns the deal."}, "owner_email_address": {"type": "text", "index": 23, "name": "owner_email_address", "comment": "The email address of the deal's owner."}, "owner_full_name": {"type": "text", "index": 24, "name": "owner_full_name", "comment": "The full name of the deal's owner."}, "owner_primary_team_id": {"type": "bigint", "index": 25, "name": "owner_primary_team_id", "comment": "ID of the primary team assigned to the deal owner."}, "owner_primary_team_name": {"type": "text", "index": 26, "name": "owner_primary_team_name", "comment": "Name of the primary team assigned to the deal owner."}, "owner_all_team_ids": {"type": "text", "index": 27, "name": "owner_all_team_ids", "comment": "Comma-separated list of all team IDs associated with the deal owner."}, "owner_all_team_names": {"type": "text", "index": 28, "name": "owner_all_team_names", "comment": "Comma-separated list of all team names associated with the deal owner."}, "owner_role_id": {"type": "bigint", "index": 29, "name": "owner_role_id", "comment": "ID of the role assigned to the deal owner."}, "owner_role_name": {"type": "text", "index": 30, "name": "owner_role_name", "comment": "Name of the role assigned to the deal owner."}, "count_engagement_notes": {"type": "bigint", "index": 31, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 32, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 33, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 34, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 35, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 36, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 37, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__deals"}, "model.hubspot.hubspot__email_campaigns": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_campaigns", "database": "postgres", "comment": "Each record represents an email campaign in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": "The app ID."}, "app_name": {"type": "text", "index": 4, "name": "app_name", "comment": "The app name."}, "content_id": {"type": "bigint", "index": 5, "name": "content_id", "comment": "The ID of the content."}, "email_campaign_id": {"type": "bigint", "index": 6, "name": "email_campaign_id", "comment": "The ID of the email campaign."}, "email_campaign_name": {"type": "text", "index": 7, "name": "email_campaign_name", "comment": "The name of the email campaign."}, "num_included": {"type": "integer", "index": 8, "name": "num_included", "comment": "The number of messages included as part of the email campaign."}, "num_queued": {"type": "integer", "index": 9, "name": "num_queued", "comment": "The number of messages queued as part of the email campaign."}, "email_campaign_sub_type": {"type": "integer", "index": 10, "name": "email_campaign_sub_type", "comment": "The email campaign sub-type."}, "email_campaign_subject": {"type": "text", "index": 11, "name": "email_campaign_subject", "comment": "The subject of the email campaign."}, "email_campaign_type": {"type": "text", "index": 12, "name": "email_campaign_type", "comment": "The email campaign type."}, "total_bounces": {"type": "numeric", "index": 13, "name": "total_bounces", "comment": "The total number of bounce email events."}, "total_unique_bounces": {"type": "bigint", "index": 14, "name": "total_unique_bounces", "comment": "The total number of unique email sends with a bounce email event."}, "total_clicks": {"type": "numeric", "index": 15, "name": "total_clicks", "comment": "The total number of click email events."}, "total_unique_clicks": {"type": "bigint", "index": 16, "name": "total_unique_clicks", "comment": "The total number of unique email sends with a click email event."}, "total_deferrals": {"type": "numeric", "index": 17, "name": "total_deferrals", "comment": "The total number of deferral email events."}, "total_unique_deferrals": {"type": "bigint", "index": 18, "name": "total_unique_deferrals", "comment": "The total number of unique email sends with a deferral email event."}, "total_deliveries": {"type": "numeric", "index": 19, "name": "total_deliveries", "comment": "The total number of delivery email events."}, "total_unique_deliveries": {"type": "bigint", "index": 20, "name": "total_unique_deliveries", "comment": "The total number of unique email sends with a delivery email event."}, "total_drops": {"type": "numeric", "index": 21, "name": "total_drops", "comment": "The total number of drop email events."}, "total_unique_drops": {"type": "bigint", "index": 22, "name": "total_unique_drops", "comment": "The total number of unique email sends with a drop email event."}, "total_forwards": {"type": "numeric", "index": 23, "name": "total_forwards", "comment": "The total number of forward email events."}, "total_unique_forwards": {"type": "bigint", "index": 24, "name": "total_unique_forwards", "comment": "The total number of unique email sends with a forward email event."}, "total_opens": {"type": "numeric", "index": 25, "name": "total_opens", "comment": "The total number of open email events."}, "total_unique_opens": {"type": "bigint", "index": 26, "name": "total_unique_opens", "comment": "The total number of unique email sends with a opens email event."}, "total_prints": {"type": "numeric", "index": 27, "name": "total_prints", "comment": "The total number of print email events."}, "total_unique_prints": {"type": "bigint", "index": 28, "name": "total_unique_prints", "comment": "The total number of unique email sends with a print email event."}, "total_spam_reports": {"type": "numeric", "index": 29, "name": "total_spam_reports", "comment": "The total number of spam report email events."}, "total_unique_spam_reports": {"type": "bigint", "index": 30, "name": "total_unique_spam_reports", "comment": "The total number of unique email sends with a spam report email event."}, "total_unsubscribes": {"type": "numeric", "index": 31, "name": "total_unsubscribes", "comment": "The total number of unsubscribe email events."}, "total_unique_unsubscribes": {"type": "bigint", "index": 32, "name": "total_unique_unsubscribes", "comment": "The total number of unique email sends with a unsubscribe email event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_campaigns"}, "model.hubspot.hubspot__email_event_bounce": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_bounce", "database": "postgres", "comment": "Each record represents a BOUNCE email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bounce_category": {"type": "text", "index": 3, "name": "bounce_category", "comment": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "returned_status": {"type": "integer", "index": 6, "name": "returned_status", "comment": "The status code returned from the recipient's email server."}, "created_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 8, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 9, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 11, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 12, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 13, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_bounce"}, "model.hubspot.hubspot__email_event_clicks": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_clicks", "database": "postgres", "comment": "Each record represents a CLICK email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "referer_url": {"type": "integer", "index": 7, "name": "referer_url", "comment": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client."}, "click_url": {"type": "text", "index": 8, "name": "click_url", "comment": "The URL within the message that the recipient clicked."}, "user_agent": {"type": "text", "index": 9, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 11, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 12, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 14, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 15, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 16, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_clicks"}, "model.hubspot.hubspot__email_event_deferred": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_deferred", "database": "postgres", "comment": "Each record represents a DEFERRED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "attempt_number": {"type": "integer", "index": 3, "name": "attempt_number", "comment": "The delivery attempt number."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "integer", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 8, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 10, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 11, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 12, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_deferred"}, "model.hubspot.hubspot__email_event_delivered": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_delivered", "database": "postgres", "comment": "Each record represents a DELIVERED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 4, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "smtp_id": {"type": "text", "index": 5, "name": "smtp_id", "comment": "An ID attached to the message by HubSpot."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 8, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 10, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 11, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 12, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_delivered"}, "model.hubspot.hubspot__email_event_dropped": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_dropped", "database": "postgres", "comment": "Each record represents a DROPPED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "drop_message": {"type": "text", "index": 5, "name": "drop_message", "comment": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'."}, "drop_reason": {"type": "text", "index": 6, "name": "drop_reason", "comment": "The reason why the email message was dropped. See below for the possible values."}, "from_email": {"type": "text", "index": 7, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 8, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 9, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 10, "name": "email_subject", "comment": "The subject line of the email message."}, "created_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 12, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 13, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 14, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 15, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 16, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 17, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_dropped"}, "model.hubspot.hubspot__email_event_forward": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_forward", "database": "postgres", "comment": "Each record represents a FORWARD email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 9, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 10, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 12, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 13, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 14, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_forward"}, "model.hubspot.hubspot__email_event_opens": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_opens", "database": "postgres", "comment": "Each record represents a OPEN email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "duration_open": {"type": "integer", "index": 4, "name": "duration_open", "comment": "If provided and nonzero, the approximate number of milliseconds the user had opened the email."}, "event_id": {"type": "text", "index": 5, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 7, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_opens"}, "model.hubspot.hubspot__email_event_print": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_print", "database": "postgres", "comment": "Each record represents a PRINT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 9, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 10, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 12, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 13, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 14, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_print"}, "model.hubspot.hubspot__email_event_sent": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_sent", "database": "postgres", "comment": "Each record represents a SENT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'cc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'bcc' field of the email message."}, "from_email": {"type": "text", "index": 5, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 6, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 7, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 8, "name": "email_subject", "comment": "The subject line of the email message."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_sent"}, "model.hubspot.hubspot__email_event_spam_report": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_spam_report", "database": "postgres", "comment": "Each record represents a SPAM_REPORT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "user_agent": {"type": "integer", "index": 5, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 8, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 10, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 11, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 12, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_spam_report"}, "model.hubspot.hubspot__email_event_status_change": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_status_change", "database": "postgres", "comment": "Each record represents a STATUS_CHANGE email event in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_bounced": {"type": "integer", "index": 3, "name": "is_bounced", "comment": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "subscription_status": {"type": "text", "index": 5, "name": "subscription_status", "comment": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n"}, "requested_by_email": {"type": "integer", "index": 6, "name": "requested_by_email", "comment": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted."}, "change_source": {"type": "text", "index": 7, "name": "change_source", "comment": "The source of the subscription change."}, "subscriptions": {"type": "text", "index": 8, "name": "subscriptions", "comment": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n"}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_status_change"}, "model.hubspot.hubspot__email_sends": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_sends", "database": "postgres", "comment": "Each record represents a SENT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "from_email": {"type": "text", "index": 5, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 6, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 7, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 8, "name": "email_subject", "comment": "The subject line of the email message."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "bounces": {"type": "bigint", "index": 16, "name": "bounces", "comment": "The total number of bounce email events."}, "clicks": {"type": "bigint", "index": 17, "name": "clicks", "comment": "The total number of click email events."}, "deferrals": {"type": "bigint", "index": 18, "name": "deferrals", "comment": "The total number of deferral email events."}, "deliveries": {"type": "bigint", "index": 19, "name": "deliveries", "comment": "The total number of delivery email events."}, "drops": {"type": "bigint", "index": 20, "name": "drops", "comment": "The total number of drop email events."}, "forwards": {"type": "bigint", "index": 21, "name": "forwards", "comment": "The total number of forward email events."}, "opens": {"type": "bigint", "index": 22, "name": "opens", "comment": "The total number of open email events."}, "prints": {"type": "bigint", "index": 23, "name": "prints", "comment": "The total number of print email events."}, "spam_reports": {"type": "bigint", "index": 24, "name": "spam_reports", "comment": "The total number of spam report email events."}, "was_bounced": {"type": "boolean", "index": 25, "name": "was_bounced", "comment": "Whether the email was bounced."}, "was_clicked": {"type": "boolean", "index": 26, "name": "was_clicked", "comment": "Whether the email was clicked."}, "was_deferred": {"type": "boolean", "index": 27, "name": "was_deferred", "comment": "Whether the email was deferred."}, "was_delivered": {"type": "boolean", "index": 28, "name": "was_delivered", "comment": "Whether the email was delivered."}, "was_forwarded": {"type": "boolean", "index": 29, "name": "was_forwarded", "comment": "Whether the email was forwarded."}, "was_opened": {"type": "boolean", "index": 30, "name": "was_opened", "comment": "Whether the email was opened."}, "was_printed": {"type": "boolean", "index": 31, "name": "was_printed", "comment": "Whether the email was printed."}, "was_spam_reported": {"type": "boolean", "index": 32, "name": "was_spam_reported", "comment": "Whether the email was spam reported."}, "unsubscribes": {"type": "bigint", "index": 33, "name": "unsubscribes", "comment": "The total number of unsubscribe email events."}, "was_unsubscribed": {"type": "boolean", "index": 34, "name": "was_unsubscribed", "comment": "Whether the email was unsubscribed."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_sends"}, "model.hubspot.hubspot__engagement_calls": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_calls", "database": "postgres", "comment": "Each record represents a CALL engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "source_relation": {"type": "text", "index": 8, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 9, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 10, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 11, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 12, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_calls"}, "model.hubspot.hubspot__engagement_communication": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_communication", "database": "postgres", "comment": "Each record represents a COMMUNICATION engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "source_relation": {"type": "text", "index": 8, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 9, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 10, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 11, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 12, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_communication"}, "model.hubspot.hubspot__engagement_emails": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_emails", "database": "postgres", "comment": "Each record represents an EMAIL engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_type": {"type": "text", "index": 2, "name": "engagement_type", "comment": null}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "all_owner_ids": {"type": "integer", "index": 8, "name": "all_owner_ids", "comment": null}, "all_team_ids": {"type": "integer", "index": 9, "name": "all_team_ids", "comment": null}, "email_subject": {"type": "text", "index": 10, "name": "email_subject", "comment": null}, "email_text": {"type": "text", "index": 11, "name": "email_text", "comment": null}, "lastmodifieddate": {"type": "text", "index": 12, "name": "lastmodifieddate", "comment": null}, "modified_by": {"type": "integer", "index": 13, "name": "modified_by", "comment": null}, "source_relation": {"type": "text", "index": 14, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 15, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 16, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 17, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 18, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_emails"}, "model.hubspot.hubspot__engagement_meetings": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_meetings", "database": "postgres", "comment": "Each record represents a MEETING engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_type": {"type": "text", "index": 2, "name": "engagement_type", "comment": null}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "created_from_link_id": {"type": "integer", "index": 8, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 9, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 10, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 11, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 12, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 13, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 14, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 15, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 16, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 17, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 18, "name": "title", "comment": null}, "source_relation": {"type": "text", "index": 19, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 20, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 21, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 22, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 23, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_meetings"}, "model.hubspot.hubspot__engagement_notes": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_notes", "database": "postgres", "comment": "Each record represents a NOTE engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "note": {"type": "text", "index": 2, "name": "note", "comment": "The body of the note. The body has a limit of 65536 characters."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "engagement_id": {"type": "bigint", "index": 4, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": null}, "body_preview": {"type": "text", "index": 9, "name": "body_preview", "comment": null}, "lastmodifieddate": {"type": "text", "index": 10, "name": "lastmodifieddate", "comment": null}, "note_body": {"type": "text", "index": 11, "name": "note_body", "comment": null}, "source_relation": {"type": "text", "index": 12, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 13, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 14, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 15, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 16, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_notes"}, "model.hubspot.hubspot__engagement_tasks": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_tasks", "database": "postgres", "comment": "Each record represents a TASK engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "task_type": {"type": "text", "index": 8, "name": "task_type", "comment": null}, "object_id": {"type": "bigint", "index": 9, "name": "object_id", "comment": null}, "engagement_source": {"type": "text", "index": 10, "name": "engagement_source", "comment": null}, "source_relation": {"type": "text", "index": 11, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 12, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 13, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 14, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 15, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_tasks"}, "model.hubspot.hubspot__engagements": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagements", "database": "postgres", "comment": "Each record represents an engagement", "owner": "postgres"}, "columns": {"contact_ids": {"type": "bigint[]", "index": 1, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 2, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 3, "name": "company_ids", "comment": "List of companies related to the engagement."}, "source_relation": {"type": "text", "index": 4, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 6, "name": "engagement_id", "comment": "The ID of the engagement."}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": "The hub ID."}, "engagement_type": {"type": "text", "index": 8, "name": "engagement_type", "comment": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagements"}, "model.hubspot.hubspot__marketing_event_performance": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__marketing_event_performance", "database": "postgres", "comment": "Each record represents a marketing event with aggregated attendance metrics, contact-level participation counts, segment list membership, and optional custom properties (e.g. budget spent).\n", "owner": "postgres"}, "columns": {"marketing_event_performance_id": {"type": "text", "index": 1, "name": "marketing_event_performance_id", "comment": "Surrogate key hashed on `source_relation` and `marketing_event_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "is_marketing_event_deleted": {"type": "boolean", "index": 3, "name": "is_marketing_event_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_id": {"type": "bigint", "index": 5, "name": "marketing_event_id", "comment": "The unique ID of the marketing event."}, "app_id": {"type": "character varying", "index": 6, "name": "app_id", "comment": "The string ID of the app associated with the marketing event."}, "app_name": {"type": "character varying", "index": 7, "name": "app_name", "comment": "The name of the app associated with the marketing event."}, "attendees": {"type": "bigint", "index": 8, "name": "attendees", "comment": "Number of attended contact records of a marketing event."}, "cancellations": {"type": "bigint", "index": 9, "name": "cancellations", "comment": "Number of cancelled contact records of a marketing event."}, "created_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "created_timestamp", "comment": "The timestamp when the marketing event was created."}, "end_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "end_timestamp", "comment": "The timestamp when the marketing event ends."}, "event_cancelled": {"type": "boolean", "index": 12, "name": "event_cancelled", "comment": "Boolean indicating whether the marketing event was cancelled."}, "event_completed": {"type": "boolean", "index": 13, "name": "event_completed", "comment": "Boolean indicating whether the marketing event has been completed."}, "event_description": {"type": "character varying", "index": 14, "name": "event_description", "comment": "A description of the marketing event."}, "event_name": {"type": "character varying", "index": 15, "name": "event_name", "comment": "The name of the marketing event."}, "event_organizer": {"type": "character varying", "index": 16, "name": "event_organizer", "comment": "The name of the organizer of the marketing event."}, "event_status": {"type": "character varying", "index": 17, "name": "event_status", "comment": "The current status of the marketing event."}, "event_type": {"type": "character varying", "index": 18, "name": "event_type", "comment": "The type of marketing event."}, "event_url": {"type": "character varying", "index": 19, "name": "event_url", "comment": "A URL in the external event application where the marketing event can be managed."}, "external_event_id": {"type": "character varying", "index": 20, "name": "external_event_id", "comment": "The ID that is associated with this marketing event in the external event application."}, "no_shows": {"type": "bigint", "index": 21, "name": "no_shows", "comment": "Number of no-show contact records of a marketing event."}, "registrants": {"type": "bigint", "index": 22, "name": "registrants", "comment": "Number of registered contact records of a marketing event."}, "start_timestamp": {"type": "timestamp without time zone", "index": 23, "name": "start_timestamp", "comment": "The timestamp when the marketing event starts."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 24, "name": "updated_timestamp", "comment": "The timestamp when the marketing event was last updated."}, "event_duration_minutes": {"type": "double precision", "index": 25, "name": "event_duration_minutes", "comment": "The duration of the event in minutes, calculated from start to end timestamp."}, "attendance_rate": {"type": "numeric", "index": 26, "name": "attendance_rate", "comment": "Ratio of attendees to registrants. Null when registrants is zero."}, "no_show_rate": {"type": "numeric", "index": 27, "name": "no_show_rate", "comment": "Ratio of no-shows to registrants. Null when registrants is zero."}, "cancellation_rate": {"type": "numeric", "index": 28, "name": "cancellation_rate", "comment": "Ratio of cancellations to registrants. Null when registrants is zero."}, "total_contacts": {"type": "bigint", "index": 29, "name": "total_contacts", "comment": "Count of distinct contacts with a record in the participant table."}, "total_attended_contacts": {"type": "bigint", "index": 30, "name": "total_attended_contacts", "comment": "Count of distinct contacts with attendance_state = 'ATTENDED'."}, "total_cancelled_contacts": {"type": "bigint", "index": 31, "name": "total_cancelled_contacts", "comment": "Count of distinct contacts with attendance_state = 'CANCELLED'."}, "total_empty_contacts": {"type": "bigint", "index": 32, "name": "total_empty_contacts", "comment": "Count of distinct contacts with attendance_state = 'EMPTY'."}, "total_no_show_contacts": {"type": "bigint", "index": 33, "name": "total_no_show_contacts", "comment": "Count of distinct contacts with attendance_state = 'NO_SHOW'."}, "total_registered_contacts": {"type": "bigint", "index": 34, "name": "total_registered_contacts", "comment": "Count of distinct contacts with attendance_state = 'REGISTERED'."}, "avg_attendance_duration_seconds": {"type": "numeric", "index": 35, "name": "avg_attendance_duration_seconds", "comment": "Average number of seconds the participation lasted, across all participant records."}, "total_lists": {"type": "bigint", "index": 36, "name": "total_lists", "comment": "Count of active (non-deleted) lists associated with the event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__marketing_event_performance"}, "model.hubspot.hubspot__tickets": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__tickets", "database": "postgres", "comment": "Each record represents a ticket in Hubspot. Enabled by setting `hubspot_service_enabled` to `True`.\nCustom columns from `TICKET` can be included by configuring the `hubspot__ticket_pass_through_columns` variable. Custom calculated ticket fields can be added by configuring the `hubspot__ticket_calculated_fields` variable.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "Unique id of a ticket in Hubspot."}, "is_ticket_deleted": {"type": "boolean", "index": 3, "name": "is_ticket_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "closed_date": {"type": "timestamp without time zone", "index": 5, "name": "closed_date", "comment": "The date the ticket was closed."}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": "The date the ticket was created."}, "first_agent_reply_at": {"type": "timestamp without time zone", "index": 7, "name": "first_agent_reply_at", "comment": "The date for the first agent reply on the ticket."}, "ticket_pipeline_id": {"type": "text", "index": 8, "name": "ticket_pipeline_id", "comment": "The ID of the ticket's pipeline."}, "ticket_pipeline_stage_id": {"type": "text", "index": 9, "name": "ticket_pipeline_stage_id", "comment": "The ID of the ticket's pipeline stage."}, "ticket_category": {"type": "text", "index": 10, "name": "ticket_category", "comment": "The category of the ticket."}, "ticket_priority": {"type": "integer", "index": 11, "name": "ticket_priority", "comment": "The priority of the ticket."}, "owner_id": {"type": "integer", "index": 12, "name": "owner_id", "comment": "Foreign key referencing the ID of the ticket's `OWNER`."}, "ticket_subject": {"type": "text", "index": 13, "name": "ticket_subject", "comment": "Short summary of ticket."}, "ticket_content": {"type": "text", "index": 14, "name": "ticket_content", "comment": "Text in body of the ticket."}, "ticket_state": {"type": "text", "index": 15, "name": "ticket_state", "comment": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED."}, "is_closed": {"type": "boolean", "index": 16, "name": "is_closed", "comment": "Boolean indicating if the pipeline stage is closed."}, "pipeline_stage_label": {"type": "text", "index": 17, "name": "pipeline_stage_label", "comment": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot."}, "pipeline_label": {"type": "text", "index": 18, "name": "pipeline_label", "comment": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot."}, "pipeline_stage_order": {"type": "integer", "index": 19, "name": "pipeline_stage_order", "comment": "Order of the ticket's current stage within its given pipeline."}, "is_ticket_pipeline_deleted": {"type": "boolean", "index": 20, "name": "is_ticket_pipeline_deleted", "comment": "Boolean indicating whether the ticket's pipeline is deleted."}, "is_ticket_pipeline_stage_deleted": {"type": "boolean", "index": 21, "name": "is_ticket_pipeline_stage_deleted", "comment": "Boolean indicating whether the ticket's pipeline stage is deleted."}, "owner_active_user_id": {"type": "integer", "index": 22, "name": "owner_active_user_id", "comment": "Unique ID of the active HubSpot user who owns the ticket."}, "owner_email_address": {"type": "text", "index": 23, "name": "owner_email_address", "comment": "The email address of the ticket's owner."}, "owner_full_name": {"type": "text", "index": 24, "name": "owner_full_name", "comment": "Full name of the ticket's owner."}, "owner_primary_team_id": {"type": "bigint", "index": 25, "name": "owner_primary_team_id", "comment": "ID of the primary team assigned to the ticket owner."}, "owner_primary_team_name": {"type": "text", "index": 26, "name": "owner_primary_team_name", "comment": "Name of the primary team assigned to the ticket owner."}, "owner_all_team_ids": {"type": "text", "index": 27, "name": "owner_all_team_ids", "comment": "Comma-separated list of all team IDs associated with the ticket owner."}, "owner_all_team_names": {"type": "text", "index": 28, "name": "owner_all_team_names", "comment": "Comma-separated list of all team names associated with the ticket owner."}, "owner_role_id": {"type": "bigint", "index": 29, "name": "owner_role_id", "comment": "ID of the role assigned to the ticket owner."}, "owner_role_name": {"type": "text", "index": 30, "name": "owner_role_name", "comment": "Name of the role assigned to the ticket owner."}, "deal_ids": {"type": "text[]", "index": 31, "name": "deal_ids", "comment": "Array of `DEAL` ids associated with the ticket."}, "deal_names": {"type": "text[]", "index": 32, "name": "deal_names", "comment": "Array of `DEAL` names associated with the ticket."}, "contact_ids": {"type": "text[]", "index": 33, "name": "contact_ids", "comment": "Array of `CONTACT` ids associated with the ticket."}, "contact_emails": {"type": "text[]", "index": 34, "name": "contact_emails", "comment": "Array of `CONTACT` emails associated with the ticket."}, "company_ids": {"type": "text[]", "index": 35, "name": "company_ids", "comment": "Array of `COMPANY` ids associated with the ticket."}, "company_names": {"type": "text[]", "index": 36, "name": "company_names", "comment": "Array of `COMPANY` names associated with the ticket."}, "count_engagement_notes": {"type": "bigint", "index": 37, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 38, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 39, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 40, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 41, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 42, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 43, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__tickets"}, "model.hubspot.int_hubspot__company_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__company_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__company_calendar_spine"}, "model.hubspot.int_hubspot__contact_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__contact_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__contact_calendar_spine"}, "model.hubspot.int_hubspot__contact_merge_adjust": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__contact_merge_adjust", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "is_contact_deleted": {"type": "boolean", "index": 3, "name": "is_contact_deleted", "comment": null}, "merged_object_ids": {"type": "text", "index": 4, "name": "merged_object_ids", "comment": null}, "email": {"type": "text", "index": 5, "name": "email", "comment": null}, "contact_company": {"type": "text", "index": 6, "name": "contact_company", "comment": null}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": null}, "job_title": {"type": "integer", "index": 10, "name": "job_title", "comment": null}, "company_annual_revenue": {"type": "integer", "index": 11, "name": "company_annual_revenue", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "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.hubspot.int_hubspot__contact_merge_adjust"}, "model.hubspot.int_hubspot__daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_company_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 3, "name": "company_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "integer", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "timestamp without time zone", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_company_history"}, "model.hubspot.int_hubspot__daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_contact_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "timestamp without time zone", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_contact_history"}, "model.hubspot.int_hubspot__daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_deal_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "timestamp without time zone", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_deal_history"}, "model.hubspot.int_hubspot__daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_ticket_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 3, "name": "ticket_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "text", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_ticket_history"}, "model.hubspot.int_hubspot__deal_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__deal_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__deal_calendar_spine"}, "model.hubspot.int_hubspot__deals_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__deals_enhanced", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "deal_name": {"type": "text", "index": 2, "name": "deal_name", "comment": null}, "closed_date": {"type": "timestamp without time zone", "index": 3, "name": "closed_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": null}, "is_deal_deleted": {"type": "boolean", "index": 5, "name": "is_deal_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "deal_id": {"type": "bigint", "index": 7, "name": "deal_id", "comment": null}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "text", "index": 9, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 10, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "description": {"type": "integer", "index": 12, "name": "description", "comment": null}, "amount": {"type": "integer", "index": 13, "name": "amount", "comment": null}, "merged_deal_ids": {"type": "bigint[]", "index": 14, "name": "merged_deal_ids", "comment": null}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 15, "name": "is_deal_pipeline_deleted", "comment": null}, "pipeline_label": {"type": "text", "index": 16, "name": "pipeline_label", "comment": null}, "is_pipeline_active": {"type": "boolean", "index": 17, "name": "is_pipeline_active", "comment": null}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 18, "name": "is_deal_pipeline_stage_deleted", "comment": null}, "deal_pipeline_created_at": {"type": "text", "index": 19, "name": "deal_pipeline_created_at", "comment": null}, "deal_pipeline_updated_at": {"type": "text", "index": 20, "name": "deal_pipeline_updated_at", "comment": null}, "pipeline_stage_label": {"type": "text", "index": 21, "name": "pipeline_stage_label", "comment": null}, "owner_active_user_id": {"type": "integer", "index": 22, "name": "owner_active_user_id", "comment": null}, "owner_email_address": {"type": "text", "index": 23, "name": "owner_email_address", "comment": null}, "owner_full_name": {"type": "text", "index": 24, "name": "owner_full_name", "comment": null}, "owner_primary_team_id": {"type": "bigint", "index": 25, "name": "owner_primary_team_id", "comment": null}, "owner_primary_team_name": {"type": "text", "index": 26, "name": "owner_primary_team_name", "comment": null}, "owner_all_team_ids": {"type": "text", "index": 27, "name": "owner_all_team_ids", "comment": null}, "owner_all_team_names": {"type": "text", "index": 28, "name": "owner_all_team_names", "comment": null}, "owner_role_id": {"type": "bigint", "index": 29, "name": "owner_role_id", "comment": null}, "owner_role_name": {"type": "text", "index": 30, "name": "owner_role_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.hubspot.int_hubspot__deals_enhanced"}, "model.hubspot.int_hubspot__email_metrics__by_contact_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__email_metrics__by_contact_list", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_list_id": {"type": "integer", "index": 1, "name": "contact_list_id", "comment": null}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": null}, "total_bounces": {"type": "numeric", "index": 3, "name": "total_bounces", "comment": null}, "total_unique_bounces": {"type": "bigint", "index": 4, "name": "total_unique_bounces", "comment": null}, "total_clicks": {"type": "numeric", "index": 5, "name": "total_clicks", "comment": null}, "total_unique_clicks": {"type": "bigint", "index": 6, "name": "total_unique_clicks", "comment": null}, "total_deferrals": {"type": "numeric", "index": 7, "name": "total_deferrals", "comment": null}, "total_unique_deferrals": {"type": "bigint", "index": 8, "name": "total_unique_deferrals", "comment": null}, "total_deliveries": {"type": "numeric", "index": 9, "name": "total_deliveries", "comment": null}, "total_unique_deliveries": {"type": "bigint", "index": 10, "name": "total_unique_deliveries", "comment": null}, "total_drops": {"type": "numeric", "index": 11, "name": "total_drops", "comment": null}, "total_unique_drops": {"type": "bigint", "index": 12, "name": "total_unique_drops", "comment": null}, "total_forwards": {"type": "numeric", "index": 13, "name": "total_forwards", "comment": null}, "total_unique_forwards": {"type": "bigint", "index": 14, "name": "total_unique_forwards", "comment": null}, "total_opens": {"type": "numeric", "index": 15, "name": "total_opens", "comment": null}, "total_unique_opens": {"type": "bigint", "index": 16, "name": "total_unique_opens", "comment": null}, "total_prints": {"type": "numeric", "index": 17, "name": "total_prints", "comment": null}, "total_unique_prints": {"type": "bigint", "index": 18, "name": "total_unique_prints", "comment": null}, "total_spam_reports": {"type": "numeric", "index": 19, "name": "total_spam_reports", "comment": null}, "total_unique_spam_reports": {"type": "bigint", "index": 20, "name": "total_unique_spam_reports", "comment": null}, "total_unsubscribes": {"type": "numeric", "index": 21, "name": "total_unsubscribes", "comment": null}, "total_unique_unsubscribes": {"type": "bigint", "index": 22, "name": "total_unique_unsubscribes", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.int_hubspot__email_metrics__by_contact_list"}, "model.hubspot.int_hubspot__owners_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__owners_enhanced", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "owner_id": {"type": "bigint", "index": 2, "name": "owner_id", "comment": null}, "owner_active_user_id": {"type": "integer", "index": 3, "name": "owner_active_user_id", "comment": null}, "owner_email_address": {"type": "text", "index": 4, "name": "owner_email_address", "comment": null}, "owner_full_name": {"type": "text", "index": 5, "name": "owner_full_name", "comment": null}, "owner_primary_team_id": {"type": "bigint", "index": 6, "name": "owner_primary_team_id", "comment": null}, "owner_primary_team_name": {"type": "text", "index": 7, "name": "owner_primary_team_name", "comment": null}, "owner_all_team_ids": {"type": "text", "index": 8, "name": "owner_all_team_ids", "comment": null}, "owner_all_team_names": {"type": "text", "index": 9, "name": "owner_all_team_names", "comment": null}, "owner_role_id": {"type": "bigint", "index": 10, "name": "owner_role_id", "comment": null}, "owner_role_name": {"type": "text", "index": 11, "name": "owner_role_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.hubspot.int_hubspot__owners_enhanced"}, "model.hubspot.int_hubspot__pivot_daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_company_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 3, "name": "company_id", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 4, "name": "hubspot_owner_id", "comment": null}, "lifecyclestage": {"type": "text", "index": 5, "name": "lifecyclestage", "comment": null}, "id": {"type": "text", "index": 6, "name": "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.hubspot.int_hubspot__pivot_daily_company_history"}, "model.hubspot.int_hubspot__pivot_daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_contact_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "lifecyclestage": {"type": "text", "index": 4, "name": "lifecyclestage", "comment": null}, "hs_predictivecontactscore_v2": {"type": "text", "index": 5, "name": "hs_predictivecontactscore_v2", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 6, "name": "hubspot_owner_id", "comment": null}, "id": {"type": "text", "index": 7, "name": "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.hubspot.int_hubspot__pivot_daily_contact_history"}, "model.hubspot.int_hubspot__pivot_daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_deal_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": null}, "deal_pipeline_id": {"type": "text", "index": 4, "name": "deal_pipeline_id", "comment": null}, "pipeline_stage_id": {"type": "text", "index": 5, "name": "pipeline_stage_id", "comment": null}, "amount": {"type": "text", "index": 6, "name": "amount", "comment": null}, "amount_in_home_currency": {"type": "text", "index": 7, "name": "amount_in_home_currency", "comment": null}, "owner_id": {"type": "text", "index": 8, "name": "owner_id", "comment": null}, "hubspot_team_id": {"type": "text", "index": 9, "name": "hubspot_team_id", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__pivot_daily_deal_history"}, "model.hubspot.int_hubspot__pivot_daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_ticket_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 3, "name": "ticket_id", "comment": null}, "hs_pipeline": {"type": "text", "index": 4, "name": "hs_pipeline", "comment": null}, "hs_pipeline_stage": {"type": "text", "index": 5, "name": "hs_pipeline_stage", "comment": null}, "id": {"type": "text", "index": 6, "name": "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.hubspot.int_hubspot__pivot_daily_ticket_history"}, "model.hubspot.int_hubspot__scd_daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_company_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 3, "name": "company_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 5, "name": "hubspot_owner_id", "comment": null}, "lifecyclestage": {"type": "text", "index": 6, "name": "lifecyclestage", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.int_hubspot__scd_daily_company_history"}, "model.hubspot.int_hubspot__scd_daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_contact_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "lifecyclestage": {"type": "text", "index": 5, "name": "lifecyclestage", "comment": null}, "hs_predictivecontactscore_v2": {"type": "text", "index": 6, "name": "hs_predictivecontactscore_v2", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 7, "name": "hubspot_owner_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.hubspot.int_hubspot__scd_daily_contact_history"}, "model.hubspot.int_hubspot__scd_daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_deal_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "deal_pipeline_id": {"type": "text", "index": 5, "name": "deal_pipeline_id", "comment": null}, "pipeline_stage_id": {"type": "text", "index": 6, "name": "pipeline_stage_id", "comment": null}, "amount": {"type": "text", "index": 7, "name": "amount", "comment": null}, "amount_in_home_currency": {"type": "text", "index": 8, "name": "amount_in_home_currency", "comment": null}, "owner_id": {"type": "text", "index": 9, "name": "owner_id", "comment": null}, "hubspot_team_id": {"type": "text", "index": 10, "name": "hubspot_team_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.hubspot.int_hubspot__scd_daily_deal_history"}, "model.hubspot.int_hubspot__scd_daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_ticket_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 3, "name": "ticket_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "hs_pipeline": {"type": "text", "index": 5, "name": "hs_pipeline", "comment": null}, "hs_pipeline_stage": {"type": "text", "index": 6, "name": "hs_pipeline_stage", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.int_hubspot__scd_daily_ticket_history"}, "model.hubspot.int_hubspot__ticket_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__ticket_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__ticket_calendar_spine"}, "model.hubspot.stg_hubspot__company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company", "database": "postgres", "comment": "Each record represents a company in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the company."}, "is_company_deleted": {"type": "boolean", "index": 3, "name": "is_company_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "company_name": {"type": "text", "index": 5, "name": "company_name", "comment": "The name of the company."}, "description": {"type": "text", "index": 6, "name": "description", "comment": "A short statement about the company's mission and goals."}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": "The date the company was added to your account."}, "industry": {"type": "text", "index": 8, "name": "industry", "comment": "The type of business the company performs."}, "street_address": {"type": "text", "index": 9, "name": "street_address", "comment": "The street address of the company."}, "street_address_2": {"type": "text", "index": 10, "name": "street_address_2", "comment": "Additional address information for the company."}, "city": {"type": "text", "index": 11, "name": "city", "comment": "The city where the company is located."}, "state": {"type": "text", "index": 12, "name": "state", "comment": "The state where the company is located."}, "country": {"type": "text", "index": 13, "name": "country", "comment": "The country where the company is located."}, "company_annual_revenue": {"type": "integer", "index": 14, "name": "company_annual_revenue", "comment": "The actual or estimated annual revenue of the company."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company"}, "model.hubspot.stg_hubspot__company_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company_list", "database": "postgres", "comment": "Each record represents a company list in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": "The ID of the company list."}, "company_list_name": {"type": "character varying", "index": 3, "name": "company_list_name", "comment": "The name of the company list."}, "created_by_id": {"type": "character varying", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the company list."}, "object_type_id": {"type": "character varying", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "character varying", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'."}, "processing_type": {"type": "character varying", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'."}, "list_version": {"type": "bigint", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "timestamp without time zone", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_company_list_deleted": {"type": "boolean", "index": 10, "name": "is_company_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_list"}, "model.hubspot.stg_hubspot__company_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member", "database": "postgres", "comment": "Each record represents a 'link' between a company and a company list.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_company_list_member_deleted": {"type": "boolean", "index": 2, "name": "is_company_list_member_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "added_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "added_timestamp", "comment": "The timestamp a company was added to a list."}, "company_id": {"type": "bigint", "index": 5, "name": "company_id", "comment": "The ID of the related company."}, "company_list_id": {"type": "bigint", "index": 6, "name": "company_list_id", "comment": "The ID of the related company list."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_list_member"}, "model.hubspot.stg_hubspot__company_list_member_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "timestamp without time zone", "index": 5, "name": "added_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.hubspot.stg_hubspot__company_list_member_tmp"}, "model.hubspot.stg_hubspot__company_list_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_list_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "character varying", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "character varying", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "character varying", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "character varying", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "bigint", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_list_tmp"}, "model.hubspot.stg_hubspot__company_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history", "database": "postgres", "comment": "Each record represents a change to company record in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The date the company property history record became active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the company property history record."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether the company property history record is currently active."}, "company_id": {"type": "bigint", "index": 6, "name": "company_id", "comment": "The ID of the related company record."}, "field_name": {"type": "text", "index": 7, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 8, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "integer", "index": 9, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 11, "name": "new_value", "comment": "The new value of the field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_property_history"}, "model.hubspot.stg_hubspot__company_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "integer", "index": 5, "name": "source_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_property_history_tmp"}, "model.hubspot.stg_hubspot__company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_name": {"type": "text", "index": 4, "name": "property_name", "comment": null}, "property_description": {"type": "text", "index": 5, "name": "property_description", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_createdate", "comment": null}, "property_industry": {"type": "text", "index": 7, "name": "property_industry", "comment": null}, "property_address": {"type": "text", "index": 8, "name": "property_address", "comment": null}, "property_address_2": {"type": "text", "index": 9, "name": "property_address_2", "comment": null}, "property_city": {"type": "text", "index": 10, "name": "property_city", "comment": null}, "property_state": {"type": "text", "index": 11, "name": "property_state", "comment": null}, "property_country": {"type": "text", "index": 12, "name": "property_country", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 13, "name": "property_annualrevenue", "comment": null}, "property_hs_all-funky-a9384-syntax": {"type": "integer", "index": 14, "name": "property_hs_all-funky-a9384-syntax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_tmp"}, "model.hubspot.stg_hubspot__contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact", "database": "postgres", "comment": "Each record represents a contact in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": "The ID of the contact."}, "is_contact_deleted": {"type": "boolean", "index": 3, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "merged_object_ids": {"type": "text", "index": 4, "name": "merged_object_ids", "comment": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API."}, "email": {"type": "text", "index": 5, "name": "email", "comment": "The email address of the contact."}, "contact_company": {"type": "text", "index": 6, "name": "contact_company", "comment": "The name of the contact's company."}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": "The contact's first name."}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": "The contact's last name."}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": "The date that the contact was created in your HubSpot account."}, "job_title": {"type": "integer", "index": 10, "name": "job_title", "comment": "The contact's job title."}, "company_annual_revenue": {"type": "integer", "index": 11, "name": "company_annual_revenue", "comment": "The contact's annual company revenue."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact"}, "model.hubspot.stg_hubspot__contact_form_submission": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission", "database": "postgres", "comment": "Table containing contact form submission information.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 2, "name": "occurred_timestamp", "comment": "A Unix timestamp in milliseconds of the time the submission occurred."}, "form_id": {"type": "character varying", "index": 3, "name": "form_id", "comment": "The GUID of the form that the submission belongs to."}, "contact_id": {"type": "bigint", "index": 4, "name": "contact_id", "comment": "The ID of the related contact."}, "conversion_id": {"type": "character varying", "index": 5, "name": "conversion_id", "comment": "A Unique ID for the specific form conversion."}, "page_id": {"type": "integer", "index": 6, "name": "page_id", "comment": "The ID of the related page."}, "page_url": {"type": "text", "index": 7, "name": "page_url", "comment": "The URL that the form was submitted on, if applicable."}, "portal_id": {"type": "integer", "index": 8, "name": "portal_id", "comment": "The hub ID."}, "title": {"type": "text", "index": 9, "name": "title", "comment": "The title of the page that the form was submitted on. This will default to the name of the form if no title is provided."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_form_submission"}, "model.hubspot.stg_hubspot__contact_form_submission_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"timestamp": {"type": "timestamp without time zone", "index": 1, "name": "timestamp", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "conversion_id": {"type": "character varying", "index": 4, "name": "conversion_id", "comment": null}, "page_id": {"type": "integer", "index": 5, "name": "page_id", "comment": null}, "page_url": {"type": "text", "index": 6, "name": "page_url", "comment": null}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__contact_form_submission_tmp"}, "model.hubspot.stg_hubspot__contact_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_list", "database": "postgres", "comment": "Each record represents a contact list in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": "The ID of the contact list."}, "contact_list_name": {"type": "text", "index": 3, "name": "contact_list_name", "comment": "The name of the contact list."}, "created_by_id": {"type": "integer", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the contact list."}, "object_type_id": {"type": "text", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "text", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'."}, "processing_type": {"type": "text", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists."}, "list_version": {"type": "integer", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "text", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_contact_list_deleted": {"type": "boolean", "index": 10, "name": "is_contact_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_list"}, "model.hubspot.stg_hubspot__contact_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member", "database": "postgres", "comment": "Each record represents a 'link' between a contact and a contact list.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_contact_list_member_deleted": {"type": "boolean", "index": 2, "name": "is_contact_list_member_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "added_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "added_timestamp", "comment": "The timestamp a contact was added to a list."}, "contact_id": {"type": "integer", "index": 5, "name": "contact_id", "comment": "The ID of the related contact."}, "contact_list_id": {"type": "integer", "index": 6, "name": "contact_list_id", "comment": "The ID of the related contact list."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_list_member"}, "model.hubspot.stg_hubspot__contact_list_member_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "text", "index": 5, "name": "added_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.hubspot.stg_hubspot__contact_list_member_tmp"}, "model.hubspot.stg_hubspot__contact_list_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "integer", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "text", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "text", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "integer", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "text", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_list_tmp"}, "model.hubspot.stg_hubspot__contact_merge_audit": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit", "database": "postgres", "comment": "Each record contains a contact merge event and the contacts affected by the merge.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "canonical_vid": {"type": "integer", "index": 2, "name": "canonical_vid", "comment": "The contact ID of the contact which the vid_to_merge contact was merged into."}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": "The ID of the contact."}, "entity_id": {"type": "text", "index": 4, "name": "entity_id", "comment": "The ID of the related entity."}, "first_name": {"type": "integer", "index": 5, "name": "first_name", "comment": "The contact's first name."}, "last_name": {"type": "integer", "index": 6, "name": "last_name", "comment": "The contact's last name."}, "num_properties_moved": {"type": "integer", "index": 7, "name": "num_properties_moved", "comment": "The number of properties which were removed from the merged contact."}, "timestamp_at": {"type": "timestamp without time zone", "index": 8, "name": "timestamp_at", "comment": "Timestamp of when the contacts were merged."}, "user_id": {"type": "integer", "index": 9, "name": "user_id", "comment": "The ID of the user."}, "vid_to_merge": {"type": "bigint", "index": 10, "name": "vid_to_merge", "comment": "The ID of the contact which was merged."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 11, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_merge_audit"}, "model.hubspot.stg_hubspot__contact_merge_audit_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"canonical_vid": {"type": "integer", "index": 1, "name": "canonical_vid", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "vid_to_merge": {"type": "bigint", "index": 3, "name": "vid_to_merge", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "entity_id": {"type": "text", "index": 5, "name": "entity_id", "comment": null}, "first_name": {"type": "integer", "index": 6, "name": "first_name", "comment": null}, "last_name": {"type": "integer", "index": 7, "name": "last_name", "comment": null}, "num_properties_moved": {"type": "integer", "index": 8, "name": "num_properties_moved", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 9, "name": "timestamp", "comment": null}, "user_id": {"type": "integer", "index": 10, "name": "user_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.hubspot.stg_hubspot__contact_merge_audit_tmp"}, "model.hubspot.stg_hubspot__contact_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history", "database": "postgres", "comment": "Each record represents a change to contact record in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The date the contact property history record became active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the contact property history record."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether the contact property history record is currently active."}, "contact_id": {"type": "integer", "index": 6, "name": "contact_id", "comment": "The ID of the related contact record."}, "field_name": {"type": "text", "index": 7, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 8, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 9, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 11, "name": "new_value", "comment": "The new value of the field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_property_history"}, "model.hubspot.stg_hubspot__contact_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_property_history_tmp"}, "model.hubspot.stg_hubspot__contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "property_email": {"type": "text", "index": 3, "name": "property_email", "comment": null}, "id": {"type": "integer", "index": 4, "name": "id", "comment": null}, "property_company": {"type": "text", "index": 5, "name": "property_company", "comment": null}, "property_firstname": {"type": "text", "index": 6, "name": "property_firstname", "comment": null}, "property_lastname": {"type": "text", "index": 7, "name": "property_lastname", "comment": null}, "property_email_1": {"type": "text", "index": 8, "name": "property_email_1", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 9, "name": "property_createdate", "comment": null}, "property_jobtitle": {"type": "integer", "index": 10, "name": "property_jobtitle", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 11, "name": "property_annualrevenue", "comment": null}, "property_hs_merged_object_ids": {"type": "text", "index": 12, "name": "property_hs_merged_object_ids", "comment": null}, "property_created_at": {"type": "timestamp without time zone", "index": 13, "name": "property_created_at", "comment": null}, "property_first_conversion_date": {"type": "timestamp without time zone", "index": 14, "name": "property_first_conversion_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_tmp"}, "model.hubspot.stg_hubspot__conversation_actor": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor", "database": "postgres", "comment": "Each record represents an actor (user or contact) in HubSpot conversations.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "actor_id": {"type": "character varying", "index": 3, "name": "actor_id", "comment": "Unique ID of the actor. The first letter corresponds with the type of actor (A- agent, B- bot, S- system, E- email, I- integration, L- customer agent)."}, "avatar": {"type": "character varying", "index": 4, "name": "avatar", "comment": "URL of the actor's avatar image."}, "email": {"type": "character varying", "index": 5, "name": "email", "comment": "Email address of the actor."}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": "Display name of the actor."}, "type": {"type": "text", "index": 7, "name": "type", "comment": "Type of the actor (e.g., VISITOR, AGENT, BOT, SYSTEM)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_actor"}, "model.hubspot.stg_hubspot__conversation_actor_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "avatar": {"type": "character varying", "index": 2, "name": "avatar", "comment": null}, "email": {"type": "character varying", "index": 3, "name": "email", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "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.hubspot.stg_hubspot__conversation_actor_tmp"}, "model.hubspot.stg_hubspot__conversation_channel": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel", "database": "postgres", "comment": "Each record represents a channel through which users can contact your team, such as email, Chat, Facebook Messenger, or WhatsApp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": "Unique ID of the channel."}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": "Display name of the channel."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_channel"}, "model.hubspot.stg_hubspot__conversation_channel_account": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account", "database": "postgres", "comment": "Each record represents an instance of a channel connected to an inbox, such as a specific email address or Facebook Messenger account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_account_id": {"type": "character varying", "index": 4, "name": "channel_account_id", "comment": "Unique ID of the channel account."}, "channel_id": {"type": "character varying", "index": 5, "name": "channel_id", "comment": "ID of the channel this account belongs to."}, "inbox_id": {"type": "character varying", "index": 6, "name": "inbox_id", "comment": "ID of the inbox this channel account is connected to."}, "is_active": {"type": "boolean", "index": 7, "name": "is_active", "comment": "Boolean indicating whether the channel account is active."}, "is_authorized": {"type": "boolean", "index": 8, "name": "is_authorized", "comment": "Boolean indicating whether the channel account is authorized."}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": "Timestamp when the channel account was created."}, "name": {"type": "character varying", "index": 10, "name": "name", "comment": "Display name of the channel account."}, "delivery_identifier_type": {"type": "character varying", "index": 11, "name": "delivery_identifier_type", "comment": "The type of delivery identifier for this channel account (e.g., HS_EMAIL_ADDRESS)."}, "delivery_identifier_value": {"type": "character varying", "index": 12, "name": "delivery_identifier_value", "comment": "The value of the delivery identifier (e.g., the email address)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_channel_account"}, "model.hubspot.stg_hubspot__conversation_channel_account_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "channel_id": {"type": "character varying", "index": 2, "name": "channel_id", "comment": null}, "inbox_id": {"type": "character varying", "index": 3, "name": "inbox_id", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "authorized": {"type": "boolean", "index": 5, "name": "authorized", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 8, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 9, "name": "delivery_identifier_value", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__conversation_channel_account_tmp"}, "model.hubspot.stg_hubspot__conversation_channel_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_channel_tmp"}, "model.hubspot.stg_hubspot__conversation_inbox": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox", "database": "postgres", "comment": "Each record represents a conversation inbox in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "inbox_id": {"type": "character varying", "index": 4, "name": "inbox_id", "comment": "Unique ID of the inbox."}, "is_active": {"type": "boolean", "index": 5, "name": "is_active", "comment": "Boolean indicating whether the inbox is active."}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": "Timestamp when the inbox was created."}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": "Display name of the inbox."}, "type": {"type": "text", "index": 8, "name": "type", "comment": "Type of the inbox (e.g., HELP_DESK, INBOX)."}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": "Timestamp when the inbox was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_inbox"}, "model.hubspot.stg_hubspot__conversation_inbox_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "active": {"type": "boolean", "index": 2, "name": "active", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 7, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_inbox_tmp"}, "model.hubspot.stg_hubspot__conversation_message_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history", "database": "postgres", "comment": "Each record represents a version of a conversation message, tracking changes over time via SCD Type 2.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The (UTC DATETIME) when a record became inactive in the source database."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether this is the currently active version of the record."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "message_id": {"type": "character varying", "index": 7, "name": "message_id", "comment": "Unique ID of the conversation message."}, "thread_id": {"type": "character varying", "index": 8, "name": "thread_id", "comment": "ID of the thread this message belongs to."}, "channel_account_id": {"type": "character varying", "index": 9, "name": "channel_account_id", "comment": "ID of the channel account associated with this message."}, "channel_id": {"type": "character varying", "index": 10, "name": "channel_id", "comment": "ID of the channel associated with this message."}, "from_inbox_id": {"type": "character varying", "index": 11, "name": "from_inbox_id", "comment": "ID of the inbox the message was sent from."}, "to_inbox_id": {"type": "character varying", "index": 12, "name": "to_inbox_id", "comment": "ID of the inbox the message was sent to."}, "assigned_to_actor_id": {"type": "character varying", "index": 13, "name": "assigned_to_actor_id", "comment": "ID of the agent the thread was assigned to at message time."}, "assigned_from_actor_id": {"type": "character varying", "index": 14, "name": "assigned_from_actor_id", "comment": "ID of the previous assignee before this message triggered a reassignment."}, "created_at": {"type": "timestamp without time zone", "index": 15, "name": "created_at", "comment": "Timestamp when the message was created."}, "created_by_actor_id": {"type": "character varying", "index": 16, "name": "created_by_actor_id", "comment": "ID of the user who created the message."}, "created_by_actor_type": {"type": "text", "index": 17, "name": "created_by_actor_type", "comment": "Type of the actor (VISITOR, AGENT, BOT, SYSTEM, EMAIL, INTEGRATION, LLM, OTHER) who created the message. Inferred from the prefix of `created_by_actor_id`."}, "direction": {"type": "text", "index": 18, "name": "direction", "comment": "Direction of the message (e.g., INCOMING, OUTGOING)."}, "in_reply_to_id": {"type": "character varying", "index": 19, "name": "in_reply_to_id", "comment": "ID of the message this message is a reply to."}, "new_status": {"type": "character varying", "index": 20, "name": "new_status", "comment": "The thread status set by this message event (e.g., OPEN, CLOSED)."}, "rich_text": {"type": "character varying", "index": 21, "name": "rich_text", "comment": "HTML-formatted body of the message."}, "subject": {"type": "character varying", "index": 22, "name": "subject", "comment": "Subject line of the message."}, "text": {"type": "character varying", "index": 23, "name": "text", "comment": "Plain-text body of the message."}, "truncation_status": {"type": "text", "index": 24, "name": "truncation_status", "comment": "Indicates whether the message body was truncated (e.g., NOT_TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY, TRUNCATED)."}, "type": {"type": "text", "index": 25, "name": "type", "comment": "Type of the message event (e.g., MESSAGE, COMMENT, WELCOME_MESSAGE)."}, "updated_at": {"type": "timestamp without time zone", "index": 26, "name": "updated_at", "comment": "Timestamp when the message record was last updated."}, "client_type": {"type": "text", "index": 27, "name": "client_type", "comment": "The type of client used to send the message (e.g., SYSTEM, HUBSPOT, INTEGRATION)."}, "status_type": {"type": "text", "index": 28, "name": "status_type", "comment": "The status type of the message (e.g., SENT, RECEIVED)."}, "version_rank": {"type": "bigint", "index": 29, "name": "version_rank", "comment": "Row number ordered by _fivetran_end descending; rank 1 is the most recent active version of the message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_message_history"}, "model.hubspot.stg_hubspot__conversation_message_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "thread_id": {"type": "character varying", "index": 2, "name": "thread_id", "comment": null}, "channel_account_id": {"type": "character varying", "index": 3, "name": "channel_account_id", "comment": null}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": null}, "from_inbox_id": {"type": "character varying", "index": 5, "name": "from_inbox_id", "comment": null}, "to_inbox_id": {"type": "character varying", "index": 6, "name": "to_inbox_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "assigned_from": {"type": "character varying", "index": 8, "name": "assigned_from", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "created_by": {"type": "character varying", "index": 10, "name": "created_by", "comment": null}, "direction": {"type": "character varying", "index": 11, "name": "direction", "comment": null}, "in_reply_to_id": {"type": "character varying", "index": 12, "name": "in_reply_to_id", "comment": null}, "new_status": {"type": "character varying", "index": 13, "name": "new_status", "comment": null}, "rich_text": {"type": "character varying", "index": 14, "name": "rich_text", "comment": null}, "subject": {"type": "character varying", "index": 15, "name": "subject", "comment": null}, "text": {"type": "character varying", "index": 16, "name": "text", "comment": null}, "truncation_status": {"type": "character varying", "index": 17, "name": "truncation_status", "comment": null}, "type": {"type": "character varying", "index": 18, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 19, "name": "updated_at", "comment": null}, "client_type": {"type": "character varying", "index": 20, "name": "client_type", "comment": null}, "status_type": {"type": "character varying", "index": 21, "name": "status_type", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 22, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 23, "name": "_fivetran_synced", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 25, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 26, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_message_history_tmp"}, "model.hubspot.stg_hubspot__conversation_message_recipient": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient", "database": "postgres", "comment": "Each record represents a recipient associated with a conversation message.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_id": {"type": "character varying", "index": 3, "name": "_fivetran_id", "comment": "Unique ID generated by Fivetran for this recipient record."}, "actor_id": {"type": "character varying", "index": 4, "name": "actor_id", "comment": "ID of the actor (user or contact) who received the message."}, "message_id": {"type": "character varying", "index": 5, "name": "message_id", "comment": "ID of the message this recipient is associated with."}, "thread_id": {"type": "character varying", "index": 6, "name": "thread_id", "comment": "ID of the thread this message belongs to."}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": "Display name of the recipient."}, "recipient_field": {"type": "character varying", "index": 8, "name": "recipient_field", "comment": "The role of this recipient in the message (e.g., TO, CC, BCC)."}, "delivery_identifier_type": {"type": "character varying", "index": 9, "name": "delivery_identifier_type", "comment": "The type of delivery identifier for the recipient (e.g., HS_EMAIL_ADDRESS)."}, "delivery_identifier_value": {"type": "character varying", "index": 10, "name": "delivery_identifier_value", "comment": "The value of the delivery identifier (e.g., the email address)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_message_recipient"}, "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "character varying", "index": 1, "name": "_fivetran_id", "comment": null}, "actor_id": {"type": "character varying", "index": 2, "name": "actor_id", "comment": null}, "message_id": {"type": "character varying", "index": 3, "name": "message_id", "comment": null}, "thread_id": {"type": "character varying", "index": 4, "name": "thread_id", "comment": null}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": null}, "recipient_field": {"type": "character varying", "index": 6, "name": "recipient_field", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 7, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 8, "name": "delivery_identifier_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__conversation_message_recipient_tmp"}, "model.hubspot.stg_hubspot__conversation_thread": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread", "database": "postgres", "comment": "Each record represents a conversation thread in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "conversation_thread_id": {"type": "character varying", "index": 3, "name": "conversation_thread_id", "comment": "Unique ID of the conversation thread."}, "inbox_id": {"type": "character varying", "index": 4, "name": "inbox_id", "comment": "ID of the inbox the thread belongs to."}, "associated_contact_id": {"type": "integer", "index": 5, "name": "associated_contact_id", "comment": "ID of the contact associated with the thread."}, "associated_ticket_id": {"type": "integer", "index": 6, "name": "associated_ticket_id", "comment": "ID of the ticket associated with the thread."}, "original_channel_account_id": {"type": "character varying", "index": 7, "name": "original_channel_account_id", "comment": "ID of the channel account through which the thread was originally created."}, "original_channel_id": {"type": "character varying", "index": 8, "name": "original_channel_id", "comment": "ID of the channel through which the thread was originally created."}, "assigned_to_actor_id": {"type": "character varying", "index": 9, "name": "assigned_to_actor_id", "comment": "ID of the agent the thread is assigned to."}, "closed_at": {"type": "timestamp without time zone", "index": 10, "name": "closed_at", "comment": "Timestamp when the thread was closed."}, "created_at": {"type": "timestamp without time zone", "index": 11, "name": "created_at", "comment": "Timestamp when the thread was created."}, "latest_message_at": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_at", "comment": "Timestamp of the most recent message (sent or received) in the thread."}, "latest_message_received_at": {"type": "timestamp without time zone", "index": 13, "name": "latest_message_received_at", "comment": "Timestamp of the most recently received message in the thread."}, "latest_message_sent_at": {"type": "timestamp without time zone", "index": 14, "name": "latest_message_sent_at", "comment": "Timestamp of the most recently sent message in the thread."}, "is_spam": {"type": "character varying", "index": 15, "name": "is_spam", "comment": "Indicates whether the thread has been marked as spam."}, "status": {"type": "character varying", "index": 16, "name": "status", "comment": "Current status of the thread (e.g., OPEN, CLOSED)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_thread"}, "model.hubspot.stg_hubspot__conversation_thread_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "inbox_id": {"type": "character varying", "index": 2, "name": "inbox_id", "comment": null}, "associated_contact_id": {"type": "character varying", "index": 3, "name": "associated_contact_id", "comment": null}, "associated_ticket_id": {"type": "character varying", "index": 4, "name": "associated_ticket_id", "comment": null}, "original_channel_account_id": {"type": "character varying", "index": 5, "name": "original_channel_account_id", "comment": null}, "original_channel_id": {"type": "character varying", "index": 6, "name": "original_channel_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "closed_at": {"type": "timestamp without time zone", "index": 8, "name": "closed_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "latest_message_received_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "latest_message_received_timestamp", "comment": null}, "latest_message_sent_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "latest_message_sent_timestamp", "comment": null}, "latest_message_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_timestamp", "comment": null}, "spam": {"type": "character varying", "index": 13, "name": "spam", "comment": null}, "status": {"type": "character varying", "index": 14, "name": "status", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 15, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_thread_tmp"}, "model.hubspot.stg_hubspot__deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal", "database": "postgres", "comment": "Each record represents a deal in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_name": {"type": "text", "index": 2, "name": "deal_name", "comment": "The name you have given this deal."}, "closed_date": {"type": "timestamp without time zone", "index": 3, "name": "closed_date", "comment": "The day the deal is expected to close, or was closed."}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": "The date the deal was created. This property is set automatically by HubSpot."}, "is_deal_deleted": {"type": "boolean", "index": 5, "name": "is_deal_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 7, "name": "deal_id", "comment": "The ID of the deal"}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": "The ID of the deal's pipeline."}, "deal_pipeline_stage_id": {"type": "text", "index": 9, "name": "deal_pipeline_stage_id", "comment": "The ID of the deal's pipeline stage."}, "owner_id": {"type": "bigint", "index": 10, "name": "owner_id", "comment": "The ID of the deal's owner."}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": "The hub ID."}, "description": {"type": "integer", "index": 12, "name": "description", "comment": "A brief description of the deal."}, "amount": {"type": "integer", "index": 13, "name": "amount", "comment": "The total value of the deal in the deal's currency."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal"}, "model.hubspot.stg_hubspot__deal_company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_company", "database": "postgres", "comment": "Each record represents a 'link' between a deal and company.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "integer", "index": 2, "name": "company_id", "comment": "The ID of the company."}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": "The ID of the deal."}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": "The ID of the type."}, "category": {"type": "text", "index": 5, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_company"}, "model.hubspot.stg_hubspot__deal_company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "integer", "index": 1, "name": "company_id", "comment": null}, "deal_id": {"type": "integer", "index": 2, "name": "deal_id", "comment": null}, "type_id": {"type": "integer", "index": 3, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_company_tmp"}, "model.hubspot.stg_hubspot__deal_contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact", "database": "postgres", "comment": "Each record represents a 'link' between a deal and contact.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "bigint", "index": 2, "name": "contact_id", "comment": "The ID of the contact."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "The ID of the deal."}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": "The ID of the type."}, "category": {"type": "text", "index": 5, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_contact"}, "model.hubspot.stg_hubspot__deal_contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 5, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_contact_tmp"}, "model.hubspot.stg_hubspot__deal_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline", "database": "postgres", "comment": "Each record represents a pipeline in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 2, "name": "is_deal_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 4, "name": "is_active", "comment": "Whether the stage is currently in use."}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": "Used to determine the order in which the pipelines appear when viewed in HubSpot"}, "pipeline_label": {"type": "text", "index": 6, "name": "pipeline_label", "comment": "The human-readable label for the pipeline. The label is used when showing the pipeline in HubSpot."}, "deal_pipeline_id": {"type": "text", "index": 7, "name": "deal_pipeline_id", "comment": "The ID of the pipeline."}, "deal_pipeline_created_at": {"type": "text", "index": 8, "name": "deal_pipeline_created_at", "comment": "A timestamp representing when the record was created."}, "deal_pipeline_updated_at": {"type": "text", "index": 9, "name": "deal_pipeline_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline"}, "model.hubspot.stg_hubspot__deal_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage", "database": "postgres", "comment": "Each record represents a pipeline stage in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 2, "name": "is_deal_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 4, "name": "is_active", "comment": "Whether the pipeline stage is currently in use."}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal (\"Closed Won\" vs \"Closed Lost\"), refer to the pipeline_stage_label column."}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "pipeline_stage_label": {"type": "text", "index": 7, "name": "pipeline_stage_label", "comment": "The human-readable label for the stage. The label is used when showing the stage in HubSpot."}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": "The ID of the related pipeline."}, "probability": {"type": "double precision", "index": 9, "name": "probability", "comment": "The probability that the deal will close. Used for the deal forecast."}, "deal_pipeline_stage_id": {"type": "text", "index": 10, "name": "deal_pipeline_stage_id", "comment": "The ID of the pipeline stage."}, "deal_pipeline_stage_created_at": {"type": "text", "index": 11, "name": "deal_pipeline_stage_created_at", "comment": "A timestamp representing when the record was created."}, "deal_pipeline_stage_updated_at": {"type": "text", "index": 12, "name": "deal_pipeline_stage_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage"}, "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 3, "name": "active", "comment": null}, "closed_won": {"type": "boolean", "index": 4, "name": "closed_won", "comment": null}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": null}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": null}, "probability": {"type": "double precision", "index": 7, "name": "probability", "comment": null}, "stage_id": {"type": "character varying(100)", "index": 8, "name": "stage_id", "comment": null}, "label": {"type": "text", "index": 9, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying(100)", "index": 10, "name": "pipeline_id", "comment": null}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 12, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"}, "model.hubspot.stg_hubspot__deal_pipeline_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying(100)", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 8, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_tmp"}, "model.hubspot.stg_hubspot__deal_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history", "database": "postgres", "comment": "Each record represents the details of your deal properties.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The date the deal property history record became active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the deal property history record."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether the deal property history record is currently active."}, "deal_id": {"type": "bigint", "index": 6, "name": "deal_id", "comment": "The ID of the related deal record."}, "field_name": {"type": "text", "index": 7, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 8, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 9, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 11, "name": "new_value", "comment": "The new value of the field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_property_history"}, "model.hubspot.stg_hubspot__deal_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "source_id": {"type": "text", "index": 6, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_property_history_tmp"}, "model.hubspot.stg_hubspot__deal_stage": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage", "database": "postgres", "comment": "Each record represents a deal stage.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "date_entered": {"type": "timestamp without time zone", "index": 2, "name": "date_entered", "comment": "The timestamp the deal stage was entered."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "Reference to the deal."}, "source": {"type": "text", "index": 4, "name": "source", "comment": "The relevant source of the deal stage."}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": "Reference to the source."}, "deal_stage_name": {"type": "text", "index": 6, "name": "deal_stage_name", "comment": "The value of the deal stage. Typically the name of the stage."}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": "Boolean indicating whether the deal stage is active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the deal stage."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_start", "comment": "The date the deal stage was entered."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_stage"}, "model.hubspot.stg_hubspot__deal_stage_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_start": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_start", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 3, "name": "_fivetran_active", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "date_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_entered", "comment": null}, "source": {"type": "text", "index": 7, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 8, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 9, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_stage_tmp"}, "model.hubspot.stg_hubspot__deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "deal_pipeline_id": {"type": "character varying(100)", "index": 3, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "character varying(100)", "index": 4, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 5, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 6, "name": "portal_id", "comment": null}, "property_dealname": {"type": "text", "index": 7, "name": "property_dealname", "comment": null}, "property_description": {"type": "integer", "index": 8, "name": "property_description", "comment": null}, "property_amount": {"type": "integer", "index": 9, "name": "property_amount", "comment": null}, "property_closedate": {"type": "timestamp without time zone", "index": 10, "name": "property_closedate", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 11, "name": "property_createdate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_tmp"}, "model.hubspot.stg_hubspot__email_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign", "database": "postgres", "comment": "Each record represents an email campaign in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": "The app ID."}, "app_name": {"type": "text", "index": 4, "name": "app_name", "comment": "The app name."}, "content_id": {"type": "bigint", "index": 5, "name": "content_id", "comment": "The ID of the content."}, "email_campaign_id": {"type": "bigint", "index": 6, "name": "email_campaign_id", "comment": "The ID of the email campaign."}, "email_campaign_name": {"type": "text", "index": 7, "name": "email_campaign_name", "comment": "The name of the email campaign."}, "num_included": {"type": "integer", "index": 8, "name": "num_included", "comment": "The number of messages included as part of the email campaign."}, "num_queued": {"type": "integer", "index": 9, "name": "num_queued", "comment": "The number of messages queued as part of the email campaign."}, "email_campaign_sub_type": {"type": "integer", "index": 10, "name": "email_campaign_sub_type", "comment": "The email campaign sub-type."}, "email_campaign_subject": {"type": "text", "index": 11, "name": "email_campaign_subject", "comment": "The subject of the email campaign."}, "email_campaign_type": {"type": "text", "index": 12, "name": "email_campaign_type", "comment": "The email campaign type."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_campaign"}, "model.hubspot.stg_hubspot__email_campaign_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "content_id": {"type": "bigint", "index": 4, "name": "content_id", "comment": null}, "num_included": {"type": "integer", "index": 5, "name": "num_included", "comment": null}, "num_queued": {"type": "integer", "index": 6, "name": "num_queued", "comment": null}, "sub_type": {"type": "integer", "index": 7, "name": "sub_type", "comment": null}, "type": {"type": "text", "index": 8, "name": "type", "comment": null}, "app_name": {"type": "text", "index": 9, "name": "app_name", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "subject": {"type": "text", "index": 11, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_campaign_tmp"}, "model.hubspot.stg_hubspot__email_event": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event", "database": "postgres", "comment": "Each record represents an email event in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": "The ID of the app that sent the email."}, "caused_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "caused_timestamp", "comment": "The timestamp of the event that caused this event."}, "caused_by_event_id": {"type": "integer", "index": 5, "name": "caused_by_event_id", "comment": "The event ID which uniquely identifies the event which directly caused this event. If not applicable, this property is omitted."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "is_filtered_event": {"type": "boolean", "index": 8, "name": "is_filtered_event", "comment": "A boolean representing whether the event has been filtered out of reporting based on customer reports settings or not."}, "event_id": {"type": "text", "index": 9, "name": "event_id", "comment": "The ID of the event."}, "obsoleted_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "obsoleted_timestamp", "comment": "The timestamp of the event that made the current event obsolete."}, "obsoleted_by_event_id": {"type": "integer", "index": 11, "name": "obsoleted_by_event_id", "comment": "The event ID which uniquely identifies the follow-on event which makes this current event obsolete. If not applicable, this property is omitted."}, "portal_id": {"type": "integer", "index": 12, "name": "portal_id", "comment": "The hub ID."}, "recipient_email_address": {"type": "text", "index": 13, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "sent_timestamp": {"type": "timestamp without time zone", "index": 14, "name": "sent_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "sent_by_event_id": {"type": "text", "index": 15, "name": "sent_by_event_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "event_type": {"type": "text", "index": 16, "name": "event_type", "comment": "The type of event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event"}, "model.hubspot.stg_hubspot__email_event_bounce": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce", "database": "postgres", "comment": "Each record represents a BOUNCE email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bounce_category": {"type": "text", "index": 3, "name": "bounce_category", "comment": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "returned_status": {"type": "integer", "index": 6, "name": "returned_status", "comment": "The status code returned from the recipient's email server."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_bounce"}, "model.hubspot.stg_hubspot__email_event_bounce_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 3, "name": "category", "comment": null}, "status": {"type": "integer", "index": 4, "name": "status", "comment": null}, "response": {"type": "text", "index": 5, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_bounce_tmp"}, "model.hubspot.stg_hubspot__email_event_click": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click", "database": "postgres", "comment": "Each record represents a CLICK email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "referer_url": {"type": "integer", "index": 7, "name": "referer_url", "comment": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client."}, "click_url": {"type": "text", "index": 8, "name": "click_url", "comment": "The URL within the message that the recipient clicked."}, "user_agent": {"type": "text", "index": 9, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_click"}, "model.hubspot.stg_hubspot__email_event_click_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "referer": {"type": "integer", "index": 3, "name": "referer", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_click_tmp"}, "model.hubspot.stg_hubspot__email_event_deferred": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred", "database": "postgres", "comment": "Each record represents a DEFERRED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "attempt_number": {"type": "integer", "index": 3, "name": "attempt_number", "comment": "The delivery attempt number."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "integer", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_deferred"}, "model.hubspot.stg_hubspot__email_event_deferred_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "attempt": {"type": "integer", "index": 3, "name": "attempt", "comment": null}, "response": {"type": "integer", "index": 4, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_deferred_tmp"}, "model.hubspot.stg_hubspot__email_event_delivered": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered", "database": "postgres", "comment": "Each record represents a DELIVERED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 4, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "smtp_id": {"type": "text", "index": 5, "name": "smtp_id", "comment": "An ID attached to the message by HubSpot."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_delivered"}, "model.hubspot.stg_hubspot__email_event_delivered_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "response": {"type": "text", "index": 3, "name": "response", "comment": null}, "smtp_id": {"type": "text", "index": 4, "name": "smtp_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.hubspot.stg_hubspot__email_event_delivered_tmp"}, "model.hubspot.stg_hubspot__email_event_dropped": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped", "database": "postgres", "comment": "Each record represents a DROPPED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "drop_message": {"type": "text", "index": 5, "name": "drop_message", "comment": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'."}, "drop_reason": {"type": "text", "index": 6, "name": "drop_reason", "comment": "The reason why the email message was dropped. See below for the possible values."}, "from_email": {"type": "text", "index": 7, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 8, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 9, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 10, "name": "email_subject", "comment": "The subject line of the email message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_dropped"}, "model.hubspot.stg_hubspot__email_event_dropped_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "drop_reason": {"type": "text", "index": 3, "name": "drop_reason", "comment": null}, "bcc": {"type": "text", "index": 4, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 5, "name": "cc", "comment": null}, "drop_message": {"type": "text", "index": 6, "name": "drop_message", "comment": null}, "from": {"type": "text", "index": 7, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 8, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 9, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_dropped_tmp"}, "model.hubspot.stg_hubspot__email_event_forward": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward", "database": "postgres", "comment": "Each record represents a FORWARD email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_forward"}, "model.hubspot.stg_hubspot__email_event_forward_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_forward_tmp"}, "model.hubspot.stg_hubspot__email_event_open": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open", "database": "postgres", "comment": "Each record represents a OPEN email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "duration_open": {"type": "integer", "index": 4, "name": "duration_open", "comment": "If provided and nonzero, the approximate number of milliseconds the user had opened the email."}, "event_id": {"type": "text", "index": 5, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 7, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_open"}, "model.hubspot.stg_hubspot__email_event_open_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "duration": {"type": "integer", "index": 3, "name": "duration", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 6, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_open_tmp"}, "model.hubspot.stg_hubspot__email_event_print": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print", "database": "postgres", "comment": "Each record represents a PRINT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_print"}, "model.hubspot.stg_hubspot__email_event_print_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_print_tmp"}, "model.hubspot.stg_hubspot__email_event_sent": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent", "database": "postgres", "comment": "Each record represents a SENT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "from_email": {"type": "text", "index": 5, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 6, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 7, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 8, "name": "email_subject", "comment": "The subject line of the email message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_sent"}, "model.hubspot.stg_hubspot__email_event_sent_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bcc": {"type": "text", "index": 3, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 4, "name": "cc", "comment": null}, "from": {"type": "text", "index": 5, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 6, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_sent_tmp"}, "model.hubspot.stg_hubspot__email_event_spam_report": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report", "database": "postgres", "comment": "Each record represents a SPAM_REPORT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "user_agent": {"type": "integer", "index": 5, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report"}, "model.hubspot.stg_hubspot__email_event_spam_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "ip_address": {"type": "integer", "index": 3, "name": "ip_address", "comment": null}, "user_agent": {"type": "integer", "index": 4, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report_tmp"}, "model.hubspot.stg_hubspot__email_event_status_change": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change", "database": "postgres", "comment": "Each record represents a STATUS_CHANGE email event in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_bounced": {"type": "integer", "index": 3, "name": "is_bounced", "comment": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "subscription_status": {"type": "text", "index": 5, "name": "subscription_status", "comment": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n"}, "requested_by_email": {"type": "integer", "index": 6, "name": "requested_by_email", "comment": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted."}, "change_source": {"type": "text", "index": 7, "name": "change_source", "comment": "The source of the subscription change."}, "subscriptions": {"type": "text", "index": 8, "name": "subscriptions", "comment": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_status_change"}, "model.hubspot.stg_hubspot__email_event_status_change_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bounced": {"type": "integer", "index": 3, "name": "bounced", "comment": null}, "portal_subscription_status": {"type": "text", "index": 4, "name": "portal_subscription_status", "comment": null}, "requested_by": {"type": "integer", "index": 5, "name": "requested_by", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "subscriptions": {"type": "text", "index": 7, "name": "subscriptions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_status_change_tmp"}, "model.hubspot.stg_hubspot__email_event_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "caused_by_created": {"type": "timestamp without time zone", "index": 4, "name": "caused_by_created", "comment": null}, "caused_by_id": {"type": "integer", "index": 5, "name": "caused_by_id", "comment": null}, "created": {"type": "timestamp without time zone", "index": 6, "name": "created", "comment": null}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": null}, "obsoleted_by_created": {"type": "timestamp without time zone", "index": 8, "name": "obsoleted_by_created", "comment": null}, "obsoleted_by_id": {"type": "integer", "index": 9, "name": "obsoleted_by_id", "comment": null}, "portal_id": {"type": "integer", "index": 10, "name": "portal_id", "comment": null}, "sent_by_created": {"type": "timestamp without time zone", "index": 11, "name": "sent_by_created", "comment": null}, "sent_by_id": {"type": "text", "index": 12, "name": "sent_by_id", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "filtered_event": {"type": "boolean", "index": 14, "name": "filtered_event", "comment": null}, "recipient": {"type": "text", "index": 15, "name": "recipient", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_tmp"}, "model.hubspot.stg_hubspot__engagement": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement", "database": "postgres", "comment": "Each record represents an engagement", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": "The hub ID."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement"}, "model.hubspot.stg_hubspot__engagement_call": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call", "database": "postgres", "comment": "Each record represents a CALL engagement event. All source `property_hs_*` fields", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "source_relation": {"type": "text", "index": 9, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_call"}, "model.hubspot.stg_hubspot__engagement_call_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_call_tmp"}, "model.hubspot.stg_hubspot__engagement_communication": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication", "database": "postgres", "comment": "Each record represents a 'link' between a communication and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "ID of the engagement associated with the communication."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "source_relation": {"type": "text", "index": 9, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_communication"}, "model.hubspot.stg_hubspot__engagement_communication_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_communication_tmp"}, "model.hubspot.stg_hubspot__engagement_company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company", "database": "postgres", "comment": "Each record represents a 'link' between a company and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the related company."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 6, "name": "type_id", "comment": null}, "source_relation": {"type": "text", "index": 7, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_company"}, "model.hubspot.stg_hubspot__engagement_company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_company_tmp"}, "model.hubspot.stg_hubspot__engagement_contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact", "database": "postgres", "comment": "Each record represents a 'link' between a contact and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "contact_id": {"type": "bigint", "index": 2, "name": "contact_id", "comment": "The ID of the related contact."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 6, "name": "type_id", "comment": null}, "source_relation": {"type": "text", "index": 7, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_contact"}, "model.hubspot.stg_hubspot__engagement_contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_contact_tmp"}, "model.hubspot.stg_hubspot__engagement_deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal", "database": "postgres", "comment": "Each record represents a 'link' between a deal and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": "The ID of the related deal."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 6, "name": "type_id", "comment": null}, "source_relation": {"type": "text", "index": 7, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_deal"}, "model.hubspot.stg_hubspot__engagement_deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_deal_tmp"}, "model.hubspot.stg_hubspot__engagement_email": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email", "database": "postgres", "comment": "Each record represents an EMAIL engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": "The type of the engagement."}, "engagement_id": {"type": "bigint", "index": 4, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the email's time of occurrence and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the email. This field determines the team listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "all_owner_ids": {"type": "integer", "index": 9, "name": "all_owner_ids", "comment": null}, "all_team_ids": {"type": "integer", "index": 10, "name": "all_team_ids", "comment": null}, "email_subject": {"type": "text", "index": 11, "name": "email_subject", "comment": null}, "email_text": {"type": "text", "index": 12, "name": "email_text", "comment": null}, "lastmodifieddate": {"type": "text", "index": 13, "name": "lastmodifieddate", "comment": null}, "modified_by": {"type": "integer", "index": 14, "name": "modified_by", "comment": null}, "source_relation": {"type": "text", "index": 15, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_email"}, "model.hubspot.stg_hubspot__engagement_email_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_all_owner_ids": {"type": "integer", "index": 4, "name": "property_hs_all_owner_ids", "comment": null}, "property_hs_all_team_ids": {"type": "integer", "index": 5, "name": "property_hs_all_team_ids", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_hs_createdate", "comment": null}, "property_hs_email_subject": {"type": "text", "index": 7, "name": "property_hs_email_subject", "comment": null}, "property_hs_email_text": {"type": "text", "index": 8, "name": "property_hs_email_text", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 9, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_modified_by": {"type": "integer", "index": 10, "name": "property_hs_modified_by", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 12, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 13, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_email_tmp"}, "model.hubspot.stg_hubspot__engagement_meeting": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting", "database": "postgres", "comment": "Each record represents a MEETING engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": "The type of the engagement."}, "engagement_id": {"type": "bigint", "index": 4, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the meeting's time of creation and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the meeting's time of occurrence and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the meeting. This field determines the user listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the meeting. This field determines the team listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "created_from_link_id": {"type": "integer", "index": 9, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 10, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 11, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 12, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 13, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 14, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 15, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 16, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 17, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 18, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 19, "name": "title", "comment": null}, "source_relation": {"type": "text", "index": 20, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_meeting"}, "model.hubspot.stg_hubspot__engagement_meeting_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_from_link_id": {"type": "integer", "index": 3, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 4, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 5, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 8, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 9, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 10, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 11, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 12, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 13, "name": "title", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_meeting_tmp"}, "model.hubspot.stg_hubspot__engagement_note": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note", "database": "postgres", "comment": "Each record represents a NOTE engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "note": {"type": "text", "index": 3, "name": "note", "comment": "The body of the note. The body has a limit of 65536 characters."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "engagement_id": {"type": "bigint", "index": 5, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "This field marks the note's time of creation and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "occurred_timestamp", "comment": "This field marks the note's time of occurrence and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 8, "name": "owner_id", "comment": "The ID of the owner associated with the note. This field determines the user listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 9, "name": "team_id", "comment": "The ID of the team associated with the note. This field determines the team listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "body_preview": {"type": "text", "index": 10, "name": "body_preview", "comment": null}, "lastmodifieddate": {"type": "text", "index": 11, "name": "lastmodifieddate", "comment": null}, "note_body": {"type": "text", "index": 12, "name": "note_body", "comment": null}, "source_relation": {"type": "text", "index": 13, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_note"}, "model.hubspot.stg_hubspot__engagement_note_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_body_preview": {"type": "text", "index": 4, "name": "property_hs_body_preview", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_createdate", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 6, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_note_body": {"type": "text", "index": 7, "name": "property_hs_note_body", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 9, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 10, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 11, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_note_tmp"}, "model.hubspot.stg_hubspot__engagement_task": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task", "database": "postgres", "comment": "Each record represents a TASK engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the task's time of creation and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the task's time of occurrence and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the task. This field determines the user listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the task. This field determines the team listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "task_type": {"type": "text", "index": 9, "name": "task_type", "comment": null}, "object_id": {"type": "bigint", "index": 10, "name": "object_id", "comment": null}, "engagement_source": {"type": "text", "index": 11, "name": "engagement_source", "comment": null}, "source_relation": {"type": "text", "index": 12, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_task"}, "model.hubspot.stg_hubspot__engagement_task_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_object_id": {"type": "bigint", "index": 5, "name": "property_hs_object_id", "comment": null}, "property_hs_task_type": {"type": "text", "index": 6, "name": "property_hs_task_type", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 8, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 9, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 10, "name": "type", "comment": null}, "task_type": {"type": "text", "index": 11, "name": "task_type", "comment": null}, "property_hs_engagement_source": {"type": "text", "index": 12, "name": "property_hs_engagement_source", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_task_tmp"}, "model.hubspot.stg_hubspot__engagement_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "type": {"type": "text", "index": 2, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_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.hubspot.stg_hubspot__engagement_tmp"}, "model.hubspot.stg_hubspot__form": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__form", "database": "postgres", "comment": "Each record represents a form created in HubSpot, including metadata about its configuration and behavior.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": "Unique identifier for the form."}, "action": {"type": "text", "index": 3, "name": "action", "comment": "The form action type or endpoint triggered upon submission."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Timestamp when the form was created."}, "css_class": {"type": "text", "index": 5, "name": "css_class", "comment": "CSS class applied to the form for styling purposes."}, "follow_up_id": {"type": "integer", "index": 6, "name": "follow_up_id", "comment": "ID of the follow-up action or workflow triggered by the form."}, "form_type": {"type": "text", "index": 7, "name": "form_type", "comment": "Category of the form, such as regular, pop-up, or embedded form."}, "lead_nurturing_campaign_id": {"type": "integer", "index": 8, "name": "lead_nurturing_campaign_id", "comment": "ID of the associated lead nurturing campaign, if applicable."}, "method": {"type": "text", "index": 9, "name": "method", "comment": "HTTP method used for form submission (typically POST)."}, "form_name": {"type": "text", "index": 10, "name": "form_name", "comment": "Name of the form as defined in HubSpot."}, "notify_recipients": {"type": "boolean", "index": 11, "name": "notify_recipients", "comment": "List of email addresses that receive notifications on form submissions."}, "portal_id": {"type": "integer", "index": 12, "name": "portal_id", "comment": "The hub ID."}, "redirect": {"type": "text", "index": 13, "name": "redirect", "comment": "URL users are redirected to after submitting the form."}, "submit_text": {"type": "text", "index": 14, "name": "submit_text", "comment": "Text displayed on the form's submit button."}, "updated_at": {"type": "timestamp without time zone", "index": 15, "name": "updated_at", "comment": "Timestamp when the form was last updated."}, "is_deleted": {"type": "boolean", "index": 16, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__form"}, "model.hubspot.stg_hubspot__form_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__form_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"guid": {"type": "character varying", "index": 1, "name": "guid", "comment": null}, "action": {"type": "text", "index": 2, "name": "action", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "css_class": {"type": "text", "index": 4, "name": "css_class", "comment": null}, "follow_up_id": {"type": "integer", "index": 5, "name": "follow_up_id", "comment": null}, "form_type": {"type": "text", "index": 6, "name": "form_type", "comment": null}, "lead_nurturing_campaign_id": {"type": "integer", "index": 7, "name": "lead_nurturing_campaign_id", "comment": null}, "method": {"type": "text", "index": 8, "name": "method", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "notify_recipients": {"type": "boolean", "index": 10, "name": "notify_recipients", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "redirect": {"type": "text", "index": 12, "name": "redirect", "comment": null}, "submit_text": {"type": "text", "index": 13, "name": "submit_text", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__form_tmp"}, "model.hubspot.stg_hubspot__marketing_event": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event", "database": "postgres", "comment": "Each record represents a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_marketing_event_deleted": {"type": "boolean", "index": 2, "name": "is_marketing_event_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_id": {"type": "bigint", "index": 4, "name": "marketing_event_id", "comment": "The unique ID of the marketing event."}, "app_id": {"type": "character varying", "index": 5, "name": "app_id", "comment": "The string ID of the app associated with the marketing event."}, "app_name": {"type": "character varying", "index": 6, "name": "app_name", "comment": "The name of the app associated with the marketing event."}, "attendees": {"type": "bigint", "index": 7, "name": "attendees", "comment": "Number of attended contact records of a marketing event."}, "cancellations": {"type": "bigint", "index": 8, "name": "cancellations", "comment": "Number of cancelled contact records of a marketing event."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The timestamp when the marketing event was created."}, "end_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "end_timestamp", "comment": "The timestamp when the marketing event ends."}, "event_cancelled": {"type": "boolean", "index": 11, "name": "event_cancelled", "comment": "Boolean indicating whether the marketing event was cancelled."}, "event_completed": {"type": "boolean", "index": 12, "name": "event_completed", "comment": "Boolean indicating whether the marketing event has been completed."}, "event_description": {"type": "character varying", "index": 13, "name": "event_description", "comment": "A description of the marketing event."}, "event_name": {"type": "character varying", "index": 14, "name": "event_name", "comment": "The name of the marketing event."}, "event_organizer": {"type": "character varying", "index": 15, "name": "event_organizer", "comment": "The name of the organizer of the marketing event."}, "event_status": {"type": "character varying", "index": 16, "name": "event_status", "comment": "The current status of the marketing event."}, "event_type": {"type": "character varying", "index": 17, "name": "event_type", "comment": "The type of marketing event."}, "event_url": {"type": "character varying", "index": 18, "name": "event_url", "comment": "A URL in the external event application where the marketing event can be managed."}, "external_event_id": {"type": "character varying", "index": 19, "name": "external_event_id", "comment": "The ID that is associated with this marketing event in the external event application."}, "no_shows": {"type": "bigint", "index": 20, "name": "no_shows", "comment": "Number of no-show contact records of a marketing event."}, "registrants": {"type": "bigint", "index": 21, "name": "registrants", "comment": "Number of registered contact records of a marketing event."}, "start_timestamp": {"type": "timestamp without time zone", "index": 22, "name": "start_timestamp", "comment": "The timestamp when the marketing event starts."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 23, "name": "updated_timestamp", "comment": "The timestamp when the marketing event was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event"}, "model.hubspot.stg_hubspot__marketing_event_custom_property": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property", "database": "postgres", "comment": "Each record represents a custom property on a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_id": {"type": "bigint", "index": 3, "name": "marketing_event_id", "comment": "The ID of the related marketing event."}, "property_name": {"type": "character varying", "index": 4, "name": "property_name", "comment": "The name of the custom property."}, "property_value": {"type": "character varying", "index": 5, "name": "property_value", "comment": "The value of the custom property."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property"}, "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"marketing_event_id": {"type": "bigint", "index": 1, "name": "marketing_event_id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "value": {"type": "character varying", "index": 3, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"}, "model.hubspot.stg_hubspot__marketing_event_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list", "database": "postgres", "comment": "Each record represents a list associated with a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_list_id": {"type": "bigint", "index": 3, "name": "marketing_event_list_id", "comment": "The unique ID of the marketing event list."}, "marketing_event_id": {"type": "bigint", "index": 4, "name": "marketing_event_id", "comment": "The ID of the related marketing event."}, "marketing_event_list_name": {"type": "character varying", "index": 5, "name": "marketing_event_list_name", "comment": "The name of the marketing event list."}, "created_by_id": {"type": "character varying", "index": 6, "name": "created_by_id", "comment": "The ID of the user who created the list."}, "updated_by_id": {"type": "character varying", "index": 7, "name": "updated_by_id", "comment": "The ID of the user who last updated the list."}, "filters_updated_at": {"type": "timestamp without time zone", "index": 8, "name": "filters_updated_at", "comment": "The timestamp when the list filters were last updated."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The timestamp when the list was created."}, "processing_status": {"type": "character varying", "index": 10, "name": "processing_status", "comment": "The current processing status of the list."}, "deleted_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "deleted_timestamp", "comment": "The timestamp when the list was deleted, if applicable."}, "list_version": {"type": "bigint", "index": 12, "name": "list_version", "comment": "The version number of the list."}, "object_type_id": {"type": "character varying", "index": 13, "name": "object_type_id", "comment": "The ID corresponding to the object type stored by the list."}, "size": {"type": "bigint", "index": 14, "name": "size", "comment": "The number of records in the list."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 15, "name": "updated_timestamp", "comment": "The timestamp when the list was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_list"}, "model.hubspot.stg_hubspot__marketing_event_list_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "created_by_id": {"type": "character varying", "index": 3, "name": "created_by_id", "comment": null}, "updated_by_id": {"type": "character varying", "index": 4, "name": "updated_by_id", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 5, "name": "filters_updated_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "processing_status": {"type": "character varying", "index": 7, "name": "processing_status", "comment": null}, "deleted_at": {"type": "timestamp without time zone", "index": 8, "name": "deleted_at", "comment": null}, "list_version": {"type": "bigint", "index": 9, "name": "list_version", "comment": null}, "object_type_id": {"type": "character varying", "index": 10, "name": "object_type_id", "comment": null}, "size": {"type": "bigint", "index": 11, "name": "size", "comment": null}, "name": {"type": "character varying", "index": 12, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 13, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 14, "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.hubspot.stg_hubspot__marketing_event_list_tmp"}, "model.hubspot.stg_hubspot__marketing_event_participant": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant", "database": "postgres", "comment": "Each record represents a participant in a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_participant_id": {"type": "bigint", "index": 3, "name": "marketing_event_participant_id", "comment": "The unique ID of the marketing event participant record."}, "marketing_event_id": {"type": "bigint", "index": 4, "name": "marketing_event_id", "comment": "The ID of the related marketing event."}, "contact_id": {"type": "bigint", "index": 5, "name": "contact_id", "comment": "The ID of the related contact."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The timestamp when the participant record was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "occurred_timestamp", "comment": "The timestamp when the participation event occurred."}, "attendance_percentage": {"type": "double precision", "index": 8, "name": "attendance_percentage", "comment": "Percentage of the participation duration relative to the event duration."}, "attendance_state": {"type": "character varying", "index": 9, "name": "attendance_state", "comment": "The attendance state of the participant (e.g., ATTENDED, CANCELLED, EMPTY, NO_SHOW, REGISTERED)."}, "attendance_duration_seconds": {"type": "bigint", "index": 10, "name": "attendance_duration_seconds", "comment": "The number of seconds the participation lasted."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_participant"}, "model.hubspot.stg_hubspot__marketing_event_participant_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "properties_occurred_at": {"type": "timestamp without time zone", "index": 5, "name": "properties_occurred_at", "comment": null}, "properties_attendance_percentage": {"type": "double precision", "index": 6, "name": "properties_attendance_percentage", "comment": null}, "properties_attendance_state": {"type": "character varying", "index": 7, "name": "properties_attendance_state", "comment": null}, "properties_attendance_duration_seconds": {"type": "bigint", "index": 8, "name": "properties_attendance_duration_seconds", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__marketing_event_participant_tmp"}, "model.hubspot.stg_hubspot__marketing_event_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "app_id": {"type": "character varying", "index": 2, "name": "app_id", "comment": null}, "app_name": {"type": "character varying", "index": 3, "name": "app_name", "comment": null}, "attendees": {"type": "bigint", "index": 4, "name": "attendees", "comment": null}, "cancellations": {"type": "bigint", "index": 5, "name": "cancellations", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 7, "name": "end_date_time", "comment": null}, "event_cancelled": {"type": "boolean", "index": 8, "name": "event_cancelled", "comment": null}, "event_completed": {"type": "boolean", "index": 9, "name": "event_completed", "comment": null}, "event_description": {"type": "character varying", "index": 10, "name": "event_description", "comment": null}, "event_name": {"type": "character varying", "index": 11, "name": "event_name", "comment": null}, "event_organizer": {"type": "character varying", "index": 12, "name": "event_organizer", "comment": null}, "event_status": {"type": "character varying", "index": 13, "name": "event_status", "comment": null}, "event_type": {"type": "character varying", "index": 14, "name": "event_type", "comment": null}, "event_url": {"type": "character varying", "index": 15, "name": "event_url", "comment": null}, "external_event_id": {"type": "character varying", "index": 16, "name": "external_event_id", "comment": null}, "no_shows": {"type": "bigint", "index": 17, "name": "no_shows", "comment": null}, "registrants": {"type": "bigint", "index": 18, "name": "registrants", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 19, "name": "start_date_time", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 20, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 21, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 22, "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.hubspot.stg_hubspot__marketing_event_tmp"}, "model.hubspot.stg_hubspot__merged_deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal", "database": "postgres", "comment": "Each record represents a deal that has been merged along with the related deal it's been merged into.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "The ID of the deal the record has been merged INTO."}, "merged_deal_id": {"type": "bigint", "index": 4, "name": "merged_deal_id", "comment": "ID of deal that has been merged."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__merged_deal"}, "model.hubspot.stg_hubspot__merged_deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "merged_deal_id": {"type": "bigint", "index": 2, "name": "merged_deal_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__merged_deal_tmp"}, "model.hubspot.stg_hubspot__owner": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__owner", "database": "postgres", "comment": "Each record represents an owner/user in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "owner_id": {"type": "bigint", "index": 3, "name": "owner_id", "comment": "The ID of the owner."}, "active_user_id": {"type": "integer", "index": 4, "name": "active_user_id", "comment": "ID of the active user account associated with the owner. Null if owner is not an active user."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "A timestamp for when the owner was created."}, "email_address": {"type": "text", "index": 6, "name": "email_address", "comment": "The email address of the owner."}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": "The first name of the owner."}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": "The last name of the owner."}, "portal_id": {"type": "integer", "index": 9, "name": "portal_id", "comment": "The hub ID."}, "owner_type": {"type": "text", "index": 10, "name": "owner_type", "comment": "The type of owner."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp for when the owner was last updated."}, "full_name": {"type": "text", "index": 12, "name": "full_name", "comment": "Full name of the owner."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__owner"}, "model.hubspot.stg_hubspot__owner_team": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__owner_team", "database": "postgres", "comment": "Table mapping owners to their associated teams in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "owner_id": {"type": "bigint", "index": 2, "name": "owner_id", "comment": "Unique ID of the HubSpot owner (user) assigned to the team."}, "team_id": {"type": "bigint", "index": 3, "name": "team_id", "comment": "Unique ID of the team to which the owner belongs."}, "is_team_primary": {"type": "boolean", "index": 4, "name": "is_team_primary", "comment": "Indicates whether the team is the owner's primary team."}, "is_deleted": {"type": "boolean", "index": 5, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__owner_team"}, "model.hubspot.stg_hubspot__owner_team_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__owner_team_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": null}, "is_team_primary": {"type": "boolean", "index": 3, "name": "is_team_primary", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__owner_team_tmp"}, "model.hubspot.stg_hubspot__owner_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__owner_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 6, "name": "updated_at", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 9, "name": "last_name", "comment": null}, "active_user_id": {"type": "integer", "index": 10, "name": "active_user_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.hubspot.stg_hubspot__owner_tmp"}, "model.hubspot.stg_hubspot__property": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__property", "database": "postgres", "comment": "Each record represents a property.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": "(DEPRECATED IN OCTOBER 2025) Fivetran generated id. Joins to `property_id` (ALSO DEPRECATED) in the `PROPERTY_OPTION` table. Use `hubspot_object` to join to `PROPERTY_OPTION` instead.\n"}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "calculated": {"type": "boolean", "index": 4, "name": "calculated", "comment": "Indicates if the property is calculated by a HubSpot process"}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": "Timestamp representing when the property was created."}, "description": {"type": "text", "index": 6, "name": "description", "comment": "A description of the property."}, "field_type": {"type": "text", "index": 7, "name": "field_type", "comment": "One of textarea, text, date, file, number, select, radio, checkbox, or booleancheckbox."}, "group_name": {"type": "text", "index": 8, "name": "group_name", "comment": "The name of the property group that the property belongs to."}, "hubspot_defined": {"type": "boolean", "index": 9, "name": "hubspot_defined", "comment": "This will be true for default properties that are built into HubSpot."}, "hubspot_object": {"type": "text", "index": 10, "name": "hubspot_object", "comment": "If this property is related to other objects, the object will be listed here. Part of the primary key with `property_name`. Use `hubspot_object` to join with the `PROPERTY_OPTION` table.\n"}, "property_label": {"type": "text", "index": 11, "name": "property_label", "comment": "A human readable label for the property."}, "property_name": {"type": "text", "index": 12, "name": "property_name", "comment": "The internal name of the property. Part of the primary key with `hubspot_object`."}, "property_type": {"type": "text", "index": 13, "name": "property_type", "comment": "One of string, number, date, datetime, or enumeration."}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": "Timestamp representing when the property was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__property"}, "model.hubspot.stg_hubspot__property_option": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__property_option", "database": "postgres", "comment": "Each record represents an option for the related property.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "property_option_label": {"type": "text", "index": 2, "name": "property_option_label", "comment": "The label of the option displayed inside the HubSpot app. Part of the composite primary key with `hubspot_object` and `property_option_name`."}, "property_id": {"type": "text", "index": 3, "name": "property_id", "comment": "(DEPRECATED IN OCTOBER 2025) The ID of the related property. Use `hubspot_object` to join with the `PROPERTY` table instead."}, "hubspot_object": {"type": "text", "index": 4, "name": "hubspot_object", "comment": "If this option's property is related to other objects, the object will be listed here. Part of the primary key with `property_option_name` and `property_option_label`. Use `hubspot_object` to join with the `PROPERTY` table.\n"}, "property_option_name": {"type": "text", "index": 5, "name": "property_option_name", "comment": "The internal name of the property option. Part of the primary key with `hubspot_object` and `property_option_label`."}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "display_order": {"type": "integer", "index": 7, "name": "display_order", "comment": "Order of options displayed in Hubspot, starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values."}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": "Boolean if the option will be displayed in HubSpot"}, "property_option_value": {"type": "text", "index": 9, "name": "property_option_value", "comment": "The internal value of the option."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__property_option"}, "model.hubspot.stg_hubspot__property_option_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__property_option_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"label": {"type": "text", "index": 1, "name": "label", "comment": null}, "property_id": {"type": "text", "index": 2, "name": "property_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "display_order": {"type": "integer", "index": 4, "name": "display_order", "comment": null}, "hidden": {"type": "boolean", "index": 5, "name": "hidden", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "hubspot_object": {"type": "text", "index": 7, "name": "hubspot_object", "comment": null}, "name": {"type": "text", "index": 8, "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.hubspot.stg_hubspot__property_option_tmp"}, "model.hubspot.stg_hubspot__property_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__property_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "calculated": {"type": "boolean", "index": 3, "name": "calculated", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "description": {"type": "text", "index": 5, "name": "description", "comment": null}, "field_type": {"type": "text", "index": 6, "name": "field_type", "comment": null}, "group_name": {"type": "text", "index": 7, "name": "group_name", "comment": null}, "hubspot_defined": {"type": "boolean", "index": 8, "name": "hubspot_defined", "comment": null}, "hubspot_object": {"type": "text", "index": 9, "name": "hubspot_object", "comment": null}, "label": {"type": "text", "index": 10, "name": "label", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "show_currency_symbol": {"type": "boolean", "index": 12, "name": "show_currency_symbol", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__property_tmp"}, "model.hubspot.stg_hubspot__role": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__role", "database": "postgres", "comment": "Table containing role information for HubSpot users.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "role_id": {"type": "bigint", "index": 2, "name": "role_id", "comment": "Unique ID of the role."}, "role_name": {"type": "text", "index": 3, "name": "role_name", "comment": "Name of the role."}, "requires_billing_write": {"type": "boolean", "index": 4, "name": "requires_billing_write", "comment": "Indicates whether the role requires billing write access."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__role"}, "model.hubspot.stg_hubspot__role_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__role_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "requires_billing_write": {"type": "boolean", "index": 3, "name": "requires_billing_write", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__role_tmp"}, "model.hubspot.stg_hubspot__submission_response": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__submission_response", "database": "postgres", "comment": "Each record represents a single field response from a HubSpot form submission.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "conversion_id": {"type": "character varying", "index": 2, "name": "conversion_id", "comment": "Unique identifier for the specific form conversion event."}, "form_id": {"type": "character varying", "index": 3, "name": "form_id", "comment": "The ID of the form the submission belongs to."}, "field_name": {"type": "character varying", "index": 4, "name": "field_name", "comment": "The name of the form field."}, "field_value": {"type": "character varying", "index": 5, "name": "field_value", "comment": "The value submitted for the form field."}, "submitted_at": {"type": "bigint", "index": 6, "name": "submitted_at", "comment": "Unix timestamp in milliseconds of when the form was submitted."}, "submitted_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "submitted_timestamp", "comment": "Timestamp of when the form was submitted, converted from the `submitted_at` field."}, "page_url": {"type": "character varying", "index": 8, "name": "page_url", "comment": "The URL of the page where the form was submitted."}, "object_type_id": {"type": "character varying", "index": 9, "name": "object_type_id", "comment": "The ID corresponding to the HubSpot object type associated with the submission."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__submission_response"}, "model.hubspot.stg_hubspot__submission_response_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__submission_response_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"conversion_id": {"type": "character varying", "index": 1, "name": "conversion_id", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "field_name": {"type": "character varying", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "submitted_at": {"type": "bigint", "index": 5, "name": "submitted_at", "comment": null}, "page_url": {"type": "character varying", "index": 6, "name": "page_url", "comment": null}, "object_type_id": {"type": "character varying", "index": 7, "name": "object_type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__submission_response_tmp"}, "model.hubspot.stg_hubspot__team": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__team", "database": "postgres", "comment": "Table containing HubSpot team details.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": "Unique ID of the team."}, "team_name": {"type": "text", "index": 3, "name": "team_name", "comment": "Name of the team."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 5, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team"}, "model.hubspot.stg_hubspot__team_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__team_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team_tmp"}, "model.hubspot.stg_hubspot__team_user": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__team_user", "database": "postgres", "comment": "Table representing associations between users and teams, including secondary team assignments.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": "Unique ID of the associated team."}, "user_id": {"type": "integer", "index": 3, "name": "user_id", "comment": "Unique ID of the user associated with the team."}, "is_secondary_user": {"type": "boolean", "index": 4, "name": "is_secondary_user", "comment": "Indicates whether the team is a secondary team for the user."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team_user"}, "model.hubspot.stg_hubspot__team_user_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__team_user_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"user_id": {"type": "integer", "index": 1, "name": "user_id", "comment": null}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": null}, "is_secondary_user": {"type": "boolean", "index": 3, "name": "is_secondary_user", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team_user_tmp"}, "model.hubspot.stg_hubspot__ticket": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket", "database": "postgres", "comment": "Each record represents a ticket in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "ID of the ticket."}, "is_ticket_deleted": {"type": "boolean", "index": 3, "name": "is_ticket_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "closed_date": {"type": "timestamp without time zone", "index": 5, "name": "closed_date", "comment": "The date the ticket was closed."}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": "The date the ticket was created."}, "first_agent_reply_at": {"type": "timestamp without time zone", "index": 7, "name": "first_agent_reply_at", "comment": "the date for the first agent reply on the ticket."}, "ticket_pipeline_id": {"type": "text", "index": 8, "name": "ticket_pipeline_id", "comment": "The ID of the ticket's pipeline."}, "ticket_pipeline_stage_id": {"type": "text", "index": 9, "name": "ticket_pipeline_stage_id", "comment": "The ID of the ticket's pipeline stage."}, "ticket_category": {"type": "text", "index": 10, "name": "ticket_category", "comment": "The category of the ticket."}, "ticket_priority": {"type": "integer", "index": 11, "name": "ticket_priority", "comment": "The priority of the ticket."}, "owner_id": {"type": "integer", "index": 12, "name": "owner_id", "comment": "The ID of the deal's owner."}, "ticket_subject": {"type": "text", "index": 13, "name": "ticket_subject", "comment": "Short summary of ticket."}, "ticket_content": {"type": "text", "index": 14, "name": "ticket_content", "comment": "Text in body of the ticket."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket"}, "model.hubspot.stg_hubspot__ticket_company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and company.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": "The ID of the related company."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_company"}, "model.hubspot.stg_hubspot__ticket_company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_company_tmp"}, "model.hubspot.stg_hubspot__ticket_contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and a contact.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": "The ID of the related contact."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_contact"}, "model.hubspot.stg_hubspot__ticket_contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_contact_tmp"}, "model.hubspot.stg_hubspot__ticket_deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and a deal.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": "The ID of the related deal."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_deal"}, "model.hubspot.stg_hubspot__ticket_deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_deal_tmp"}, "model.hubspot.stg_hubspot__ticket_engagement": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_engagement"}, "model.hubspot.stg_hubspot__ticket_engagement_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_engagement_tmp"}, "model.hubspot.stg_hubspot__ticket_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline", "database": "postgres", "comment": "Each record represents a ticket pipeline.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "ticket_pipeline_id": {"type": "text", "index": 2, "name": "ticket_pipeline_id", "comment": "Reference to the pipeline."}, "is_ticket_pipeline_deleted": {"type": "boolean", "index": 3, "name": "is_ticket_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 5, "name": "is_active", "comment": "Boolean indicating whether the pipeline is active."}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "pipeline_label": {"type": "text", "index": 7, "name": "pipeline_label", "comment": "The human-readable label for the stage. The label is used when showing the stage in HubSpot."}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": "Reference to the object type."}, "ticket_pipeline_created_at": {"type": "timestamp without time zone", "index": 9, "name": "ticket_pipeline_created_at", "comment": "A timestamp representing when the record was created."}, "ticket_pipeline_updated_at": {"type": "timestamp without time zone", "index": 10, "name": "ticket_pipeline_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline"}, "model.hubspot.stg_hubspot__ticket_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage", "database": "postgres", "comment": "Each record represents a ticket pipeline stage.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_ticket_pipeline_stage_deleted": {"type": "boolean", "index": 2, "name": "is_ticket_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 4, "name": "is_active", "comment": "Boolean indicating whether the pipeline stage is active."}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": "Boolean indicating if the pipeline stage is closed."}, "pipeline_stage_label": {"type": "text", "index": 7, "name": "pipeline_stage_label", "comment": "The human-readable label for the stage. The label is used when showing the stage in HubSpot."}, "ticket_pipeline_id": {"type": "text", "index": 8, "name": "ticket_pipeline_id", "comment": "The ID of the pipeline."}, "ticket_pipeline_stage_id": {"type": "text", "index": 9, "name": "ticket_pipeline_stage_id", "comment": "The ID of the pipeline stage."}, "ticket_state": {"type": "text", "index": 10, "name": "ticket_state", "comment": "State of the ticket."}, "ticket_pipeline_stage_created_at": {"type": "timestamp without time zone", "index": 11, "name": "ticket_pipeline_stage_created_at", "comment": "A timestamp representing when the record was created."}, "ticket_pipeline_stage_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "ticket_pipeline_stage_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage"}, "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"stage_id": {"type": "character varying", "index": 1, "name": "stage_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": null}, "label": {"type": "text", "index": 7, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying", "index": 8, "name": "pipeline_id", "comment": null}, "ticket_state": {"type": "text", "index": 9, "name": "ticket_state", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 11, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"}, "model.hubspot.stg_hubspot__ticket_pipeline_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "object_type_id": {"type": "text", "index": 7, "name": "object_type_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_tmp"}, "model.hubspot.stg_hubspot__ticket_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history", "database": "postgres", "comment": "Each record represents a change to ticket record in Hubspot.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "text", "index": 2, "name": "_fivetran_start", "comment": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database."}, "_fivetran_end": {"type": "text", "index": 3, "name": "_fivetran_end", "comment": "The (UTC DATETIME) when a record became inactive in the source database."}, "ticket_id": {"type": "integer", "index": 4, "name": "ticket_id", "comment": "The ID of the related ticket record."}, "field_name": {"type": "text", "index": 5, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 9, "name": "new_value", "comment": "The new value of the field."}, "source_relation": {"type": "text", "index": 10, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_property_history"}, "model.hubspot.stg_hubspot__ticket_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": null}, "timestamp_instant": {"type": "timestamp without time zone", "index": 6, "name": "timestamp_instant", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "text", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "text", "index": 9, "name": "_fivetran_end", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_property_history_tmp"}, "model.hubspot.stg_hubspot__ticket_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": null}, "property_closed_date": {"type": "timestamp without time zone", "index": 4, "name": "property_closed_date", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_createdate", "comment": null}, "property_first_agent_reply_date": {"type": "timestamp without time zone", "index": 6, "name": "property_first_agent_reply_date", "comment": null}, "property_hs_pipeline": {"type": "character varying", "index": 7, "name": "property_hs_pipeline", "comment": null}, "property_hs_pipeline_stage": {"type": "character varying", "index": 8, "name": "property_hs_pipeline_stage", "comment": null}, "property_hs_ticket_category": {"type": "text", "index": 9, "name": "property_hs_ticket_category", "comment": null}, "property_hs_ticket_priority": {"type": "integer", "index": 10, "name": "property_hs_ticket_priority", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 11, "name": "property_hubspot_owner_id", "comment": null}, "property_subject": {"type": "text", "index": 12, "name": "property_subject", "comment": null}, "property_content": {"type": "text", "index": 13, "name": "property_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_tmp"}, "model.hubspot.stg_hubspot__users": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__users", "database": "postgres", "comment": "Table containing information about HubSpot users.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "user_id": {"type": "bigint", "index": 2, "name": "user_id", "comment": "Unique ID of the user."}, "primary_team_id": {"type": "integer", "index": 3, "name": "primary_team_id", "comment": "ID of the user's primary team."}, "role_id": {"type": "bigint", "index": 4, "name": "role_id", "comment": "ID of the role assigned to the user."}, "email": {"type": "text", "index": 5, "name": "email", "comment": "Email address of the user."}, "first_name": {"type": "text", "index": 6, "name": "first_name", "comment": "First name of the user."}, "last_name": {"type": "text", "index": 7, "name": "last_name", "comment": "Last name of the user."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__users"}, "model.hubspot.stg_hubspot__users_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__users_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "primary_team_id": {"type": "integer", "index": 2, "name": "primary_team_id", "comment": null}, "role_id": {"type": "bigint", "index": 3, "name": "role_id", "comment": null}, "email": {"type": "text", "index": 4, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 6, "name": "last_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__users_tmp"}}, "sources": {"source.hubspot.hubspot.company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_name": {"type": "text", "index": 4, "name": "property_name", "comment": null}, "property_description": {"type": "text", "index": 5, "name": "property_description", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_createdate", "comment": null}, "property_industry": {"type": "text", "index": 7, "name": "property_industry", "comment": null}, "property_address": {"type": "text", "index": 8, "name": "property_address", "comment": null}, "property_address_2": {"type": "text", "index": 9, "name": "property_address_2", "comment": null}, "property_city": {"type": "text", "index": 10, "name": "property_city", "comment": null}, "property_state": {"type": "text", "index": 11, "name": "property_state", "comment": null}, "property_country": {"type": "text", "index": 12, "name": "property_country", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 13, "name": "property_annualrevenue", "comment": null}, "property_hs_all-funky-a9384-syntax": {"type": "integer", "index": 14, "name": "property_hs_all-funky-a9384-syntax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company"}, "source.hubspot.hubspot.company_list": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "character varying", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "character varying", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "character varying", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "character varying", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "bigint", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company_list"}, "source.hubspot.hubspot.company_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "timestamp without time zone", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company_list_member"}, "source.hubspot.hubspot.company_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "integer", "index": 5, "name": "source_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company_property_history"}, "source.hubspot.hubspot.contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "property_email": {"type": "text", "index": 3, "name": "property_email", "comment": null}, "id": {"type": "integer", "index": 4, "name": "id", "comment": null}, "property_company": {"type": "text", "index": 5, "name": "property_company", "comment": null}, "property_firstname": {"type": "text", "index": 6, "name": "property_firstname", "comment": null}, "property_lastname": {"type": "text", "index": 7, "name": "property_lastname", "comment": null}, "property_email_1": {"type": "text", "index": 8, "name": "property_email_1", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 9, "name": "property_createdate", "comment": null}, "property_jobtitle": {"type": "integer", "index": 10, "name": "property_jobtitle", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 11, "name": "property_annualrevenue", "comment": null}, "property_hs_merged_object_ids": {"type": "text", "index": 12, "name": "property_hs_merged_object_ids", "comment": null}, "property_created_at": {"type": "timestamp without time zone", "index": 13, "name": "property_created_at", "comment": null}, "property_first_conversion_date": {"type": "timestamp without time zone", "index": 14, "name": "property_first_conversion_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact"}, "source.hubspot.hubspot.contact_form_submission": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_form_submission_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"timestamp": {"type": "timestamp without time zone", "index": 1, "name": "timestamp", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "conversion_id": {"type": "character varying", "index": 4, "name": "conversion_id", "comment": null}, "page_id": {"type": "integer", "index": 5, "name": "page_id", "comment": null}, "page_url": {"type": "text", "index": 6, "name": "page_url", "comment": null}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.contact_form_submission"}, "source.hubspot.hubspot.contact_list": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "integer", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "text", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "text", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "integer", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "text", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_list"}, "source.hubspot.hubspot.contact_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "text", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_list_member"}, "source.hubspot.hubspot.contact_merge_audit": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_merge_audit_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"canonical_vid": {"type": "integer", "index": 1, "name": "canonical_vid", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "vid_to_merge": {"type": "bigint", "index": 3, "name": "vid_to_merge", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "entity_id": {"type": "text", "index": 5, "name": "entity_id", "comment": null}, "first_name": {"type": "integer", "index": 6, "name": "first_name", "comment": null}, "last_name": {"type": "integer", "index": 7, "name": "last_name", "comment": null}, "num_properties_moved": {"type": "integer", "index": 8, "name": "num_properties_moved", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 9, "name": "timestamp", "comment": null}, "user_id": {"type": "integer", "index": 10, "name": "user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_merge_audit"}, "source.hubspot.hubspot.contact_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_property_history"}, "source.hubspot.hubspot.conversation_actor": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_actor_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "avatar": {"type": "character varying", "index": 2, "name": "avatar", "comment": null}, "email": {"type": "character varying", "index": 3, "name": "email", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_actor"}, "source.hubspot.hubspot.conversation_channel_account": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "channel_id": {"type": "character varying", "index": 2, "name": "channel_id", "comment": null}, "inbox_id": {"type": "character varying", "index": 3, "name": "inbox_id", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "authorized": {"type": "boolean", "index": 5, "name": "authorized", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 8, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 9, "name": "delivery_identifier_value", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.conversation_channel_account"}, "source.hubspot.hubspot.conversation_channel": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_channel"}, "source.hubspot.hubspot.conversation_inbox": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_inbox_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "active": {"type": "boolean", "index": 2, "name": "active", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 7, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_inbox"}, "source.hubspot.hubspot.conversation_message_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "thread_id": {"type": "character varying", "index": 2, "name": "thread_id", "comment": null}, "channel_account_id": {"type": "character varying", "index": 3, "name": "channel_account_id", "comment": null}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": null}, "from_inbox_id": {"type": "character varying", "index": 5, "name": "from_inbox_id", "comment": null}, "to_inbox_id": {"type": "character varying", "index": 6, "name": "to_inbox_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "assigned_from": {"type": "character varying", "index": 8, "name": "assigned_from", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "created_by": {"type": "character varying", "index": 10, "name": "created_by", "comment": null}, "direction": {"type": "character varying", "index": 11, "name": "direction", "comment": null}, "in_reply_to_id": {"type": "character varying", "index": 12, "name": "in_reply_to_id", "comment": null}, "new_status": {"type": "character varying", "index": 13, "name": "new_status", "comment": null}, "rich_text": {"type": "character varying", "index": 14, "name": "rich_text", "comment": null}, "subject": {"type": "character varying", "index": 15, "name": "subject", "comment": null}, "text": {"type": "character varying", "index": 16, "name": "text", "comment": null}, "truncation_status": {"type": "character varying", "index": 17, "name": "truncation_status", "comment": null}, "type": {"type": "character varying", "index": 18, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 19, "name": "updated_at", "comment": null}, "client_type": {"type": "character varying", "index": 20, "name": "client_type", "comment": null}, "status_type": {"type": "character varying", "index": 21, "name": "status_type", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 22, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 23, "name": "_fivetran_synced", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 25, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 26, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_message_history"}, "source.hubspot.hubspot.conversation_message_recipient": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_recipient_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "character varying", "index": 1, "name": "_fivetran_id", "comment": null}, "actor_id": {"type": "character varying", "index": 2, "name": "actor_id", "comment": null}, "message_id": {"type": "character varying", "index": 3, "name": "message_id", "comment": null}, "thread_id": {"type": "character varying", "index": 4, "name": "thread_id", "comment": null}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": null}, "recipient_field": {"type": "character varying", "index": 6, "name": "recipient_field", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 7, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 8, "name": "delivery_identifier_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.conversation_message_recipient"}, "source.hubspot.hubspot.conversation_thread": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_thread_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "inbox_id": {"type": "character varying", "index": 2, "name": "inbox_id", "comment": null}, "associated_contact_id": {"type": "character varying", "index": 3, "name": "associated_contact_id", "comment": null}, "associated_ticket_id": {"type": "character varying", "index": 4, "name": "associated_ticket_id", "comment": null}, "original_channel_account_id": {"type": "character varying", "index": 5, "name": "original_channel_account_id", "comment": null}, "original_channel_id": {"type": "character varying", "index": 6, "name": "original_channel_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "closed_at": {"type": "timestamp without time zone", "index": 8, "name": "closed_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "latest_message_received_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "latest_message_received_timestamp", "comment": null}, "latest_message_sent_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "latest_message_sent_timestamp", "comment": null}, "latest_message_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_timestamp", "comment": null}, "spam": {"type": "character varying", "index": 13, "name": "spam", "comment": null}, "status": {"type": "character varying", "index": 14, "name": "status", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 15, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_thread"}, "source.hubspot.hubspot.deal_company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "integer", "index": 1, "name": "company_id", "comment": null}, "deal_id": {"type": "integer", "index": 2, "name": "deal_id", "comment": null}, "type_id": {"type": "integer", "index": 3, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_company"}, "source.hubspot.hubspot.deal_contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 5, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_contact"}, "source.hubspot.hubspot.deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "deal_pipeline_id": {"type": "character varying(100)", "index": 3, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "character varying(100)", "index": 4, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 5, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 6, "name": "portal_id", "comment": null}, "property_dealname": {"type": "text", "index": 7, "name": "property_dealname", "comment": null}, "property_description": {"type": "integer", "index": 8, "name": "property_description", "comment": null}, "property_amount": {"type": "integer", "index": 9, "name": "property_amount", "comment": null}, "property_closedate": {"type": "timestamp without time zone", "index": 10, "name": "property_closedate", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 11, "name": "property_createdate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal"}, "source.hubspot.hubspot.deal_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying(100)", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 8, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_pipeline"}, "source.hubspot.hubspot.deal_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 3, "name": "active", "comment": null}, "closed_won": {"type": "boolean", "index": 4, "name": "closed_won", "comment": null}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": null}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": null}, "probability": {"type": "double precision", "index": 7, "name": "probability", "comment": null}, "stage_id": {"type": "character varying(100)", "index": 8, "name": "stage_id", "comment": null}, "label": {"type": "text", "index": 9, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying(100)", "index": 10, "name": "pipeline_id", "comment": null}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 12, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_pipeline_stage"}, "source.hubspot.hubspot.deal_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "source_id": {"type": "text", "index": 6, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_property_history"}, "source.hubspot.hubspot.deal_stage": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_start": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_start", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 3, "name": "_fivetran_active", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "date_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_entered", "comment": null}, "source": {"type": "text", "index": 7, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 8, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 9, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_stage"}, "source.hubspot.hubspot.email_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "content_id": {"type": "bigint", "index": 4, "name": "content_id", "comment": null}, "num_included": {"type": "integer", "index": 5, "name": "num_included", "comment": null}, "num_queued": {"type": "integer", "index": 6, "name": "num_queued", "comment": null}, "sub_type": {"type": "integer", "index": 7, "name": "sub_type", "comment": null}, "type": {"type": "text", "index": 8, "name": "type", "comment": null}, "app_name": {"type": "text", "index": 9, "name": "app_name", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "subject": {"type": "text", "index": 11, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_campaign"}, "source.hubspot.hubspot.email_event_bounce": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_bounce_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 3, "name": "category", "comment": null}, "status": {"type": "integer", "index": 4, "name": "status", "comment": null}, "response": {"type": "text", "index": 5, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_bounce"}, "source.hubspot.hubspot.email_event_click": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_click_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "referer": {"type": "integer", "index": 3, "name": "referer", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_click"}, "source.hubspot.hubspot.email_event": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "caused_by_created": {"type": "timestamp without time zone", "index": 4, "name": "caused_by_created", "comment": null}, "caused_by_id": {"type": "integer", "index": 5, "name": "caused_by_id", "comment": null}, "created": {"type": "timestamp without time zone", "index": 6, "name": "created", "comment": null}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": null}, "obsoleted_by_created": {"type": "timestamp without time zone", "index": 8, "name": "obsoleted_by_created", "comment": null}, "obsoleted_by_id": {"type": "integer", "index": 9, "name": "obsoleted_by_id", "comment": null}, "portal_id": {"type": "integer", "index": 10, "name": "portal_id", "comment": null}, "sent_by_created": {"type": "timestamp without time zone", "index": 11, "name": "sent_by_created", "comment": null}, "sent_by_id": {"type": "text", "index": 12, "name": "sent_by_id", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "filtered_event": {"type": "boolean", "index": 14, "name": "filtered_event", "comment": null}, "recipient": {"type": "text", "index": 15, "name": "recipient", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event"}, "source.hubspot.hubspot.email_event_deferred": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_deferred_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "attempt": {"type": "integer", "index": 3, "name": "attempt", "comment": null}, "response": {"type": "integer", "index": 4, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_deferred"}, "source.hubspot.hubspot.email_event_delivered": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_delivered_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "response": {"type": "text", "index": 3, "name": "response", "comment": null}, "smtp_id": {"type": "text", "index": 4, "name": "smtp_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_delivered"}, "source.hubspot.hubspot.email_event_dropped": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_dropped_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "drop_reason": {"type": "text", "index": 3, "name": "drop_reason", "comment": null}, "bcc": {"type": "text", "index": 4, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 5, "name": "cc", "comment": null}, "drop_message": {"type": "text", "index": 6, "name": "drop_message", "comment": null}, "from": {"type": "text", "index": 7, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 8, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 9, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_dropped"}, "source.hubspot.hubspot.email_event_forward": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_forward_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_forward"}, "source.hubspot.hubspot.email_event_open": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_open_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "duration": {"type": "integer", "index": 3, "name": "duration", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 6, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_open"}, "source.hubspot.hubspot.email_event_print": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_print_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_print"}, "source.hubspot.hubspot.email_event_sent": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_sent_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bcc": {"type": "text", "index": 3, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 4, "name": "cc", "comment": null}, "from": {"type": "text", "index": 5, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 6, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_sent"}, "source.hubspot.hubspot.email_event_spam_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_spam_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "ip_address": {"type": "integer", "index": 3, "name": "ip_address", "comment": null}, "user_agent": {"type": "integer", "index": 4, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_spam_report"}, "source.hubspot.hubspot.email_event_status_change": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_status_change_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bounced": {"type": "integer", "index": 3, "name": "bounced", "comment": null}, "portal_subscription_status": {"type": "text", "index": 4, "name": "portal_subscription_status", "comment": null}, "requested_by": {"type": "integer", "index": 5, "name": "requested_by", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "subscriptions": {"type": "text", "index": 7, "name": "subscriptions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_status_change"}, "source.hubspot.hubspot.engagement_call": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_call_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_call"}, "source.hubspot.hubspot.engagement_communication": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_communication_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_communication"}, "source.hubspot.hubspot.engagement_company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_company"}, "source.hubspot.hubspot.engagement_contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_contact"}, "source.hubspot.hubspot.engagement": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "type": {"type": "text", "index": 2, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement"}, "source.hubspot.hubspot.engagement_deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_deal"}, "source.hubspot.hubspot.engagement_email": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_email_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_all_owner_ids": {"type": "integer", "index": 4, "name": "property_hs_all_owner_ids", "comment": null}, "property_hs_all_team_ids": {"type": "integer", "index": 5, "name": "property_hs_all_team_ids", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_hs_createdate", "comment": null}, "property_hs_email_subject": {"type": "text", "index": 7, "name": "property_hs_email_subject", "comment": null}, "property_hs_email_text": {"type": "text", "index": 8, "name": "property_hs_email_text", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 9, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_modified_by": {"type": "integer", "index": 10, "name": "property_hs_modified_by", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 12, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 13, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_email"}, "source.hubspot.hubspot.engagement_meeting": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_meeting_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_from_link_id": {"type": "integer", "index": 3, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 4, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 5, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 8, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 9, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 10, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 11, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 12, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 13, "name": "title", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_meeting"}, "source.hubspot.hubspot.engagement_note": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_note_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_body_preview": {"type": "text", "index": 4, "name": "property_hs_body_preview", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_createdate", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 6, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_note_body": {"type": "text", "index": 7, "name": "property_hs_note_body", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 9, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 10, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 11, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_note"}, "source.hubspot.hubspot.engagement_task": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_task_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_object_id": {"type": "bigint", "index": 5, "name": "property_hs_object_id", "comment": null}, "property_hs_task_type": {"type": "text", "index": 6, "name": "property_hs_task_type", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 8, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 9, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 10, "name": "type", "comment": null}, "task_type": {"type": "text", "index": 11, "name": "task_type", "comment": null}, "property_hs_engagement_source": {"type": "text", "index": 12, "name": "property_hs_engagement_source", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_task"}, "source.hubspot.hubspot.form": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "form_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"guid": {"type": "character varying", "index": 1, "name": "guid", "comment": null}, "action": {"type": "text", "index": 2, "name": "action", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "css_class": {"type": "text", "index": 4, "name": "css_class", "comment": null}, "follow_up_id": {"type": "integer", "index": 5, "name": "follow_up_id", "comment": null}, "form_type": {"type": "text", "index": 6, "name": "form_type", "comment": null}, "lead_nurturing_campaign_id": {"type": "integer", "index": 7, "name": "lead_nurturing_campaign_id", "comment": null}, "method": {"type": "text", "index": 8, "name": "method", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "notify_recipients": {"type": "boolean", "index": 10, "name": "notify_recipients", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "redirect": {"type": "text", "index": 12, "name": "redirect", "comment": null}, "submit_text": {"type": "text", "index": 13, "name": "submit_text", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.form"}, "source.hubspot.hubspot.marketing_event_custom_property": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_custom_property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"marketing_event_id": {"type": "bigint", "index": 1, "name": "marketing_event_id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "value": {"type": "character varying", "index": 3, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.marketing_event_custom_property"}, "source.hubspot.hubspot.marketing_event": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "app_id": {"type": "character varying", "index": 2, "name": "app_id", "comment": null}, "app_name": {"type": "character varying", "index": 3, "name": "app_name", "comment": null}, "attendees": {"type": "bigint", "index": 4, "name": "attendees", "comment": null}, "cancellations": {"type": "bigint", "index": 5, "name": "cancellations", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 7, "name": "end_date_time", "comment": null}, "event_cancelled": {"type": "boolean", "index": 8, "name": "event_cancelled", "comment": null}, "event_completed": {"type": "boolean", "index": 9, "name": "event_completed", "comment": null}, "event_description": {"type": "character varying", "index": 10, "name": "event_description", "comment": null}, "event_name": {"type": "character varying", "index": 11, "name": "event_name", "comment": null}, "event_organizer": {"type": "character varying", "index": 12, "name": "event_organizer", "comment": null}, "event_status": {"type": "character varying", "index": 13, "name": "event_status", "comment": null}, "event_type": {"type": "character varying", "index": 14, "name": "event_type", "comment": null}, "event_url": {"type": "character varying", "index": 15, "name": "event_url", "comment": null}, "external_event_id": {"type": "character varying", "index": 16, "name": "external_event_id", "comment": null}, "no_shows": {"type": "bigint", "index": 17, "name": "no_shows", "comment": null}, "registrants": {"type": "bigint", "index": 18, "name": "registrants", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 19, "name": "start_date_time", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 20, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 21, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 22, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.marketing_event"}, "source.hubspot.hubspot.marketing_event_list": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "created_by_id": {"type": "character varying", "index": 3, "name": "created_by_id", "comment": null}, "updated_by_id": {"type": "character varying", "index": 4, "name": "updated_by_id", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 5, "name": "filters_updated_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "processing_status": {"type": "character varying", "index": 7, "name": "processing_status", "comment": null}, "deleted_at": {"type": "timestamp without time zone", "index": 8, "name": "deleted_at", "comment": null}, "list_version": {"type": "bigint", "index": 9, "name": "list_version", "comment": null}, "object_type_id": {"type": "character varying", "index": 10, "name": "object_type_id", "comment": null}, "size": {"type": "bigint", "index": 11, "name": "size", "comment": null}, "name": {"type": "character varying", "index": 12, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 13, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 14, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.marketing_event_list"}, "source.hubspot.hubspot.marketing_event_participant": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_participant_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "properties_occurred_at": {"type": "timestamp without time zone", "index": 5, "name": "properties_occurred_at", "comment": null}, "properties_attendance_percentage": {"type": "double precision", "index": 6, "name": "properties_attendance_percentage", "comment": null}, "properties_attendance_state": {"type": "character varying", "index": 7, "name": "properties_attendance_state", "comment": null}, "properties_attendance_duration_seconds": {"type": "bigint", "index": 8, "name": "properties_attendance_duration_seconds", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.marketing_event_participant"}, "source.hubspot.hubspot.merged_deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "merged_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "merged_deal_id": {"type": "bigint", "index": 2, "name": "merged_deal_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.merged_deal"}, "source.hubspot.hubspot.owner": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 6, "name": "updated_at", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 9, "name": "last_name", "comment": null}, "active_user_id": {"type": "integer", "index": 10, "name": "active_user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.owner"}, "source.hubspot.hubspot.owner_team": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": null}, "is_team_primary": {"type": "boolean", "index": 3, "name": "is_team_primary", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.owner_team"}, "source.hubspot.hubspot.property": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "calculated": {"type": "boolean", "index": 3, "name": "calculated", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "description": {"type": "text", "index": 5, "name": "description", "comment": null}, "field_type": {"type": "text", "index": 6, "name": "field_type", "comment": null}, "group_name": {"type": "text", "index": 7, "name": "group_name", "comment": null}, "hubspot_defined": {"type": "boolean", "index": 8, "name": "hubspot_defined", "comment": null}, "hubspot_object": {"type": "text", "index": 9, "name": "hubspot_object", "comment": null}, "label": {"type": "text", "index": 10, "name": "label", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "show_currency_symbol": {"type": "boolean", "index": 12, "name": "show_currency_symbol", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.property"}, "source.hubspot.hubspot.property_option": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_option_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"label": {"type": "text", "index": 1, "name": "label", "comment": null}, "property_id": {"type": "text", "index": 2, "name": "property_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "display_order": {"type": "integer", "index": 4, "name": "display_order", "comment": null}, "hidden": {"type": "boolean", "index": 5, "name": "hidden", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "hubspot_object": {"type": "text", "index": 7, "name": "hubspot_object", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.property_option"}, "source.hubspot.hubspot.role": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "role_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "requires_billing_write": {"type": "boolean", "index": 3, "name": "requires_billing_write", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.role"}, "source.hubspot.hubspot.submission_response": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "submission_response_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"conversion_id": {"type": "character varying", "index": 1, "name": "conversion_id", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "field_name": {"type": "character varying", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "submitted_at": {"type": "bigint", "index": 5, "name": "submitted_at", "comment": null}, "page_url": {"type": "character varying", "index": 6, "name": "page_url", "comment": null}, "object_type_id": {"type": "character varying", "index": 7, "name": "object_type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.submission_response"}, "source.hubspot.hubspot.team": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.team"}, "source.hubspot.hubspot.team_user": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_user_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"user_id": {"type": "integer", "index": 1, "name": "user_id", "comment": null}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": null}, "is_secondary_user": {"type": "boolean", "index": 3, "name": "is_secondary_user", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.team_user"}, "source.hubspot.hubspot.ticket_company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_company"}, "source.hubspot.hubspot.ticket_contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_contact"}, "source.hubspot.hubspot.ticket": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": null}, "property_closed_date": {"type": "timestamp without time zone", "index": 4, "name": "property_closed_date", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_createdate", "comment": null}, "property_first_agent_reply_date": {"type": "timestamp without time zone", "index": 6, "name": "property_first_agent_reply_date", "comment": null}, "property_hs_pipeline": {"type": "character varying", "index": 7, "name": "property_hs_pipeline", "comment": null}, "property_hs_pipeline_stage": {"type": "character varying", "index": 8, "name": "property_hs_pipeline_stage", "comment": null}, "property_hs_ticket_category": {"type": "text", "index": 9, "name": "property_hs_ticket_category", "comment": null}, "property_hs_ticket_priority": {"type": "integer", "index": 10, "name": "property_hs_ticket_priority", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 11, "name": "property_hubspot_owner_id", "comment": null}, "property_subject": {"type": "text", "index": 12, "name": "property_subject", "comment": null}, "property_content": {"type": "text", "index": 13, "name": "property_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket"}, "source.hubspot.hubspot.ticket_deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_deal"}, "source.hubspot.hubspot.ticket_engagement": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_engagement"}, "source.hubspot.hubspot.ticket_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "object_type_id": {"type": "text", "index": 7, "name": "object_type_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_pipeline"}, "source.hubspot.hubspot.ticket_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"stage_id": {"type": "character varying", "index": 1, "name": "stage_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": null}, "label": {"type": "text", "index": 7, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying", "index": 8, "name": "pipeline_id", "comment": null}, "ticket_state": {"type": "text", "index": 9, "name": "ticket_state", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 11, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_pipeline_stage"}, "source.hubspot.hubspot.ticket_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": null}, "timestamp_instant": {"type": "timestamp without time zone", "index": 6, "name": "timestamp_instant", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "text", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "text", "index": 9, "name": "_fivetran_end", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_property_history"}, "source.hubspot.hubspot.users": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "users_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "primary_team_id": {"type": "integer", "index": 2, "name": "primary_team_id", "comment": null}, "role_id": {"type": "bigint", "index": 3, "name": "role_id", "comment": null}, "email": {"type": "text", "index": 4, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 6, "name": "last_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.users"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.12.0", "generated_at": "2026-08-10T21:50:21.561928Z", "invocation_id": "ac7663b1-c1c5-41ad-86ed-aabf1cabdba9", "invocation_started_at": "2026-08-10T21:50:11.288358Z", "env": {}}, "nodes": {"seed.hubspot_integration_tests.company_data_postgres": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_name": {"type": "text", "index": 4, "name": "property_name", "comment": null}, "property_description": {"type": "text", "index": 5, "name": "property_description", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_createdate", "comment": null}, "property_industry": {"type": "text", "index": 7, "name": "property_industry", "comment": null}, "property_address": {"type": "text", "index": 8, "name": "property_address", "comment": null}, "property_address_2": {"type": "text", "index": 9, "name": "property_address_2", "comment": null}, "property_city": {"type": "text", "index": 10, "name": "property_city", "comment": null}, "property_state": {"type": "text", "index": 11, "name": "property_state", "comment": null}, "property_country": {"type": "text", "index": 12, "name": "property_country", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 13, "name": "property_annualrevenue", "comment": null}, "property_hs_all-funky-a9384-syntax": {"type": "integer", "index": 14, "name": "property_hs_all-funky-a9384-syntax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_data_postgres"}, "seed.hubspot_integration_tests.company_list_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "character varying", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "character varying", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "character varying", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "character varying", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "bigint", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_list_data"}, "seed.hubspot_integration_tests.company_list_member_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "timestamp without time zone", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_list_member_data"}, "seed.hubspot_integration_tests.company_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "integer", "index": 5, "name": "source_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.company_property_history_data"}, "seed.hubspot_integration_tests.contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "property_email": {"type": "text", "index": 3, "name": "property_email", "comment": null}, "id": {"type": "integer", "index": 4, "name": "id", "comment": null}, "property_company": {"type": "text", "index": 5, "name": "property_company", "comment": null}, "property_firstname": {"type": "text", "index": 6, "name": "property_firstname", "comment": null}, "property_lastname": {"type": "text", "index": 7, "name": "property_lastname", "comment": null}, "property_email_1": {"type": "text", "index": 8, "name": "property_email_1", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 9, "name": "property_createdate", "comment": null}, "property_jobtitle": {"type": "integer", "index": 10, "name": "property_jobtitle", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 11, "name": "property_annualrevenue", "comment": null}, "property_hs_merged_object_ids": {"type": "text", "index": 12, "name": "property_hs_merged_object_ids", "comment": null}, "property_created_at": {"type": "timestamp without time zone", "index": 13, "name": "property_created_at", "comment": null}, "property_first_conversion_date": {"type": "timestamp without time zone", "index": 14, "name": "property_first_conversion_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_data"}, "seed.hubspot_integration_tests.contact_form_submission_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_form_submission_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"timestamp": {"type": "timestamp without time zone", "index": 1, "name": "timestamp", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "conversion_id": {"type": "character varying", "index": 4, "name": "conversion_id", "comment": null}, "page_id": {"type": "integer", "index": 5, "name": "page_id", "comment": null}, "page_url": {"type": "text", "index": 6, "name": "page_url", "comment": null}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.contact_form_submission_data"}, "seed.hubspot_integration_tests.contact_list_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "integer", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "text", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "text", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "integer", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "text", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_list_data"}, "seed.hubspot_integration_tests.contact_list_member_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "text", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_list_member_data"}, "seed.hubspot_integration_tests.contact_merge_audit_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_merge_audit_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"canonical_vid": {"type": "integer", "index": 1, "name": "canonical_vid", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "vid_to_merge": {"type": "bigint", "index": 3, "name": "vid_to_merge", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "entity_id": {"type": "text", "index": 5, "name": "entity_id", "comment": null}, "first_name": {"type": "integer", "index": 6, "name": "first_name", "comment": null}, "last_name": {"type": "integer", "index": 7, "name": "last_name", "comment": null}, "num_properties_moved": {"type": "integer", "index": 8, "name": "num_properties_moved", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 9, "name": "timestamp", "comment": null}, "user_id": {"type": "integer", "index": 10, "name": "user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_merge_audit_data"}, "seed.hubspot_integration_tests.contact_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.contact_property_history_data"}, "seed.hubspot_integration_tests.conversation_actor_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_actor_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "avatar": {"type": "character varying", "index": 2, "name": "avatar", "comment": null}, "email": {"type": "character varying", "index": 3, "name": "email", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_actor_data"}, "seed.hubspot_integration_tests.conversation_channel_account_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "channel_id": {"type": "character varying", "index": 2, "name": "channel_id", "comment": null}, "inbox_id": {"type": "character varying", "index": 3, "name": "inbox_id", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "authorized": {"type": "boolean", "index": 5, "name": "authorized", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 8, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 9, "name": "delivery_identifier_value", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.conversation_channel_account_data"}, "seed.hubspot_integration_tests.conversation_channel_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_channel_data"}, "seed.hubspot_integration_tests.conversation_inbox_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_inbox_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "active": {"type": "boolean", "index": 2, "name": "active", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 7, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_inbox_data"}, "seed.hubspot_integration_tests.conversation_message_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "thread_id": {"type": "character varying", "index": 2, "name": "thread_id", "comment": null}, "channel_account_id": {"type": "character varying", "index": 3, "name": "channel_account_id", "comment": null}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": null}, "from_inbox_id": {"type": "character varying", "index": 5, "name": "from_inbox_id", "comment": null}, "to_inbox_id": {"type": "character varying", "index": 6, "name": "to_inbox_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "assigned_from": {"type": "character varying", "index": 8, "name": "assigned_from", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "created_by": {"type": "character varying", "index": 10, "name": "created_by", "comment": null}, "direction": {"type": "character varying", "index": 11, "name": "direction", "comment": null}, "in_reply_to_id": {"type": "character varying", "index": 12, "name": "in_reply_to_id", "comment": null}, "new_status": {"type": "character varying", "index": 13, "name": "new_status", "comment": null}, "rich_text": {"type": "character varying", "index": 14, "name": "rich_text", "comment": null}, "subject": {"type": "character varying", "index": 15, "name": "subject", "comment": null}, "text": {"type": "character varying", "index": 16, "name": "text", "comment": null}, "truncation_status": {"type": "character varying", "index": 17, "name": "truncation_status", "comment": null}, "type": {"type": "character varying", "index": 18, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 19, "name": "updated_at", "comment": null}, "client_type": {"type": "character varying", "index": 20, "name": "client_type", "comment": null}, "status_type": {"type": "character varying", "index": 21, "name": "status_type", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 22, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 23, "name": "_fivetran_synced", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 25, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 26, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_message_history_data"}, "seed.hubspot_integration_tests.conversation_message_recipient_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_recipient_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "character varying", "index": 1, "name": "_fivetran_id", "comment": null}, "actor_id": {"type": "character varying", "index": 2, "name": "actor_id", "comment": null}, "message_id": {"type": "character varying", "index": 3, "name": "message_id", "comment": null}, "thread_id": {"type": "character varying", "index": 4, "name": "thread_id", "comment": null}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": null}, "recipient_field": {"type": "character varying", "index": 6, "name": "recipient_field", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 7, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 8, "name": "delivery_identifier_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.conversation_message_recipient_data"}, "seed.hubspot_integration_tests.conversation_thread_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_thread_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "inbox_id": {"type": "character varying", "index": 2, "name": "inbox_id", "comment": null}, "associated_contact_id": {"type": "character varying", "index": 3, "name": "associated_contact_id", "comment": null}, "associated_ticket_id": {"type": "character varying", "index": 4, "name": "associated_ticket_id", "comment": null}, "original_channel_account_id": {"type": "character varying", "index": 5, "name": "original_channel_account_id", "comment": null}, "original_channel_id": {"type": "character varying", "index": 6, "name": "original_channel_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "closed_at": {"type": "timestamp without time zone", "index": 8, "name": "closed_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "latest_message_received_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "latest_message_received_timestamp", "comment": null}, "latest_message_sent_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "latest_message_sent_timestamp", "comment": null}, "latest_message_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_timestamp", "comment": null}, "spam": {"type": "character varying", "index": 13, "name": "spam", "comment": null}, "status": {"type": "character varying", "index": 14, "name": "status", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 15, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.conversation_thread_data"}, "seed.hubspot_integration_tests.deal_company_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "integer", "index": 1, "name": "company_id", "comment": null}, "deal_id": {"type": "integer", "index": 2, "name": "deal_id", "comment": null}, "type_id": {"type": "integer", "index": 3, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_company_data"}, "seed.hubspot_integration_tests.deal_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 5, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_contact_data"}, "seed.hubspot_integration_tests.deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "deal_pipeline_id": {"type": "character varying(100)", "index": 3, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "character varying(100)", "index": 4, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 5, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 6, "name": "portal_id", "comment": null}, "property_dealname": {"type": "text", "index": 7, "name": "property_dealname", "comment": null}, "property_description": {"type": "integer", "index": 8, "name": "property_description", "comment": null}, "property_amount": {"type": "integer", "index": 9, "name": "property_amount", "comment": null}, "property_closedate": {"type": "timestamp without time zone", "index": 10, "name": "property_closedate", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 11, "name": "property_createdate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_data"}, "seed.hubspot_integration_tests.deal_pipeline_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying(100)", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 8, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_pipeline_data"}, "seed.hubspot_integration_tests.deal_pipeline_stage_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 3, "name": "active", "comment": null}, "closed_won": {"type": "boolean", "index": 4, "name": "closed_won", "comment": null}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": null}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": null}, "probability": {"type": "double precision", "index": 7, "name": "probability", "comment": null}, "stage_id": {"type": "character varying(100)", "index": 8, "name": "stage_id", "comment": null}, "label": {"type": "text", "index": 9, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying(100)", "index": 10, "name": "pipeline_id", "comment": null}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 12, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_pipeline_stage_data"}, "seed.hubspot_integration_tests.deal_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "source_id": {"type": "text", "index": 6, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_property_history_data"}, "seed.hubspot_integration_tests.deal_stage_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_start": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_start", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 3, "name": "_fivetran_active", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "date_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_entered", "comment": null}, "source": {"type": "text", "index": 7, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 8, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 9, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.deal_stage_data"}, "seed.hubspot_integration_tests.email_campaign_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "content_id": {"type": "bigint", "index": 4, "name": "content_id", "comment": null}, "num_included": {"type": "integer", "index": 5, "name": "num_included", "comment": null}, "num_queued": {"type": "integer", "index": 6, "name": "num_queued", "comment": null}, "sub_type": {"type": "integer", "index": 7, "name": "sub_type", "comment": null}, "type": {"type": "text", "index": 8, "name": "type", "comment": null}, "app_name": {"type": "text", "index": 9, "name": "app_name", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "subject": {"type": "text", "index": 11, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_campaign_data"}, "seed.hubspot_integration_tests.email_event_bounce_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_bounce_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 3, "name": "category", "comment": null}, "status": {"type": "integer", "index": 4, "name": "status", "comment": null}, "response": {"type": "text", "index": 5, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_bounce_data"}, "seed.hubspot_integration_tests.email_event_click_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_click_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "referer": {"type": "integer", "index": 3, "name": "referer", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_click_data"}, "seed.hubspot_integration_tests.email_event_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "caused_by_created": {"type": "timestamp without time zone", "index": 4, "name": "caused_by_created", "comment": null}, "caused_by_id": {"type": "integer", "index": 5, "name": "caused_by_id", "comment": null}, "created": {"type": "timestamp without time zone", "index": 6, "name": "created", "comment": null}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": null}, "obsoleted_by_created": {"type": "timestamp without time zone", "index": 8, "name": "obsoleted_by_created", "comment": null}, "obsoleted_by_id": {"type": "integer", "index": 9, "name": "obsoleted_by_id", "comment": null}, "portal_id": {"type": "integer", "index": 10, "name": "portal_id", "comment": null}, "sent_by_created": {"type": "timestamp without time zone", "index": 11, "name": "sent_by_created", "comment": null}, "sent_by_id": {"type": "text", "index": 12, "name": "sent_by_id", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "filtered_event": {"type": "boolean", "index": 14, "name": "filtered_event", "comment": null}, "recipient": {"type": "text", "index": 15, "name": "recipient", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_data"}, "seed.hubspot_integration_tests.email_event_deferred_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_deferred_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "attempt": {"type": "integer", "index": 3, "name": "attempt", "comment": null}, "response": {"type": "integer", "index": 4, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_deferred_data"}, "seed.hubspot_integration_tests.email_event_delivered_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_delivered_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "response": {"type": "text", "index": 3, "name": "response", "comment": null}, "smtp_id": {"type": "text", "index": 4, "name": "smtp_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_delivered_data"}, "seed.hubspot_integration_tests.email_event_dropped_data_postgres": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_dropped_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "drop_reason": {"type": "text", "index": 3, "name": "drop_reason", "comment": null}, "bcc": {"type": "text", "index": 4, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 5, "name": "cc", "comment": null}, "drop_message": {"type": "text", "index": 6, "name": "drop_message", "comment": null}, "from": {"type": "text", "index": 7, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 8, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 9, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data_postgres"}, "seed.hubspot_integration_tests.email_event_forward_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_forward_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_forward_data"}, "seed.hubspot_integration_tests.email_event_open_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_open_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "duration": {"type": "integer", "index": 3, "name": "duration", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 6, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_open_data"}, "seed.hubspot_integration_tests.email_event_print_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_print_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_print_data"}, "seed.hubspot_integration_tests.email_event_sent_data_postgres": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_sent_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bcc": {"type": "text", "index": 3, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 4, "name": "cc", "comment": null}, "from": {"type": "text", "index": 5, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 6, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_sent_data_postgres"}, "seed.hubspot_integration_tests.email_event_spam_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_spam_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "ip_address": {"type": "integer", "index": 3, "name": "ip_address", "comment": null}, "user_agent": {"type": "integer", "index": 4, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_spam_report_data"}, "seed.hubspot_integration_tests.email_event_status_change_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_status_change_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bounced": {"type": "integer", "index": 3, "name": "bounced", "comment": null}, "portal_subscription_status": {"type": "text", "index": 4, "name": "portal_subscription_status", "comment": null}, "requested_by": {"type": "integer", "index": 5, "name": "requested_by", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "subscriptions": {"type": "text", "index": 7, "name": "subscriptions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.email_event_status_change_data"}, "seed.hubspot_integration_tests.engagement_call_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_call_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_call_data"}, "seed.hubspot_integration_tests.engagement_communication_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_communication_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_communication_data"}, "seed.hubspot_integration_tests.engagement_company_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_company_data"}, "seed.hubspot_integration_tests.engagement_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_contact_data"}, "seed.hubspot_integration_tests.engagement_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "type": {"type": "text", "index": 2, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_data"}, "seed.hubspot_integration_tests.engagement_deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_deal_data"}, "seed.hubspot_integration_tests.engagement_email_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_email_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_all_owner_ids": {"type": "integer", "index": 4, "name": "property_hs_all_owner_ids", "comment": null}, "property_hs_all_team_ids": {"type": "integer", "index": 5, "name": "property_hs_all_team_ids", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_hs_createdate", "comment": null}, "property_hs_email_subject": {"type": "text", "index": 7, "name": "property_hs_email_subject", "comment": null}, "property_hs_email_text": {"type": "text", "index": 8, "name": "property_hs_email_text", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 9, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_modified_by": {"type": "integer", "index": 10, "name": "property_hs_modified_by", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 12, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 13, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_email_data"}, "seed.hubspot_integration_tests.engagement_meeting_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_meeting_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_from_link_id": {"type": "integer", "index": 3, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 4, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 5, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 8, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 9, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 10, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 11, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 12, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 13, "name": "title", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_meeting_data"}, "seed.hubspot_integration_tests.engagement_note_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_note_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_body_preview": {"type": "text", "index": 4, "name": "property_hs_body_preview", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_createdate", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 6, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_note_body": {"type": "text", "index": 7, "name": "property_hs_note_body", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 9, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 10, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 11, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_note_data"}, "seed.hubspot_integration_tests.engagement_task_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_task_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_object_id": {"type": "bigint", "index": 5, "name": "property_hs_object_id", "comment": null}, "property_hs_task_type": {"type": "text", "index": 6, "name": "property_hs_task_type", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 8, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 9, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 10, "name": "type", "comment": null}, "task_type": {"type": "text", "index": 11, "name": "task_type", "comment": null}, "property_hs_engagement_source": {"type": "text", "index": 12, "name": "property_hs_engagement_source", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.engagement_task_data"}, "seed.hubspot_integration_tests.form_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "form_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"guid": {"type": "character varying", "index": 1, "name": "guid", "comment": null}, "action": {"type": "text", "index": 2, "name": "action", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "css_class": {"type": "text", "index": 4, "name": "css_class", "comment": null}, "follow_up_id": {"type": "integer", "index": 5, "name": "follow_up_id", "comment": null}, "form_type": {"type": "text", "index": 6, "name": "form_type", "comment": null}, "lead_nurturing_campaign_id": {"type": "integer", "index": 7, "name": "lead_nurturing_campaign_id", "comment": null}, "method": {"type": "text", "index": 8, "name": "method", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "notify_recipients": {"type": "boolean", "index": 10, "name": "notify_recipients", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "redirect": {"type": "text", "index": 12, "name": "redirect", "comment": null}, "submit_text": {"type": "text", "index": 13, "name": "submit_text", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.form_data"}, "seed.hubspot_integration_tests.marketing_event_custom_property_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_custom_property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"marketing_event_id": {"type": "bigint", "index": 1, "name": "marketing_event_id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "value": {"type": "character varying", "index": 3, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.marketing_event_custom_property_data"}, "seed.hubspot_integration_tests.marketing_event_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "app_id": {"type": "character varying", "index": 2, "name": "app_id", "comment": null}, "app_name": {"type": "character varying", "index": 3, "name": "app_name", "comment": null}, "attendees": {"type": "bigint", "index": 4, "name": "attendees", "comment": null}, "cancellations": {"type": "bigint", "index": 5, "name": "cancellations", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 7, "name": "end_date_time", "comment": null}, "event_cancelled": {"type": "boolean", "index": 8, "name": "event_cancelled", "comment": null}, "event_completed": {"type": "boolean", "index": 9, "name": "event_completed", "comment": null}, "event_description": {"type": "character varying", "index": 10, "name": "event_description", "comment": null}, "event_name": {"type": "character varying", "index": 11, "name": "event_name", "comment": null}, "event_organizer": {"type": "character varying", "index": 12, "name": "event_organizer", "comment": null}, "event_status": {"type": "character varying", "index": 13, "name": "event_status", "comment": null}, "event_type": {"type": "character varying", "index": 14, "name": "event_type", "comment": null}, "event_url": {"type": "character varying", "index": 15, "name": "event_url", "comment": null}, "external_event_id": {"type": "character varying", "index": 16, "name": "external_event_id", "comment": null}, "no_shows": {"type": "bigint", "index": 17, "name": "no_shows", "comment": null}, "registrants": {"type": "bigint", "index": 18, "name": "registrants", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 19, "name": "start_date_time", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 20, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 21, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 22, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.marketing_event_data"}, "seed.hubspot_integration_tests.marketing_event_list_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "created_by_id": {"type": "character varying", "index": 3, "name": "created_by_id", "comment": null}, "updated_by_id": {"type": "character varying", "index": 4, "name": "updated_by_id", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 5, "name": "filters_updated_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "processing_status": {"type": "character varying", "index": 7, "name": "processing_status", "comment": null}, "deleted_at": {"type": "timestamp without time zone", "index": 8, "name": "deleted_at", "comment": null}, "list_version": {"type": "bigint", "index": 9, "name": "list_version", "comment": null}, "object_type_id": {"type": "character varying", "index": 10, "name": "object_type_id", "comment": null}, "size": {"type": "bigint", "index": 11, "name": "size", "comment": null}, "name": {"type": "character varying", "index": 12, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 13, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 14, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.marketing_event_list_data"}, "seed.hubspot_integration_tests.marketing_event_participant_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_participant_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "properties_occurred_at": {"type": "timestamp without time zone", "index": 5, "name": "properties_occurred_at", "comment": null}, "properties_attendance_percentage": {"type": "double precision", "index": 6, "name": "properties_attendance_percentage", "comment": null}, "properties_attendance_state": {"type": "character varying", "index": 7, "name": "properties_attendance_state", "comment": null}, "properties_attendance_duration_seconds": {"type": "bigint", "index": 8, "name": "properties_attendance_duration_seconds", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.marketing_event_participant_data"}, "seed.hubspot_integration_tests.merged_deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "merged_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "merged_deal_id": {"type": "bigint", "index": 2, "name": "merged_deal_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.merged_deal_data"}, "seed.hubspot_integration_tests.owner_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 6, "name": "updated_at", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 9, "name": "last_name", "comment": null}, "active_user_id": {"type": "integer", "index": 10, "name": "active_user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.owner_data"}, "seed.hubspot_integration_tests.owner_team_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": null}, "is_team_primary": {"type": "boolean", "index": 3, "name": "is_team_primary", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.owner_team_data"}, "seed.hubspot_integration_tests.property_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "calculated": {"type": "boolean", "index": 3, "name": "calculated", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "description": {"type": "text", "index": 5, "name": "description", "comment": null}, "field_type": {"type": "text", "index": 6, "name": "field_type", "comment": null}, "group_name": {"type": "text", "index": 7, "name": "group_name", "comment": null}, "hubspot_defined": {"type": "boolean", "index": 8, "name": "hubspot_defined", "comment": null}, "hubspot_object": {"type": "text", "index": 9, "name": "hubspot_object", "comment": null}, "label": {"type": "text", "index": 10, "name": "label", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "show_currency_symbol": {"type": "boolean", "index": 12, "name": "show_currency_symbol", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.property_data"}, "seed.hubspot_integration_tests.property_option_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_option_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"label": {"type": "text", "index": 1, "name": "label", "comment": null}, "property_id": {"type": "text", "index": 2, "name": "property_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "display_order": {"type": "integer", "index": 4, "name": "display_order", "comment": null}, "hidden": {"type": "boolean", "index": 5, "name": "hidden", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "hubspot_object": {"type": "text", "index": 7, "name": "hubspot_object", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.property_option_data"}, "seed.hubspot_integration_tests.role_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "role_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "requires_billing_write": {"type": "boolean", "index": 3, "name": "requires_billing_write", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.role_data"}, "seed.hubspot_integration_tests.submission_response_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "submission_response_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"conversion_id": {"type": "character varying", "index": 1, "name": "conversion_id", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "field_name": {"type": "character varying", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "submitted_at": {"type": "bigint", "index": 5, "name": "submitted_at", "comment": null}, "page_url": {"type": "character varying", "index": 6, "name": "page_url", "comment": null}, "object_type_id": {"type": "character varying", "index": 7, "name": "object_type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.submission_response_data"}, "seed.hubspot_integration_tests.team_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.team_data"}, "seed.hubspot_integration_tests.team_user_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_user_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"user_id": {"type": "integer", "index": 1, "name": "user_id", "comment": null}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": null}, "is_secondary_user": {"type": "boolean", "index": 3, "name": "is_secondary_user", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.team_user_data"}, "seed.hubspot_integration_tests.ticket_company_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_company_data"}, "seed.hubspot_integration_tests.ticket_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_contact_data"}, "seed.hubspot_integration_tests.ticket_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": null}, "property_closed_date": {"type": "timestamp without time zone", "index": 4, "name": "property_closed_date", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_createdate", "comment": null}, "property_first_agent_reply_date": {"type": "timestamp without time zone", "index": 6, "name": "property_first_agent_reply_date", "comment": null}, "property_hs_pipeline": {"type": "character varying", "index": 7, "name": "property_hs_pipeline", "comment": null}, "property_hs_pipeline_stage": {"type": "character varying", "index": 8, "name": "property_hs_pipeline_stage", "comment": null}, "property_hs_ticket_category": {"type": "text", "index": 9, "name": "property_hs_ticket_category", "comment": null}, "property_hs_ticket_priority": {"type": "integer", "index": 10, "name": "property_hs_ticket_priority", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 11, "name": "property_hubspot_owner_id", "comment": null}, "property_subject": {"type": "text", "index": 12, "name": "property_subject", "comment": null}, "property_content": {"type": "text", "index": 13, "name": "property_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_data"}, "seed.hubspot_integration_tests.ticket_deal_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_deal_data"}, "seed.hubspot_integration_tests.ticket_engagement_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_engagement_data"}, "seed.hubspot_integration_tests.ticket_pipeline_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "object_type_id": {"type": "text", "index": 7, "name": "object_type_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_data"}, "seed.hubspot_integration_tests.ticket_pipeline_stage_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"stage_id": {"type": "character varying", "index": 1, "name": "stage_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": null}, "label": {"type": "text", "index": 7, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying", "index": 8, "name": "pipeline_id", "comment": null}, "ticket_state": {"type": "text", "index": 9, "name": "ticket_state", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 11, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_stage_data"}, "seed.hubspot_integration_tests.ticket_property_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": null}, "timestamp_instant": {"type": "timestamp without time zone", "index": 6, "name": "timestamp_instant", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "text", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "text", "index": 9, "name": "_fivetran_end", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.hubspot_integration_tests.ticket_property_history_data"}, "seed.hubspot_integration_tests.users_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "users_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "primary_team_id": {"type": "integer", "index": 2, "name": "primary_team_id", "comment": null}, "role_id": {"type": "bigint", "index": 3, "name": "role_id", "comment": null}, "email": {"type": "text", "index": 4, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 6, "name": "last_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "seed.hubspot_integration_tests.users_data"}, "model.hubspot.hubspot__companies": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__companies", "database": "postgres", "comment": "Each record represents a company in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the company."}, "is_company_deleted": {"type": "boolean", "index": 3, "name": "is_company_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "company_name": {"type": "text", "index": 5, "name": "company_name", "comment": null}, "description": {"type": "text", "index": 6, "name": "description", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "industry": {"type": "text", "index": 8, "name": "industry", "comment": null}, "street_address": {"type": "text", "index": 9, "name": "street_address", "comment": null}, "street_address_2": {"type": "text", "index": 10, "name": "street_address_2", "comment": null}, "city": {"type": "text", "index": 11, "name": "city", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "company_annual_revenue": {"type": "integer", "index": 14, "name": "company_annual_revenue", "comment": null}, "count_engagement_notes": {"type": "bigint", "index": 15, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 16, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 17, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 18, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 19, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 20, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 21, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__companies"}, "model.hubspot.hubspot__company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__company_history", "database": "postgres", "comment": "Each record represents a change to company record in Hubspot; the grain of this model is company_id -> field_name -> valid_to.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the related company record."}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 4, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "integer", "index": 5, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "valid_from": {"type": "timestamp without time zone", "index": 6, "name": "valid_from", "comment": "The timestamp the change was valid from."}, "new_value": {"type": "text", "index": 7, "name": "new_value", "comment": "The new value of the field."}, "valid_to": {"type": "timestamp without time zone", "index": 8, "name": "valid_to", "comment": "The timestamp the change was valid to. Null if still valid."}, "id": {"type": "text", "index": 9, "name": "id", "comment": "The ID of the change. Hashed on `source_relation`, `field_name`, `company_id`, and `valid_from`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__company_history"}, "model.hubspot.hubspot__company_lists": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__company_lists", "database": "postgres", "comment": "Each record represents a company list in Hubspot, enriched with engagement and ticket metrics aggregated across member companies.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": "The ID of the company list."}, "company_list_name": {"type": "character varying", "index": 3, "name": "company_list_name", "comment": "The name of the company list."}, "created_by_id": {"type": "character varying", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the company list."}, "object_type_id": {"type": "character varying", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "character varying", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'."}, "processing_type": {"type": "character varying", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'."}, "list_version": {"type": "bigint", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "timestamp without time zone", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_company_list_deleted": {"type": "boolean", "index": 10, "name": "is_company_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}, "total_companies": {"type": "bigint", "index": 14, "name": "total_companies", "comment": "The total number of companies that are members of the list."}, "count_engagement_notes": {"type": "bigint", "index": 15, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 16, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 17, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 18, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 19, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 20, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 21, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__company_lists"}, "model.hubspot.hubspot__contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__contact_history", "database": "postgres", "comment": "Each record represents a change to contact record in Hubspot; the grain of this model is contact_id -> field_name -> valid_to.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": "The ID of the related contact record."}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 4, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 5, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "valid_from": {"type": "timestamp without time zone", "index": 6, "name": "valid_from", "comment": "The timestamp the change was valid from."}, "new_value": {"type": "text", "index": 7, "name": "new_value", "comment": "The new value of the field."}, "valid_to": {"type": "timestamp without time zone", "index": 8, "name": "valid_to", "comment": "The timestamp the change was valid to. Null if still valid."}, "id": {"type": "text", "index": 9, "name": "id", "comment": "The ID of the change. Hashed on `source_relation`, `contact_id`, `field_name`, and `valid_from`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__contact_history"}, "model.hubspot.hubspot__contact_lists": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__contact_lists", "database": "postgres", "comment": "Each record represents a contact list in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": "The ID of the contact list."}, "contact_list_name": {"type": "text", "index": 3, "name": "contact_list_name", "comment": "The name of the contact list."}, "created_by_id": {"type": "integer", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the contact list."}, "object_type_id": {"type": "text", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "text", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'."}, "processing_type": {"type": "text", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists."}, "list_version": {"type": "integer", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "text", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_contact_list_deleted": {"type": "boolean", "index": 10, "name": "is_contact_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}, "total_bounces": {"type": "numeric", "index": 14, "name": "total_bounces", "comment": "The total number of bounce email events."}, "total_unique_bounces": {"type": "bigint", "index": 15, "name": "total_unique_bounces", "comment": "The total number of unique email sends with a bounce email event."}, "total_clicks": {"type": "numeric", "index": 16, "name": "total_clicks", "comment": "The total number of click email events."}, "total_unique_clicks": {"type": "bigint", "index": 17, "name": "total_unique_clicks", "comment": "The total number of unique email sends with a click email event."}, "total_deferrals": {"type": "numeric", "index": 18, "name": "total_deferrals", "comment": "The total number of deferral email events."}, "total_unique_deferrals": {"type": "bigint", "index": 19, "name": "total_unique_deferrals", "comment": "The total number of unique email sends with a deferral email event."}, "total_deliveries": {"type": "numeric", "index": 20, "name": "total_deliveries", "comment": "The total number of delivery email events."}, "total_unique_deliveries": {"type": "bigint", "index": 21, "name": "total_unique_deliveries", "comment": "The total number of unique email sends with a delivery email event."}, "total_drops": {"type": "numeric", "index": 22, "name": "total_drops", "comment": "The total number of drop email events."}, "total_unique_drops": {"type": "bigint", "index": 23, "name": "total_unique_drops", "comment": "The total number of unique email sends with a drop email event."}, "total_forwards": {"type": "numeric", "index": 24, "name": "total_forwards", "comment": "The total number of forward email events."}, "total_unique_forwards": {"type": "bigint", "index": 25, "name": "total_unique_forwards", "comment": "The total number of unique email sends with a forward email event."}, "total_opens": {"type": "numeric", "index": 26, "name": "total_opens", "comment": "The total number of open email events."}, "total_unique_opens": {"type": "bigint", "index": 27, "name": "total_unique_opens", "comment": "The total number of unique email sends with a opens email event."}, "total_prints": {"type": "numeric", "index": 28, "name": "total_prints", "comment": "The total number of print email events."}, "total_unique_prints": {"type": "bigint", "index": 29, "name": "total_unique_prints", "comment": "The total number of unique email sends with a print email event."}, "total_spam_reports": {"type": "numeric", "index": 30, "name": "total_spam_reports", "comment": "The total number of spam report email events."}, "total_unique_spam_reports": {"type": "bigint", "index": 31, "name": "total_unique_spam_reports", "comment": "The total number of unique email sends with a spam report email event."}, "total_unsubscribes": {"type": "numeric", "index": 32, "name": "total_unsubscribes", "comment": "The total number of unsubscribe email events."}, "total_unique_unsubscribes": {"type": "bigint", "index": 33, "name": "total_unique_unsubscribes", "comment": "The total number of unique email sends with a unsubscribe email event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__contact_lists"}, "model.hubspot.hubspot__contacts": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__contacts", "database": "postgres", "comment": "Each record represents a contact in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": "The ID of the contact."}, "is_contact_deleted": {"type": "boolean", "index": 3, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "merged_object_ids": {"type": "text", "index": 4, "name": "merged_object_ids", "comment": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.\n"}, "email": {"type": "text", "index": 5, "name": "email", "comment": "The email address of the contact."}, "contact_company": {"type": "text", "index": 6, "name": "contact_company", "comment": "The name of the contact's company"}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": "The contact's first name."}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": "The contact's last name."}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": "The date that the contact was created in your HubSpot account."}, "job_title": {"type": "integer", "index": 10, "name": "job_title", "comment": "The contact's job title."}, "company_annual_revenue": {"type": "integer", "index": 11, "name": "company_annual_revenue", "comment": "The contact's annual company revenue."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "total_bounces": {"type": "numeric", "index": 13, "name": "total_bounces", "comment": "The total number of bounce email events."}, "total_unique_bounces": {"type": "bigint", "index": 14, "name": "total_unique_bounces", "comment": "The total number of unique email sends with a bounce email event."}, "total_clicks": {"type": "numeric", "index": 15, "name": "total_clicks", "comment": "The total number of click email events."}, "total_unique_clicks": {"type": "bigint", "index": 16, "name": "total_unique_clicks", "comment": "The total number of unique email sends with a click email event."}, "total_deferrals": {"type": "numeric", "index": 17, "name": "total_deferrals", "comment": "The total number of deferral email events."}, "total_unique_deferrals": {"type": "bigint", "index": 18, "name": "total_unique_deferrals", "comment": "The total number of unique email sends with a deferral email event."}, "total_deliveries": {"type": "numeric", "index": 19, "name": "total_deliveries", "comment": "The total number of delivery email events."}, "total_unique_deliveries": {"type": "bigint", "index": 20, "name": "total_unique_deliveries", "comment": "The total number of unique email sends with a delivery email event."}, "total_drops": {"type": "numeric", "index": 21, "name": "total_drops", "comment": "The total number of drop email events."}, "total_unique_drops": {"type": "bigint", "index": 22, "name": "total_unique_drops", "comment": "The total number of unique email sends with a drop email event."}, "total_forwards": {"type": "numeric", "index": 23, "name": "total_forwards", "comment": "The total number of forward email events."}, "total_unique_forwards": {"type": "bigint", "index": 24, "name": "total_unique_forwards", "comment": "The total number of unique email sends with a forward email event."}, "total_opens": {"type": "numeric", "index": 25, "name": "total_opens", "comment": "The total number of open email events."}, "total_unique_opens": {"type": "bigint", "index": 26, "name": "total_unique_opens", "comment": "The total number of unique email sends with a opens email event."}, "total_prints": {"type": "numeric", "index": 27, "name": "total_prints", "comment": "The total number of print email events."}, "total_unique_prints": {"type": "bigint", "index": 28, "name": "total_unique_prints", "comment": "The total number of unique email sends with a print email event."}, "total_spam_reports": {"type": "numeric", "index": 29, "name": "total_spam_reports", "comment": "The total number of spam report email events."}, "total_unique_spam_reports": {"type": "bigint", "index": 30, "name": "total_unique_spam_reports", "comment": "The total number of unique email sends with a spam report email event."}, "total_unsubscribes": {"type": "numeric", "index": 31, "name": "total_unsubscribes", "comment": "The total number of unsubscribe email events."}, "total_unique_unsubscribes": {"type": "bigint", "index": 32, "name": "total_unique_unsubscribes", "comment": "The total number of unique email sends with a unsubscribe email event."}, "count_engagement_notes": {"type": "bigint", "index": 33, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 34, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 35, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 36, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 37, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 38, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 39, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}, "calculated_first_conversion_form_id": {"type": "character varying", "index": 40, "name": "calculated_first_conversion_form_id", "comment": "ID of the form associated with the contact's first conversion, calculated by this package."}, "calculated_first_conversion_date": {"type": "timestamp without time zone", "index": 41, "name": "calculated_first_conversion_date", "comment": "Timestamp of the contact's first form submission, calculated by this package."}, "calculated_first_conversion_form_name": {"type": "text", "index": 42, "name": "calculated_first_conversion_form_name", "comment": "Name of the form submitted during the contact's first conversion, calculated by this package."}, "calculated_first_conversion_form_type": {"type": "text", "index": 43, "name": "calculated_first_conversion_form_type", "comment": "Type of form submitted during the contact's first conversion (e.g., regular, pop-up), calculated by this package."}, "calculated_first_conversion_fields_responded_to": {"type": "text", "index": 44, "name": "calculated_first_conversion_fields_responded_to", "comment": "Comma-separated list of unique field names submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "calculated_first_conversion_total_responses": {"type": "bigint", "index": 45, "name": "calculated_first_conversion_total_responses", "comment": "Number of fields submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "calculated_most_recent_conversion_form_id": {"type": "character varying", "index": 46, "name": "calculated_most_recent_conversion_form_id", "comment": "ID of the form associated with the contact's most recent conversion, calculated by this package."}, "calculated_most_recent_conversion_date": {"type": "timestamp without time zone", "index": 47, "name": "calculated_most_recent_conversion_date", "comment": "Timestamp of the contact's most recent form submission, calculated by this package."}, "calculated_most_recent_conversion_form_name": {"type": "text", "index": 48, "name": "calculated_most_recent_conversion_form_name", "comment": "Name of the form submitted during the contact's most recent conversion, calculated by this package."}, "calculated_most_recent_conversion_form_type": {"type": "text", "index": 49, "name": "calculated_most_recent_conversion_form_type", "comment": "Type of form submitted during the contact's most recent conversion (e.g., regular, pop-up), calculated by this package."}, "calculated_most_recent_conversion_fields_responded_to": {"type": "text", "index": 50, "name": "calculated_most_recent_conversion_fields_responded_to", "comment": "Comma-separated list of unique field names submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "calculated_most_recent_conversion_total_responses": {"type": "bigint", "index": 51, "name": "calculated_most_recent_conversion_total_responses", "comment": "Number of fields submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true."}, "total_form_submissions": {"type": "bigint", "index": 52, "name": "total_form_submissions", "comment": "Total number of form submissions made by the contact."}, "total_unique_form_submissions": {"type": "bigint", "index": 53, "name": "total_unique_form_submissions", "comment": "Count of distinct forms submitted by the contact."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__contacts"}, "model.hubspot.hubspot__conversations": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__conversations", "database": "postgres", "comment": "Each record represents a conversation thread in HubSpot. Enriches each thread with inbox, channel, channel account details, and aggregated message metrics derived from the message history. Optionally joins to ticket and contact data when the respective features are enabled.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "conversation_thread_id": {"type": "character varying", "index": 3, "name": "conversation_thread_id", "comment": "Unique ID of the conversation thread."}, "inbox_id": {"type": "character varying", "index": 4, "name": "inbox_id", "comment": "ID of the inbox the thread belongs to."}, "associated_contact_id": {"type": "integer", "index": 5, "name": "associated_contact_id", "comment": "ID of the contact associated with the thread."}, "associated_ticket_id": {"type": "integer", "index": 6, "name": "associated_ticket_id", "comment": "ID of the ticket associated with the thread."}, "original_channel_account_id": {"type": "character varying", "index": 7, "name": "original_channel_account_id", "comment": "ID of the channel account through which the thread was originally created."}, "original_channel_id": {"type": "character varying", "index": 8, "name": "original_channel_id", "comment": "ID of the channel through which the thread was originally created."}, "assigned_to_actor_id": {"type": "character varying", "index": 9, "name": "assigned_to_actor_id", "comment": "ID of the actor the thread is currently assigned to."}, "closed_at": {"type": "timestamp without time zone", "index": 10, "name": "closed_at", "comment": "Timestamp when the thread was closed."}, "created_at": {"type": "timestamp without time zone", "index": 11, "name": "created_at", "comment": "Timestamp when the thread was created."}, "latest_message_at": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_at", "comment": "Timestamp of the most recent message (sent or received) in the thread."}, "latest_message_received_at": {"type": "timestamp without time zone", "index": 13, "name": "latest_message_received_at", "comment": "Timestamp of the most recently received message in the thread."}, "latest_message_sent_at": {"type": "timestamp without time zone", "index": 14, "name": "latest_message_sent_at", "comment": "Timestamp of the most recently sent message in the thread."}, "is_spam": {"type": "character varying", "index": 15, "name": "is_spam", "comment": "Indicates whether the thread has been marked as spam."}, "status": {"type": "character varying", "index": 16, "name": "status", "comment": "Current status of the thread (e.g., OPEN, CLOSED)."}, "assignee_name": {"type": "character varying", "index": 17, "name": "assignee_name", "comment": "Name of the actor currently assigned to this conversation thread."}, "assignee_email": {"type": "character varying", "index": 18, "name": "assignee_email", "comment": "Email address of the actor currently assigned to this conversation thread."}, "inbox_name": {"type": "character varying", "index": 19, "name": "inbox_name", "comment": "Display name of the inbox the thread belongs to."}, "inbox_type": {"type": "text", "index": 20, "name": "inbox_type", "comment": "Type of the inbox (e.g., HELP_DESK, INBOX)."}, "is_inbox_active": {"type": "boolean", "index": 21, "name": "is_inbox_active", "comment": "Boolean indicating whether the inbox is active."}, "is_inbox_deleted": {"type": "boolean", "index": 22, "name": "is_inbox_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_name": {"type": "character varying", "index": 23, "name": "channel_name", "comment": "Display name of the channel through which the thread was created."}, "is_channel_deleted": {"type": "boolean", "index": 24, "name": "is_channel_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_account_name": {"type": "character varying", "index": 25, "name": "channel_account_name", "comment": "Display name of the channel account through which the thread was created."}, "channel_account_delivery_identifier_type": {"type": "character varying", "index": 26, "name": "channel_account_delivery_identifier_type", "comment": "The type of delivery identifier for the channel account (e.g., HS_EMAIL_ADDRESS)."}, "channel_account_delivery_identifier_value": {"type": "character varying", "index": 27, "name": "channel_account_delivery_identifier_value", "comment": "The value of the delivery identifier for the channel account (e.g., the email address)."}, "is_channel_account_deleted": {"type": "boolean", "index": 28, "name": "is_channel_account_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "ticket_subject": {"type": "text", "index": 29, "name": "ticket_subject", "comment": "Short summary of the associated ticket."}, "ticket_content": {"type": "text", "index": 30, "name": "ticket_content", "comment": "Text in the body of the associated ticket."}, "ticket_created_date": {"type": "timestamp without time zone", "index": 31, "name": "ticket_created_date", "comment": "Date the associated ticket was created."}, "ticket_closed_date": {"type": "timestamp without time zone", "index": 32, "name": "ticket_closed_date", "comment": "Date the associated ticket was closed."}, "ticket_category": {"type": "text", "index": 33, "name": "ticket_category", "comment": "Category of the associated ticket."}, "ticket_owner_id": {"type": "integer", "index": 34, "name": "ticket_owner_id", "comment": "ID of the owner of the associated ticket."}, "is_ticket_deleted": {"type": "boolean", "index": 35, "name": "is_ticket_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "ticket_owner_email_address": {"type": "text", "index": 36, "name": "ticket_owner_email_address", "comment": "Email address of the associated ticket owner."}, "ticket_owner_full_name": {"type": "text", "index": 37, "name": "ticket_owner_full_name", "comment": "Full name of the associated ticket owner."}, "ticket_owner_primary_team_id": {"type": "bigint", "index": 38, "name": "ticket_owner_primary_team_id", "comment": "ID of the primary team assigned to the associated ticket owner."}, "ticket_owner_primary_team_name": {"type": "text", "index": 39, "name": "ticket_owner_primary_team_name", "comment": "Name of the primary team assigned to the associated ticket owner."}, "ticket_owner_role_id": {"type": "bigint", "index": 40, "name": "ticket_owner_role_id", "comment": "ID of the role assigned to the associated ticket owner."}, "ticket_owner_role_name": {"type": "text", "index": 41, "name": "ticket_owner_role_name", "comment": "Name of the role assigned to the associated ticket owner."}, "ticket_owner_active_user_id": {"type": "integer", "index": 42, "name": "ticket_owner_active_user_id", "comment": "Unique ID of the active HubSpot user who owns the associated ticket."}, "contact_email": {"type": "text", "index": 43, "name": "contact_email", "comment": "Email address of the associated contact."}, "contact_first_name": {"type": "text", "index": 44, "name": "contact_first_name", "comment": "First name of the associated contact."}, "contact_last_name": {"type": "text", "index": 45, "name": "contact_last_name", "comment": "Last name of the associated contact."}, "contact_company": {"type": "text", "index": 46, "name": "contact_company", "comment": "Company of the associated contact."}, "is_contact_deleted": {"type": "boolean", "index": 47, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "first_response_time_seconds": {"type": "double precision", "index": 48, "name": "first_response_time_seconds", "comment": "Time taken to respond to the first incoming message in the thread (in seconds). Negative values indicate that the conversation was initiated by an internal agent or bot."}, "resolution_time_seconds": {"type": "double precision", "index": 49, "name": "resolution_time_seconds", "comment": "Time taken to resolve the thread (in seconds), starting at the first incoming message and ending at thread close."}, "first_message_at": {"type": "timestamp without time zone", "index": 50, "name": "first_message_at", "comment": "Timestamp of the first message (any direction) in the thread."}, "first_message_received_at": {"type": "timestamp without time zone", "index": 51, "name": "first_message_received_at", "comment": "Timestamp of the first incoming message in the thread."}, "first_message_sent_at": {"type": "timestamp without time zone", "index": 52, "name": "first_message_sent_at", "comment": "Timestamp of the first outgoing message in the thread."}, "total_message_count": {"type": "bigint", "index": 53, "name": "total_message_count", "comment": "Total number of distinct messages in the thread."}, "incoming_message_count": {"type": "bigint", "index": 54, "name": "incoming_message_count", "comment": "Number of distinct incoming messages in the thread."}, "outgoing_message_count": {"type": "bigint", "index": 55, "name": "outgoing_message_count", "comment": "Number of distinct outgoing messages in the thread."}, "agent_outgoing_message_count": {"type": "bigint", "index": 56, "name": "agent_outgoing_message_count", "comment": "Number of distinct outgoing messages sent by an agent."}, "bot_outgoing_message_count": {"type": "bigint", "index": 57, "name": "bot_outgoing_message_count", "comment": "Number of distinct outgoing messages sent by a bot."}, "system_outgoing_message_count": {"type": "bigint", "index": 58, "name": "system_outgoing_message_count", "comment": "Number of distinct outgoing messages sent by a system actor."}, "comment_count": {"type": "bigint", "index": 59, "name": "comment_count", "comment": "Number of internal comments on the thread."}, "assignment_count": {"type": "bigint", "index": 60, "name": "assignment_count", "comment": "Number of assignment events on the thread."}, "thread_status_change_count": {"type": "bigint", "index": 61, "name": "thread_status_change_count", "comment": "Number of status change events on the thread."}, "unique_assignee_count": {"type": "bigint", "index": 62, "name": "unique_assignee_count", "comment": "Number of distinct actors the thread has been assigned to."}, "involved_agent_count": {"type": "bigint", "index": 63, "name": "involved_agent_count", "comment": "Number of distinct agents who have created any conversation event (message, comment, etc) in the thread."}, "agent_author_count": {"type": "bigint", "index": 64, "name": "agent_author_count", "comment": "Number of distinct agents who sent an outgoing message in the thread."}, "visitor_author_count": {"type": "bigint", "index": 65, "name": "visitor_author_count", "comment": "Number of distinct visitors who sent an incoming message in the thread."}, "visitor_recipient_count": {"type": "bigint", "index": 66, "name": "visitor_recipient_count", "comment": "Number of distinct visitors who received an outgoing message in the thread."}, "has_welcome_message": {"type": "boolean", "index": 67, "name": "has_welcome_message", "comment": "Boolean indicating whether the thread includes a welcome message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__conversations"}, "model.hubspot.hubspot__daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_company_history", "database": "postgres", "comment": "Each record represents a company's day in Hubspot with tracked properties pivoted into columns. By default, tracks the company's owner and lifecycle stage on each day.\n", "owner": "postgres"}, "columns": {"company_day_id": {"type": "text", "index": 1, "name": "company_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `company_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the company had these values."}, "company_id": {"type": "bigint", "index": 4, "name": "company_id", "comment": "Unique id of a company in Hubspot."}, "owner_full_name": {"type": "text", "index": 5, "name": "owner_full_name", "comment": "The full name of the company owner on that day."}, "owner_email_address": {"type": "text", "index": 6, "name": "owner_email_address", "comment": "The email address of the company owner on that day."}, "hubspot_owner_id": {"type": "text", "index": 7, "name": "hubspot_owner_id", "comment": "The ID of the company owner on that day."}, "lifecyclestage": {"type": "text", "index": 8, "name": "lifecyclestage", "comment": "The lifecycle stage of the company on that day."}, "count_engagement_notes": {"type": "bigint", "index": 9, "name": "count_engagement_notes", "comment": "The number of notes logged against the company on that day."}, "count_engagement_tasks": {"type": "bigint", "index": 10, "name": "count_engagement_tasks", "comment": "The number of tasks logged against the company on that day."}, "count_engagement_calls": {"type": "bigint", "index": 11, "name": "count_engagement_calls", "comment": "The number of calls logged against the company on that day."}, "count_engagement_meetings": {"type": "bigint", "index": 12, "name": "count_engagement_meetings", "comment": "The number of meetings logged against the company on that day."}, "count_engagement_emails": {"type": "bigint", "index": 13, "name": "count_engagement_emails", "comment": "The number of emails logged against the company on that day."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 14, "name": "count_engagement_incoming_emails", "comment": "The number of incoming emails logged against the company on that day."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 15, "name": "count_engagement_forwarded_emails", "comment": "The number of forwarded emails logged against the company on that day."}, "count_engagement_communications": {"type": "bigint", "index": 16, "name": "count_engagement_communications", "comment": "The number of communication engagements logged against the company on that day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_company_history"}, "model.hubspot.hubspot__daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_contact_history", "database": "postgres", "comment": "Each record represents a contact's day in Hubspot with tracked properties pivoted into columns. By default, tracks the contact's lifecycle stage, likelihood-to-close score, and owner on each day and includes engagement and email event metrics.\n", "owner": "postgres"}, "columns": {"contact_day_id": {"type": "text", "index": 1, "name": "contact_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `contact_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the contact had these values."}, "contact_id": {"type": "integer", "index": 4, "name": "contact_id", "comment": "Unique id of a contact in Hubspot."}, "owner_full_name": {"type": "text", "index": 5, "name": "owner_full_name", "comment": "The full name of the contact owner on that day."}, "owner_email_address": {"type": "text", "index": 6, "name": "owner_email_address", "comment": "The email address of the contact owner on that day."}, "lifecyclestage": {"type": "text", "index": 7, "name": "lifecyclestage", "comment": "The lifecycle stage of the contact on that day."}, "hs_predictivecontactscore_v2": {"type": "text", "index": 8, "name": "hs_predictivecontactscore_v2", "comment": "HubSpot's predicted likelihood (0\u2013100) that the contact will close as a customer on that day."}, "hubspot_owner_id": {"type": "text", "index": 9, "name": "hubspot_owner_id", "comment": "The ID of the contact owner on that day."}, "count_engagement_notes": {"type": "bigint", "index": 10, "name": "count_engagement_notes", "comment": "Number of note engagements logged for the contact on that day."}, "count_engagement_tasks": {"type": "bigint", "index": 11, "name": "count_engagement_tasks", "comment": "Number of task engagements logged for the contact on that day."}, "count_engagement_calls": {"type": "bigint", "index": 12, "name": "count_engagement_calls", "comment": "Number of call engagements logged for the contact on that day."}, "count_engagement_meetings": {"type": "bigint", "index": 13, "name": "count_engagement_meetings", "comment": "Number of meeting engagements logged for the contact on that day."}, "count_engagement_emails": {"type": "bigint", "index": 14, "name": "count_engagement_emails", "comment": "Number of outbound email engagements logged for the contact on that day."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 15, "name": "count_engagement_incoming_emails", "comment": "Number of inbound email engagements logged for the contact on that day."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 16, "name": "count_engagement_forwarded_emails", "comment": "Number of forwarded email engagements logged for the contact on that day."}, "count_engagement_communications": {"type": "bigint", "index": 17, "name": "count_engagement_communications", "comment": "Number of communication engagements logged for the contact on that day."}, "count_emails_sent": {"type": "bigint", "index": 18, "name": "count_emails_sent", "comment": "Number of emails sent to the contact on that day."}, "count_email_deliveries": {"type": "bigint", "index": 19, "name": "count_email_deliveries", "comment": "Number of emails delivered to the contact on that day."}, "count_email_opens": {"type": "bigint", "index": 20, "name": "count_email_opens", "comment": "Number of email opens by the contact on that day."}, "count_email_clicks": {"type": "bigint", "index": 21, "name": "count_email_clicks", "comment": "Number of email link clicks by the contact on that day."}, "count_email_bounces": {"type": "bigint", "index": 22, "name": "count_email_bounces", "comment": "Number of email bounces for the contact on that day."}, "count_email_spam_reports": {"type": "bigint", "index": 23, "name": "count_email_spam_reports", "comment": "Number of spam reports by the contact on that day."}, "count_email_unsubscribes": {"type": "bigint", "index": 24, "name": "count_email_unsubscribes", "comment": "Number of email unsubscribes by the contact on that day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_contact_history"}, "model.hubspot.hubspot__daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_deal_history", "database": "postgres", "comment": "Each record represents a deal's day in Hubspot with tracked properties pivoted into columns. By default, tracks the deal's pipeline, pipeline stage, amount, team, and owner on each day.\n", "owner": "postgres"}, "columns": {"deal_day_id": {"type": "text", "index": 1, "name": "deal_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `deal_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the deal had these values."}, "deal_id": {"type": "bigint", "index": 4, "name": "deal_id", "comment": "Unique id of a deal in Hubspot."}, "is_deal_closed": {"type": "boolean", "index": 5, "name": "is_deal_closed", "comment": "Boolean indicating whether the deal's pipeline stage is closed."}, "pipeline_label": {"type": "text", "index": 6, "name": "pipeline_label", "comment": "The human-readable label for the deal pipeline."}, "pipeline_stage_label": {"type": "text", "index": 7, "name": "pipeline_stage_label", "comment": "The human-readable label for the deal's stage."}, "owner_full_name": {"type": "text", "index": 8, "name": "owner_full_name", "comment": "The full name of the deal owner on that day."}, "owner_email_address": {"type": "text", "index": 9, "name": "owner_email_address", "comment": "The email address of the deal owner on that day."}, "hubspot_team_name": {"type": "text", "index": 10, "name": "hubspot_team_name", "comment": "The name of the Hubspot team associated with the deal on that day."}, "deal_pipeline_id": {"type": "text", "index": 11, "name": "deal_pipeline_id", "comment": "ID of the deal pipeline."}, "pipeline_stage_id": {"type": "text", "index": 12, "name": "pipeline_stage_id", "comment": "ID of the deal pipeline stage."}, "amount": {"type": "text", "index": 13, "name": "amount", "comment": "The amount of the deal on that day."}, "amount_in_home_currency": {"type": "text", "index": 14, "name": "amount_in_home_currency", "comment": "The amount of the deal in the account's home currency on that day."}, "owner_id": {"type": "text", "index": 15, "name": "owner_id", "comment": "The ID of the deal owner on that day."}, "hubspot_team_id": {"type": "text", "index": 16, "name": "hubspot_team_id", "comment": "The ID of the Hubspot team associated with the deal on that day."}, "count_engagement_notes": {"type": "bigint", "index": 17, "name": "count_engagement_notes", "comment": "Number of notes logged against the deal on that day."}, "count_engagement_tasks": {"type": "bigint", "index": 18, "name": "count_engagement_tasks", "comment": "Number of tasks logged against the deal on that day."}, "count_engagement_calls": {"type": "bigint", "index": 19, "name": "count_engagement_calls", "comment": "Number of calls logged against the deal on that day."}, "count_engagement_meetings": {"type": "bigint", "index": 20, "name": "count_engagement_meetings", "comment": "Number of meetings logged against the deal on that day."}, "count_engagement_emails": {"type": "bigint", "index": 21, "name": "count_engagement_emails", "comment": "Number of outbound emails logged against the deal on that day."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 22, "name": "count_engagement_incoming_emails", "comment": "Number of inbound emails logged against the deal on that day."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 23, "name": "count_engagement_forwarded_emails", "comment": "Number of forwarded emails logged against the deal on that day."}, "count_engagement_communications": {"type": "bigint", "index": 24, "name": "count_engagement_communications", "comment": "Number of communications (LinkedIn, WhatsApp, SMS) logged against the deal on that day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_deal_history"}, "model.hubspot.hubspot__daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__daily_ticket_history", "database": "postgres", "comment": "Each record represents a ticket's day in Hubspot with tracked properties from the `TICKET_PROPERTY_HISTORY` source table pivoted out into columns. Enabled by setting `hubspot_service_enabled` to `True`.\nBy default, tracks the ticket's pipeline, pipeline stage, and state. Additional properties can be tracked by configuring the `hubspot__ticket_property_history_columns` variable.\nThe start of a ticket's history is its creation date, and its end is by default the close date (or the current date if still open). The history of ticket can be extended past its close date by configuring the `ticket_history_extension_days` variable.\n", "owner": "postgres"}, "columns": {"ticket_day_id": {"type": "text", "index": 1, "name": "ticket_day_id", "comment": "Unique surrogate key hashed on `source_relation`, `date_day`, and `ticket_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "Date on which the ticket had these values."}, "ticket_id": {"type": "integer", "index": 4, "name": "ticket_id", "comment": "Unique id of a ticket in Hubspot."}, "ticket_state": {"type": "text", "index": 5, "name": "ticket_state", "comment": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED."}, "hs_pipeline_label": {"type": "text", "index": 6, "name": "hs_pipeline_label", "comment": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot."}, "hs_pipeline_stage_label": {"type": "text", "index": 7, "name": "hs_pipeline_stage_label", "comment": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot."}, "hs_pipeline": {"type": "text", "index": 8, "name": "hs_pipeline", "comment": "ID of the ticket pipeline."}, "hs_pipeline_stage": {"type": "text", "index": 9, "name": "hs_pipeline_stage", "comment": "ID of the ticket pipeline stage."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__daily_ticket_history"}, "model.hubspot.hubspot__deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__deal_history", "database": "postgres", "comment": "Each record represents a change to deal record in Hubspot; the grain of this model is deal_id -> field_name -> valid_to.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": "The ID of the related deal record."}, "field_name": {"type": "text", "index": 3, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 4, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 5, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "valid_from": {"type": "timestamp without time zone", "index": 6, "name": "valid_from", "comment": "The timestamp the change was valid from."}, "new_value": {"type": "text", "index": 7, "name": "new_value", "comment": "The new value of the field."}, "valid_to": {"type": "timestamp without time zone", "index": 8, "name": "valid_to", "comment": "The timestamp the change was valid to. Null if still valid."}, "id": {"type": "text", "index": 9, "name": "id", "comment": "The ID of the change. Hashed on `source_relation`, `field_name`, `deal_id`, and `valid_from`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__deal_history"}, "model.hubspot.hubspot__deal_stages": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__deal_stages", "database": "postgres", "comment": "Each record represents when a deal stage changes in Hubspot, enriched with metrics about deal activities", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_stage_id": {"type": "text", "index": 2, "name": "deal_stage_id", "comment": "The unique deal stage identifier."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "The ID of the deal."}, "deal_name": {"type": "text", "index": 4, "name": "deal_name", "comment": "The name you have given this deal."}, "merged_deal_ids": {"type": "bigint[]", "index": 5, "name": "merged_deal_ids", "comment": "A list of deals that had previously been merged into this record."}, "date_stage_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_stage_entered", "comment": "The timestamp the deal stage was entered."}, "date_stage_exited": {"type": "timestamp without time zone", "index": 7, "name": "date_stage_exited", "comment": "The Fivetran calculated exit time of the deal stage."}, "is_stage_active": {"type": "boolean", "index": 8, "name": "is_stage_active", "comment": "Boolean indicating whether the deal stage active."}, "pipeline_stage_id": {"type": "text", "index": 9, "name": "pipeline_stage_id", "comment": "The ID of the deal's pipeline stage."}, "pipeline_stage_label": {"type": "text", "index": 10, "name": "pipeline_stage_label", "comment": "The label of the deal's pipeline stage."}, "pipeline_id": {"type": "text", "index": 11, "name": "pipeline_id", "comment": "The ID of the deal's pipeline."}, "pipeline_label": {"type": "text", "index": 12, "name": "pipeline_label", "comment": "The label of the deal's pipeline."}, "source": {"type": "text", "index": 13, "name": "source", "comment": "The relevant source of the deal stage."}, "source_id": {"type": "text", "index": 14, "name": "source_id", "comment": "Reference to the source."}, "is_pipeline_stage_active": {"type": "boolean", "index": 15, "name": "is_pipeline_stage_active", "comment": "Boolean indicating if the pipeline stage is active."}, "is_pipeline_active": {"type": "boolean", "index": 16, "name": "is_pipeline_active", "comment": "Boolean indicating if the pipeline is active."}, "is_pipeline_stage_closed": {"type": "boolean", "index": 17, "name": "is_pipeline_stage_closed", "comment": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal, refer to the pipeline_stage_label column."}, "pipeline_stage_display_order": {"type": "integer", "index": 18, "name": "pipeline_stage_display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "pipeline_display_order": {"type": "integer", "index": 19, "name": "pipeline_display_order", "comment": "Used to determine the order in which the pipelines appear when viewed in HubSpot."}, "pipeline_stage_probability": {"type": "double precision", "index": 20, "name": "pipeline_stage_probability", "comment": "The probability that the deal will close. Used for the deal forecast."}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 21, "name": "is_deal_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 22, "name": "is_deal_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "is_deal_deleted": {"type": "boolean", "index": 23, "name": "is_deal_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "deal_pipeline_stage_created_at": {"type": "text", "index": 24, "name": "deal_pipeline_stage_created_at", "comment": "A timestamp representing when the deal_pipeline_stage was created."}, "deal_pipeline_stage_updated_at": {"type": "text", "index": 25, "name": "deal_pipeline_stage_updated_at", "comment": "A timestamp representing when the deal_pipeline_stage was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__deal_stages"}, "model.hubspot.hubspot__deals": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__deals", "database": "postgres", "comment": "Each record represents a deal in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_name": {"type": "text", "index": 2, "name": "deal_name", "comment": "The name you have given this deal."}, "closed_date": {"type": "timestamp without time zone", "index": 3, "name": "closed_date", "comment": "The day the deal is expected to close, or was closed."}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": "The date the deal was created. This property is set automatically by HubSpot."}, "is_deal_deleted": {"type": "boolean", "index": 5, "name": "is_deal_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 7, "name": "deal_id", "comment": "The ID of the deal"}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": "The ID of the deal's pipeline."}, "deal_pipeline_stage_id": {"type": "text", "index": 9, "name": "deal_pipeline_stage_id", "comment": "The ID of the deal's pipeline stage."}, "owner_id": {"type": "bigint", "index": 10, "name": "owner_id", "comment": "The ID of the deal's owner."}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": "The hub ID."}, "description": {"type": "integer", "index": 12, "name": "description", "comment": "A brief description of the deal."}, "amount": {"type": "integer", "index": 13, "name": "amount", "comment": "The total value of the deal in the deal's currency."}, "merged_deal_ids": {"type": "bigint[]", "index": 14, "name": "merged_deal_ids", "comment": "A list of deals that had previously been merged into this record."}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 15, "name": "is_deal_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "pipeline_label": {"type": "text", "index": 16, "name": "pipeline_label", "comment": "The label of the deal's pipeline."}, "is_pipeline_active": {"type": "boolean", "index": 17, "name": "is_pipeline_active", "comment": "Boolean indicating if the pipeline is active."}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 18, "name": "is_deal_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "deal_pipeline_created_at": {"type": "text", "index": 19, "name": "deal_pipeline_created_at", "comment": "A timestamp representing when the deal_pipeline was created."}, "deal_pipeline_updated_at": {"type": "text", "index": 20, "name": "deal_pipeline_updated_at", "comment": "A timestamp representing when the deal_pipeline was updated."}, "pipeline_stage_label": {"type": "text", "index": 21, "name": "pipeline_stage_label", "comment": "The label of the deal's pipeline stage."}, "owner_active_user_id": {"type": "integer", "index": 22, "name": "owner_active_user_id", "comment": "Unique ID of the active HubSpot user who owns the deal."}, "owner_email_address": {"type": "text", "index": 23, "name": "owner_email_address", "comment": "The email address of the deal's owner."}, "owner_full_name": {"type": "text", "index": 24, "name": "owner_full_name", "comment": "The full name of the deal's owner."}, "owner_primary_team_id": {"type": "bigint", "index": 25, "name": "owner_primary_team_id", "comment": "ID of the primary team assigned to the deal owner."}, "owner_primary_team_name": {"type": "text", "index": 26, "name": "owner_primary_team_name", "comment": "Name of the primary team assigned to the deal owner."}, "owner_all_team_ids": {"type": "text", "index": 27, "name": "owner_all_team_ids", "comment": "Comma-separated list of all team IDs associated with the deal owner."}, "owner_all_team_names": {"type": "text", "index": 28, "name": "owner_all_team_names", "comment": "Comma-separated list of all team names associated with the deal owner."}, "owner_role_id": {"type": "bigint", "index": 29, "name": "owner_role_id", "comment": "ID of the role assigned to the deal owner."}, "owner_role_name": {"type": "text", "index": 30, "name": "owner_role_name", "comment": "Name of the role assigned to the deal owner."}, "count_engagement_notes": {"type": "bigint", "index": 31, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 32, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 33, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 34, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 35, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 36, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 37, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__deals"}, "model.hubspot.hubspot__email_campaigns": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_campaigns", "database": "postgres", "comment": "Each record represents an email campaign in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": "The app ID."}, "app_name": {"type": "text", "index": 4, "name": "app_name", "comment": "The app name."}, "content_id": {"type": "bigint", "index": 5, "name": "content_id", "comment": "The ID of the content."}, "email_campaign_id": {"type": "bigint", "index": 6, "name": "email_campaign_id", "comment": "The ID of the email campaign."}, "email_campaign_name": {"type": "text", "index": 7, "name": "email_campaign_name", "comment": "The name of the email campaign."}, "num_included": {"type": "integer", "index": 8, "name": "num_included", "comment": "The number of messages included as part of the email campaign."}, "num_queued": {"type": "integer", "index": 9, "name": "num_queued", "comment": "The number of messages queued as part of the email campaign."}, "email_campaign_sub_type": {"type": "integer", "index": 10, "name": "email_campaign_sub_type", "comment": "The email campaign sub-type."}, "email_campaign_subject": {"type": "text", "index": 11, "name": "email_campaign_subject", "comment": "The subject of the email campaign."}, "email_campaign_type": {"type": "text", "index": 12, "name": "email_campaign_type", "comment": "The email campaign type."}, "total_bounces": {"type": "numeric", "index": 13, "name": "total_bounces", "comment": "The total number of bounce email events."}, "total_unique_bounces": {"type": "bigint", "index": 14, "name": "total_unique_bounces", "comment": "The total number of unique email sends with a bounce email event."}, "total_clicks": {"type": "numeric", "index": 15, "name": "total_clicks", "comment": "The total number of click email events."}, "total_unique_clicks": {"type": "bigint", "index": 16, "name": "total_unique_clicks", "comment": "The total number of unique email sends with a click email event."}, "total_deferrals": {"type": "numeric", "index": 17, "name": "total_deferrals", "comment": "The total number of deferral email events."}, "total_unique_deferrals": {"type": "bigint", "index": 18, "name": "total_unique_deferrals", "comment": "The total number of unique email sends with a deferral email event."}, "total_deliveries": {"type": "numeric", "index": 19, "name": "total_deliveries", "comment": "The total number of delivery email events."}, "total_unique_deliveries": {"type": "bigint", "index": 20, "name": "total_unique_deliveries", "comment": "The total number of unique email sends with a delivery email event."}, "total_drops": {"type": "numeric", "index": 21, "name": "total_drops", "comment": "The total number of drop email events."}, "total_unique_drops": {"type": "bigint", "index": 22, "name": "total_unique_drops", "comment": "The total number of unique email sends with a drop email event."}, "total_forwards": {"type": "numeric", "index": 23, "name": "total_forwards", "comment": "The total number of forward email events."}, "total_unique_forwards": {"type": "bigint", "index": 24, "name": "total_unique_forwards", "comment": "The total number of unique email sends with a forward email event."}, "total_opens": {"type": "numeric", "index": 25, "name": "total_opens", "comment": "The total number of open email events."}, "total_unique_opens": {"type": "bigint", "index": 26, "name": "total_unique_opens", "comment": "The total number of unique email sends with a opens email event."}, "total_prints": {"type": "numeric", "index": 27, "name": "total_prints", "comment": "The total number of print email events."}, "total_unique_prints": {"type": "bigint", "index": 28, "name": "total_unique_prints", "comment": "The total number of unique email sends with a print email event."}, "total_spam_reports": {"type": "numeric", "index": 29, "name": "total_spam_reports", "comment": "The total number of spam report email events."}, "total_unique_spam_reports": {"type": "bigint", "index": 30, "name": "total_unique_spam_reports", "comment": "The total number of unique email sends with a spam report email event."}, "total_unsubscribes": {"type": "numeric", "index": 31, "name": "total_unsubscribes", "comment": "The total number of unsubscribe email events."}, "total_unique_unsubscribes": {"type": "bigint", "index": 32, "name": "total_unique_unsubscribes", "comment": "The total number of unique email sends with a unsubscribe email event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_campaigns"}, "model.hubspot.hubspot__email_event_bounce": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_bounce", "database": "postgres", "comment": "Each record represents a BOUNCE email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bounce_category": {"type": "text", "index": 3, "name": "bounce_category", "comment": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "returned_status": {"type": "integer", "index": 6, "name": "returned_status", "comment": "The status code returned from the recipient's email server."}, "created_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 8, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 9, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 11, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 12, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 13, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_bounce"}, "model.hubspot.hubspot__email_event_clicks": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_clicks", "database": "postgres", "comment": "Each record represents a CLICK email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "referer_url": {"type": "integer", "index": 7, "name": "referer_url", "comment": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client."}, "click_url": {"type": "text", "index": 8, "name": "click_url", "comment": "The URL within the message that the recipient clicked."}, "user_agent": {"type": "text", "index": 9, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 11, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 12, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 14, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 15, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 16, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_clicks"}, "model.hubspot.hubspot__email_event_deferred": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_deferred", "database": "postgres", "comment": "Each record represents a DEFERRED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "attempt_number": {"type": "integer", "index": 3, "name": "attempt_number", "comment": "The delivery attempt number."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "integer", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 8, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 10, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 11, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 12, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_deferred"}, "model.hubspot.hubspot__email_event_delivered": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_delivered", "database": "postgres", "comment": "Each record represents a DELIVERED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 4, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "smtp_id": {"type": "text", "index": 5, "name": "smtp_id", "comment": "An ID attached to the message by HubSpot."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 8, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 10, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 11, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 12, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_delivered"}, "model.hubspot.hubspot__email_event_dropped": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_dropped", "database": "postgres", "comment": "Each record represents a DROPPED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "drop_message": {"type": "text", "index": 5, "name": "drop_message", "comment": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'."}, "drop_reason": {"type": "text", "index": 6, "name": "drop_reason", "comment": "The reason why the email message was dropped. See below for the possible values."}, "from_email": {"type": "text", "index": 7, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 8, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 9, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 10, "name": "email_subject", "comment": "The subject line of the email message."}, "created_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 12, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 13, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 14, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 15, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 16, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 17, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_dropped"}, "model.hubspot.hubspot__email_event_forward": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_forward", "database": "postgres", "comment": "Each record represents a FORWARD email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 9, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 10, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 12, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 13, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 14, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_forward"}, "model.hubspot.hubspot__email_event_opens": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_opens", "database": "postgres", "comment": "Each record represents a OPEN email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "duration_open": {"type": "integer", "index": 4, "name": "duration_open", "comment": "If provided and nonzero, the approximate number of milliseconds the user had opened the email."}, "event_id": {"type": "text", "index": 5, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 7, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_opens"}, "model.hubspot.hubspot__email_event_print": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_print", "database": "postgres", "comment": "Each record represents a PRINT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 9, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 10, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 12, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 13, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 14, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_print"}, "model.hubspot.hubspot__email_event_sent": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_sent", "database": "postgres", "comment": "Each record represents a SENT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'cc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'bcc' field of the email message."}, "from_email": {"type": "text", "index": 5, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 6, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 7, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 8, "name": "email_subject", "comment": "The subject line of the email message."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_sent"}, "model.hubspot.hubspot__email_event_spam_report": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_spam_report", "database": "postgres", "comment": "Each record represents a SPAM_REPORT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "user_agent": {"type": "integer", "index": 5, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 8, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 10, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 11, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 12, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_spam_report"}, "model.hubspot.hubspot__email_event_status_change": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_event_status_change", "database": "postgres", "comment": "Each record represents a STATUS_CHANGE email event in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_bounced": {"type": "integer", "index": 3, "name": "is_bounced", "comment": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "subscription_status": {"type": "text", "index": 5, "name": "subscription_status", "comment": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n"}, "requested_by_email": {"type": "integer", "index": 6, "name": "requested_by_email", "comment": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted."}, "change_source": {"type": "text", "index": 7, "name": "change_source", "comment": "The source of the subscription change."}, "subscriptions": {"type": "text", "index": 8, "name": "subscriptions", "comment": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n"}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_event_status_change"}, "model.hubspot.hubspot__email_sends": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__email_sends", "database": "postgres", "comment": "Each record represents a SENT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "from_email": {"type": "text", "index": 5, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 6, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 7, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 8, "name": "email_subject", "comment": "The subject line of the email message."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 10, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "recipient_email_address": {"type": "text", "index": 11, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "email_send_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "email_send_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "email_send_id": {"type": "text", "index": 13, "name": "email_send_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "contact_id": {"type": "integer", "index": 14, "name": "contact_id", "comment": "The ID of the related contact."}, "is_contact_deleted": {"type": "boolean", "index": 15, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "bounces": {"type": "bigint", "index": 16, "name": "bounces", "comment": "The total number of bounce email events."}, "clicks": {"type": "bigint", "index": 17, "name": "clicks", "comment": "The total number of click email events."}, "deferrals": {"type": "bigint", "index": 18, "name": "deferrals", "comment": "The total number of deferral email events."}, "deliveries": {"type": "bigint", "index": 19, "name": "deliveries", "comment": "The total number of delivery email events."}, "drops": {"type": "bigint", "index": 20, "name": "drops", "comment": "The total number of drop email events."}, "forwards": {"type": "bigint", "index": 21, "name": "forwards", "comment": "The total number of forward email events."}, "opens": {"type": "bigint", "index": 22, "name": "opens", "comment": "The total number of open email events."}, "prints": {"type": "bigint", "index": 23, "name": "prints", "comment": "The total number of print email events."}, "spam_reports": {"type": "bigint", "index": 24, "name": "spam_reports", "comment": "The total number of spam report email events."}, "was_bounced": {"type": "boolean", "index": 25, "name": "was_bounced", "comment": "Whether the email was bounced."}, "was_clicked": {"type": "boolean", "index": 26, "name": "was_clicked", "comment": "Whether the email was clicked."}, "was_deferred": {"type": "boolean", "index": 27, "name": "was_deferred", "comment": "Whether the email was deferred."}, "was_delivered": {"type": "boolean", "index": 28, "name": "was_delivered", "comment": "Whether the email was delivered."}, "was_forwarded": {"type": "boolean", "index": 29, "name": "was_forwarded", "comment": "Whether the email was forwarded."}, "was_opened": {"type": "boolean", "index": 30, "name": "was_opened", "comment": "Whether the email was opened."}, "was_printed": {"type": "boolean", "index": 31, "name": "was_printed", "comment": "Whether the email was printed."}, "was_spam_reported": {"type": "boolean", "index": 32, "name": "was_spam_reported", "comment": "Whether the email was spam reported."}, "unsubscribes": {"type": "bigint", "index": 33, "name": "unsubscribes", "comment": "The total number of unsubscribe email events."}, "was_unsubscribed": {"type": "boolean", "index": 34, "name": "was_unsubscribed", "comment": "Whether the email was unsubscribed."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__email_sends"}, "model.hubspot.hubspot__engagement_calls": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_calls", "database": "postgres", "comment": "Each record represents a CALL engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "source_relation": {"type": "text", "index": 8, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 9, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 10, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 11, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 12, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_calls"}, "model.hubspot.hubspot__engagement_communication": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_communication", "database": "postgres", "comment": "Each record represents a COMMUNICATION engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "source_relation": {"type": "text", "index": 8, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 9, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 10, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 11, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 12, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_communication"}, "model.hubspot.hubspot__engagement_emails": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_emails", "database": "postgres", "comment": "Each record represents an EMAIL engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_type": {"type": "text", "index": 2, "name": "engagement_type", "comment": null}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "all_owner_ids": {"type": "integer", "index": 8, "name": "all_owner_ids", "comment": null}, "all_team_ids": {"type": "integer", "index": 9, "name": "all_team_ids", "comment": null}, "email_subject": {"type": "text", "index": 10, "name": "email_subject", "comment": null}, "email_text": {"type": "text", "index": 11, "name": "email_text", "comment": null}, "lastmodifieddate": {"type": "text", "index": 12, "name": "lastmodifieddate", "comment": null}, "modified_by": {"type": "integer", "index": 13, "name": "modified_by", "comment": null}, "source_relation": {"type": "text", "index": 14, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 15, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 16, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 17, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 18, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_emails"}, "model.hubspot.hubspot__engagement_meetings": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_meetings", "database": "postgres", "comment": "Each record represents a MEETING engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_type": {"type": "text", "index": 2, "name": "engagement_type", "comment": null}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "created_from_link_id": {"type": "integer", "index": 8, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 9, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 10, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 11, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 12, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 13, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 14, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 15, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 16, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 17, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 18, "name": "title", "comment": null}, "source_relation": {"type": "text", "index": 19, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 20, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 21, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 22, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 23, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_meetings"}, "model.hubspot.hubspot__engagement_notes": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_notes", "database": "postgres", "comment": "Each record represents a NOTE engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "note": {"type": "text", "index": 2, "name": "note", "comment": "The body of the note. The body has a limit of 65536 characters."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "engagement_id": {"type": "bigint", "index": 4, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": null}, "body_preview": {"type": "text", "index": 9, "name": "body_preview", "comment": null}, "lastmodifieddate": {"type": "text", "index": 10, "name": "lastmodifieddate", "comment": null}, "note_body": {"type": "text", "index": 11, "name": "note_body", "comment": null}, "source_relation": {"type": "text", "index": 12, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 13, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 14, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 15, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 16, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_notes"}, "model.hubspot.hubspot__engagement_tasks": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagement_tasks", "database": "postgres", "comment": "Each record represents a TASK engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "created_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "created_timestamp", "comment": "A timestamp representing when the engagement was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "occurred_timestamp", "comment": "A timestamp in representing the time that the engagement should appear in the timeline."}, "owner_id": {"type": "integer", "index": 6, "name": "owner_id", "comment": "The ID of the engagement's owner."}, "team_id": {"type": "integer", "index": 7, "name": "team_id", "comment": null}, "task_type": {"type": "text", "index": 8, "name": "task_type", "comment": null}, "object_id": {"type": "bigint", "index": 9, "name": "object_id", "comment": null}, "engagement_source": {"type": "text", "index": 10, "name": "engagement_source", "comment": null}, "source_relation": {"type": "text", "index": 11, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_ids": {"type": "bigint[]", "index": 12, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 13, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 14, "name": "company_ids", "comment": "List of companies related to the engagement."}, "is_active": {"type": "boolean", "index": 15, "name": "is_active", "comment": "Whether the engagement is currently being shown in the UI."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagement_tasks"}, "model.hubspot.hubspot__engagements": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__engagements", "database": "postgres", "comment": "Each record represents an engagement", "owner": "postgres"}, "columns": {"contact_ids": {"type": "bigint[]", "index": 1, "name": "contact_ids", "comment": "List of contacts related to the engagement."}, "deal_ids": {"type": "bigint[]", "index": 2, "name": "deal_ids", "comment": "List of deals related to the engagement."}, "company_ids": {"type": "bigint[]", "index": 3, "name": "company_ids", "comment": "List of companies related to the engagement."}, "source_relation": {"type": "text", "index": 4, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 6, "name": "engagement_id", "comment": "The ID of the engagement."}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": "The hub ID."}, "engagement_type": {"type": "text", "index": 8, "name": "engagement_type", "comment": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__engagements"}, "model.hubspot.hubspot__marketing_event_performance": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__marketing_event_performance", "database": "postgres", "comment": "Each record represents a marketing event with aggregated attendance metrics, contact-level participation counts, segment list membership, and optional custom properties (e.g. budget spent).\n", "owner": "postgres"}, "columns": {"marketing_event_performance_id": {"type": "text", "index": 1, "name": "marketing_event_performance_id", "comment": "Surrogate key hashed on `source_relation` and `marketing_event_id`."}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": "Identifies the record's source."}, "is_marketing_event_deleted": {"type": "boolean", "index": 3, "name": "is_marketing_event_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_id": {"type": "bigint", "index": 5, "name": "marketing_event_id", "comment": "The unique ID of the marketing event."}, "app_id": {"type": "character varying", "index": 6, "name": "app_id", "comment": "The string ID of the app associated with the marketing event."}, "app_name": {"type": "character varying", "index": 7, "name": "app_name", "comment": "The name of the app associated with the marketing event."}, "attendees": {"type": "bigint", "index": 8, "name": "attendees", "comment": "Number of attended contact records of a marketing event."}, "cancellations": {"type": "bigint", "index": 9, "name": "cancellations", "comment": "Number of cancelled contact records of a marketing event."}, "created_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "created_timestamp", "comment": "The timestamp when the marketing event was created."}, "end_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "end_timestamp", "comment": "The timestamp when the marketing event ends."}, "event_cancelled": {"type": "boolean", "index": 12, "name": "event_cancelled", "comment": "Boolean indicating whether the marketing event was cancelled."}, "event_completed": {"type": "boolean", "index": 13, "name": "event_completed", "comment": "Boolean indicating whether the marketing event has been completed."}, "event_description": {"type": "character varying", "index": 14, "name": "event_description", "comment": "A description of the marketing event."}, "event_name": {"type": "character varying", "index": 15, "name": "event_name", "comment": "The name of the marketing event."}, "event_organizer": {"type": "character varying", "index": 16, "name": "event_organizer", "comment": "The name of the organizer of the marketing event."}, "event_status": {"type": "character varying", "index": 17, "name": "event_status", "comment": "The current status of the marketing event."}, "event_type": {"type": "character varying", "index": 18, "name": "event_type", "comment": "The type of marketing event."}, "event_url": {"type": "character varying", "index": 19, "name": "event_url", "comment": "A URL in the external event application where the marketing event can be managed."}, "external_event_id": {"type": "character varying", "index": 20, "name": "external_event_id", "comment": "The ID that is associated with this marketing event in the external event application."}, "no_shows": {"type": "bigint", "index": 21, "name": "no_shows", "comment": "Number of no-show contact records of a marketing event."}, "registrants": {"type": "bigint", "index": 22, "name": "registrants", "comment": "Number of registered contact records of a marketing event."}, "start_timestamp": {"type": "timestamp without time zone", "index": 23, "name": "start_timestamp", "comment": "The timestamp when the marketing event starts."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 24, "name": "updated_timestamp", "comment": "The timestamp when the marketing event was last updated."}, "event_duration_minutes": {"type": "double precision", "index": 25, "name": "event_duration_minutes", "comment": "The duration of the event in minutes, calculated from start to end timestamp."}, "attendance_rate": {"type": "numeric", "index": 26, "name": "attendance_rate", "comment": "Ratio of attendees to registrants. Null when registrants is zero."}, "no_show_rate": {"type": "numeric", "index": 27, "name": "no_show_rate", "comment": "Ratio of no-shows to registrants. Null when registrants is zero."}, "cancellation_rate": {"type": "numeric", "index": 28, "name": "cancellation_rate", "comment": "Ratio of cancellations to registrants. Null when registrants is zero."}, "total_contacts": {"type": "bigint", "index": 29, "name": "total_contacts", "comment": "Count of distinct contacts with a record in the participant table."}, "total_attended_contacts": {"type": "bigint", "index": 30, "name": "total_attended_contacts", "comment": "Count of distinct contacts with attendance_state = 'ATTENDED'."}, "total_cancelled_contacts": {"type": "bigint", "index": 31, "name": "total_cancelled_contacts", "comment": "Count of distinct contacts with attendance_state = 'CANCELLED'."}, "total_empty_contacts": {"type": "bigint", "index": 32, "name": "total_empty_contacts", "comment": "Count of distinct contacts with attendance_state = 'EMPTY'."}, "total_no_show_contacts": {"type": "bigint", "index": 33, "name": "total_no_show_contacts", "comment": "Count of distinct contacts with attendance_state = 'NO_SHOW'."}, "total_registered_contacts": {"type": "bigint", "index": 34, "name": "total_registered_contacts", "comment": "Count of distinct contacts with attendance_state = 'REGISTERED'."}, "avg_attendance_duration_seconds": {"type": "numeric", "index": 35, "name": "avg_attendance_duration_seconds", "comment": "Average number of seconds the participation lasted, across all participant records."}, "total_lists": {"type": "bigint", "index": 36, "name": "total_lists", "comment": "Count of active (non-deleted) lists associated with the event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__marketing_event_performance"}, "model.hubspot.hubspot__tickets": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "hubspot__tickets", "database": "postgres", "comment": "Each record represents a ticket in Hubspot. Enabled by setting `hubspot_service_enabled` to `True`.\nCustom columns from `TICKET` can be included by configuring the `hubspot__ticket_pass_through_columns` variable. Custom calculated ticket fields can be added by configuring the `hubspot__ticket_calculated_fields` variable.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "Unique id of a ticket in Hubspot."}, "is_ticket_deleted": {"type": "boolean", "index": 3, "name": "is_ticket_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "closed_date": {"type": "timestamp without time zone", "index": 5, "name": "closed_date", "comment": "The date the ticket was closed."}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": "The date the ticket was created."}, "first_agent_reply_at": {"type": "timestamp without time zone", "index": 7, "name": "first_agent_reply_at", "comment": "The date for the first agent reply on the ticket."}, "ticket_pipeline_id": {"type": "text", "index": 8, "name": "ticket_pipeline_id", "comment": "The ID of the ticket's pipeline."}, "ticket_pipeline_stage_id": {"type": "text", "index": 9, "name": "ticket_pipeline_stage_id", "comment": "The ID of the ticket's pipeline stage."}, "ticket_category": {"type": "text", "index": 10, "name": "ticket_category", "comment": "The category of the ticket."}, "ticket_priority": {"type": "integer", "index": 11, "name": "ticket_priority", "comment": "The priority of the ticket."}, "owner_id": {"type": "integer", "index": 12, "name": "owner_id", "comment": "Foreign key referencing the ID of the ticket's `OWNER`."}, "ticket_subject": {"type": "text", "index": 13, "name": "ticket_subject", "comment": "Short summary of ticket."}, "ticket_content": {"type": "text", "index": 14, "name": "ticket_content", "comment": "Text in body of the ticket."}, "ticket_state": {"type": "text", "index": 15, "name": "ticket_state", "comment": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED."}, "is_closed": {"type": "boolean", "index": 16, "name": "is_closed", "comment": "Boolean indicating if the pipeline stage is closed."}, "pipeline_stage_label": {"type": "text", "index": 17, "name": "pipeline_stage_label", "comment": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot."}, "pipeline_label": {"type": "text", "index": 18, "name": "pipeline_label", "comment": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot."}, "pipeline_stage_order": {"type": "integer", "index": 19, "name": "pipeline_stage_order", "comment": "Order of the ticket's current stage within its given pipeline."}, "is_ticket_pipeline_deleted": {"type": "boolean", "index": 20, "name": "is_ticket_pipeline_deleted", "comment": "Boolean indicating whether the ticket's pipeline is deleted."}, "is_ticket_pipeline_stage_deleted": {"type": "boolean", "index": 21, "name": "is_ticket_pipeline_stage_deleted", "comment": "Boolean indicating whether the ticket's pipeline stage is deleted."}, "owner_active_user_id": {"type": "integer", "index": 22, "name": "owner_active_user_id", "comment": "Unique ID of the active HubSpot user who owns the ticket."}, "owner_email_address": {"type": "text", "index": 23, "name": "owner_email_address", "comment": "The email address of the ticket's owner."}, "owner_full_name": {"type": "text", "index": 24, "name": "owner_full_name", "comment": "Full name of the ticket's owner."}, "owner_primary_team_id": {"type": "bigint", "index": 25, "name": "owner_primary_team_id", "comment": "ID of the primary team assigned to the ticket owner."}, "owner_primary_team_name": {"type": "text", "index": 26, "name": "owner_primary_team_name", "comment": "Name of the primary team assigned to the ticket owner."}, "owner_all_team_ids": {"type": "text", "index": 27, "name": "owner_all_team_ids", "comment": "Comma-separated list of all team IDs associated with the ticket owner."}, "owner_all_team_names": {"type": "text", "index": 28, "name": "owner_all_team_names", "comment": "Comma-separated list of all team names associated with the ticket owner."}, "owner_role_id": {"type": "bigint", "index": 29, "name": "owner_role_id", "comment": "ID of the role assigned to the ticket owner."}, "owner_role_name": {"type": "text", "index": 30, "name": "owner_role_name", "comment": "Name of the role assigned to the ticket owner."}, "deal_ids": {"type": "text[]", "index": 31, "name": "deal_ids", "comment": "Array of `DEAL` ids associated with the ticket."}, "deal_names": {"type": "text[]", "index": 32, "name": "deal_names", "comment": "Array of `DEAL` names associated with the ticket."}, "contact_ids": {"type": "text[]", "index": 33, "name": "contact_ids", "comment": "Array of `CONTACT` ids associated with the ticket."}, "contact_emails": {"type": "text[]", "index": 34, "name": "contact_emails", "comment": "Array of `CONTACT` emails associated with the ticket."}, "company_ids": {"type": "text[]", "index": 35, "name": "company_ids", "comment": "Array of `COMPANY` ids associated with the ticket."}, "company_names": {"type": "text[]", "index": 36, "name": "company_names", "comment": "Array of `COMPANY` names associated with the ticket."}, "count_engagement_notes": {"type": "bigint", "index": 37, "name": "count_engagement_notes", "comment": "The total number of related note engagements."}, "count_engagement_tasks": {"type": "bigint", "index": 38, "name": "count_engagement_tasks", "comment": "The total number of related task engagements."}, "count_engagement_calls": {"type": "bigint", "index": 39, "name": "count_engagement_calls", "comment": "The total number of related call engagements."}, "count_engagement_meetings": {"type": "bigint", "index": 40, "name": "count_engagement_meetings", "comment": "The total number of related meeting engagements."}, "count_engagement_emails": {"type": "bigint", "index": 41, "name": "count_engagement_emails", "comment": "The total number of related email engagements."}, "count_engagement_incoming_emails": {"type": "bigint", "index": 42, "name": "count_engagement_incoming_emails", "comment": "The total number of related incoming email engagements."}, "count_engagement_forwarded_emails": {"type": "bigint", "index": 43, "name": "count_engagement_forwarded_emails", "comment": "The total number of related forwarded email engagements."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.hubspot__tickets"}, "model.hubspot.int_hubspot__company_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__company_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__company_calendar_spine"}, "model.hubspot.int_hubspot__contact_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__contact_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__contact_calendar_spine"}, "model.hubspot.int_hubspot__contact_merge_adjust": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__contact_merge_adjust", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "is_contact_deleted": {"type": "boolean", "index": 3, "name": "is_contact_deleted", "comment": null}, "merged_object_ids": {"type": "text", "index": 4, "name": "merged_object_ids", "comment": null}, "email": {"type": "text", "index": 5, "name": "email", "comment": null}, "contact_company": {"type": "text", "index": 6, "name": "contact_company", "comment": null}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": null}, "job_title": {"type": "integer", "index": 10, "name": "job_title", "comment": null}, "company_annual_revenue": {"type": "integer", "index": 11, "name": "company_annual_revenue", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "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.hubspot.int_hubspot__contact_merge_adjust"}, "model.hubspot.int_hubspot__daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_company_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 3, "name": "company_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "integer", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "timestamp without time zone", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_company_history"}, "model.hubspot.int_hubspot__daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_contact_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "timestamp without time zone", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_contact_history"}, "model.hubspot.int_hubspot__daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_deal_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "timestamp without time zone", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_deal_history"}, "model.hubspot.int_hubspot__daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__daily_ticket_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 3, "name": "ticket_id", "comment": null}, "field_name": {"type": "text", "index": 4, "name": "field_name", "comment": null}, "new_value": {"type": "text", "index": 5, "name": "new_value", "comment": null}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": null}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": null}, "valid_from": {"type": "timestamp without time zone", "index": 8, "name": "valid_from", "comment": null}, "valid_to": {"type": "text", "index": 9, "name": "valid_to", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__daily_ticket_history"}, "model.hubspot.int_hubspot__deal_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__deal_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__deal_calendar_spine"}, "model.hubspot.int_hubspot__deals_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__deals_enhanced", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "deal_name": {"type": "text", "index": 2, "name": "deal_name", "comment": null}, "closed_date": {"type": "timestamp without time zone", "index": 3, "name": "closed_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": null}, "is_deal_deleted": {"type": "boolean", "index": 5, "name": "is_deal_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "deal_id": {"type": "bigint", "index": 7, "name": "deal_id", "comment": null}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "text", "index": 9, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 10, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "description": {"type": "integer", "index": 12, "name": "description", "comment": null}, "amount": {"type": "integer", "index": 13, "name": "amount", "comment": null}, "merged_deal_ids": {"type": "bigint[]", "index": 14, "name": "merged_deal_ids", "comment": null}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 15, "name": "is_deal_pipeline_deleted", "comment": null}, "pipeline_label": {"type": "text", "index": 16, "name": "pipeline_label", "comment": null}, "is_pipeline_active": {"type": "boolean", "index": 17, "name": "is_pipeline_active", "comment": null}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 18, "name": "is_deal_pipeline_stage_deleted", "comment": null}, "deal_pipeline_created_at": {"type": "text", "index": 19, "name": "deal_pipeline_created_at", "comment": null}, "deal_pipeline_updated_at": {"type": "text", "index": 20, "name": "deal_pipeline_updated_at", "comment": null}, "pipeline_stage_label": {"type": "text", "index": 21, "name": "pipeline_stage_label", "comment": null}, "owner_active_user_id": {"type": "integer", "index": 22, "name": "owner_active_user_id", "comment": null}, "owner_email_address": {"type": "text", "index": 23, "name": "owner_email_address", "comment": null}, "owner_full_name": {"type": "text", "index": 24, "name": "owner_full_name", "comment": null}, "owner_primary_team_id": {"type": "bigint", "index": 25, "name": "owner_primary_team_id", "comment": null}, "owner_primary_team_name": {"type": "text", "index": 26, "name": "owner_primary_team_name", "comment": null}, "owner_all_team_ids": {"type": "text", "index": 27, "name": "owner_all_team_ids", "comment": null}, "owner_all_team_names": {"type": "text", "index": 28, "name": "owner_all_team_names", "comment": null}, "owner_role_id": {"type": "bigint", "index": 29, "name": "owner_role_id", "comment": null}, "owner_role_name": {"type": "text", "index": 30, "name": "owner_role_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.hubspot.int_hubspot__deals_enhanced"}, "model.hubspot.int_hubspot__email_metrics__by_contact_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__email_metrics__by_contact_list", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_list_id": {"type": "integer", "index": 1, "name": "contact_list_id", "comment": null}, "source_relation": {"type": "text", "index": 2, "name": "source_relation", "comment": null}, "total_bounces": {"type": "numeric", "index": 3, "name": "total_bounces", "comment": null}, "total_unique_bounces": {"type": "bigint", "index": 4, "name": "total_unique_bounces", "comment": null}, "total_clicks": {"type": "numeric", "index": 5, "name": "total_clicks", "comment": null}, "total_unique_clicks": {"type": "bigint", "index": 6, "name": "total_unique_clicks", "comment": null}, "total_deferrals": {"type": "numeric", "index": 7, "name": "total_deferrals", "comment": null}, "total_unique_deferrals": {"type": "bigint", "index": 8, "name": "total_unique_deferrals", "comment": null}, "total_deliveries": {"type": "numeric", "index": 9, "name": "total_deliveries", "comment": null}, "total_unique_deliveries": {"type": "bigint", "index": 10, "name": "total_unique_deliveries", "comment": null}, "total_drops": {"type": "numeric", "index": 11, "name": "total_drops", "comment": null}, "total_unique_drops": {"type": "bigint", "index": 12, "name": "total_unique_drops", "comment": null}, "total_forwards": {"type": "numeric", "index": 13, "name": "total_forwards", "comment": null}, "total_unique_forwards": {"type": "bigint", "index": 14, "name": "total_unique_forwards", "comment": null}, "total_opens": {"type": "numeric", "index": 15, "name": "total_opens", "comment": null}, "total_unique_opens": {"type": "bigint", "index": 16, "name": "total_unique_opens", "comment": null}, "total_prints": {"type": "numeric", "index": 17, "name": "total_prints", "comment": null}, "total_unique_prints": {"type": "bigint", "index": 18, "name": "total_unique_prints", "comment": null}, "total_spam_reports": {"type": "numeric", "index": 19, "name": "total_spam_reports", "comment": null}, "total_unique_spam_reports": {"type": "bigint", "index": 20, "name": "total_unique_spam_reports", "comment": null}, "total_unsubscribes": {"type": "numeric", "index": 21, "name": "total_unsubscribes", "comment": null}, "total_unique_unsubscribes": {"type": "bigint", "index": 22, "name": "total_unique_unsubscribes", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.int_hubspot__email_metrics__by_contact_list"}, "model.hubspot.int_hubspot__owners_enhanced": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__owners_enhanced", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "owner_id": {"type": "bigint", "index": 2, "name": "owner_id", "comment": null}, "owner_active_user_id": {"type": "integer", "index": 3, "name": "owner_active_user_id", "comment": null}, "owner_email_address": {"type": "text", "index": 4, "name": "owner_email_address", "comment": null}, "owner_full_name": {"type": "text", "index": 5, "name": "owner_full_name", "comment": null}, "owner_primary_team_id": {"type": "bigint", "index": 6, "name": "owner_primary_team_id", "comment": null}, "owner_primary_team_name": {"type": "text", "index": 7, "name": "owner_primary_team_name", "comment": null}, "owner_all_team_ids": {"type": "text", "index": 8, "name": "owner_all_team_ids", "comment": null}, "owner_all_team_names": {"type": "text", "index": 9, "name": "owner_all_team_names", "comment": null}, "owner_role_id": {"type": "bigint", "index": 10, "name": "owner_role_id", "comment": null}, "owner_role_name": {"type": "text", "index": 11, "name": "owner_role_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.hubspot.int_hubspot__owners_enhanced"}, "model.hubspot.int_hubspot__pivot_daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_company_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 3, "name": "company_id", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 4, "name": "hubspot_owner_id", "comment": null}, "lifecyclestage": {"type": "text", "index": 5, "name": "lifecyclestage", "comment": null}, "id": {"type": "text", "index": 6, "name": "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.hubspot.int_hubspot__pivot_daily_company_history"}, "model.hubspot.int_hubspot__pivot_daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_contact_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "lifecyclestage": {"type": "text", "index": 4, "name": "lifecyclestage", "comment": null}, "hs_predictivecontactscore_v2": {"type": "text", "index": 5, "name": "hs_predictivecontactscore_v2", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 6, "name": "hubspot_owner_id", "comment": null}, "id": {"type": "text", "index": 7, "name": "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.hubspot.int_hubspot__pivot_daily_contact_history"}, "model.hubspot.int_hubspot__pivot_daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_deal_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": null}, "deal_pipeline_id": {"type": "text", "index": 4, "name": "deal_pipeline_id", "comment": null}, "pipeline_stage_id": {"type": "text", "index": 5, "name": "pipeline_stage_id", "comment": null}, "amount": {"type": "text", "index": 6, "name": "amount", "comment": null}, "amount_in_home_currency": {"type": "text", "index": 7, "name": "amount_in_home_currency", "comment": null}, "owner_id": {"type": "text", "index": 8, "name": "owner_id", "comment": null}, "hubspot_team_id": {"type": "text", "index": 9, "name": "hubspot_team_id", "comment": null}, "id": {"type": "text", "index": 10, "name": "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.hubspot.int_hubspot__pivot_daily_deal_history"}, "model.hubspot.int_hubspot__pivot_daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_ticket_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 3, "name": "ticket_id", "comment": null}, "hs_pipeline": {"type": "text", "index": 4, "name": "hs_pipeline", "comment": null}, "hs_pipeline_stage": {"type": "text", "index": 5, "name": "hs_pipeline_stage", "comment": null}, "id": {"type": "text", "index": 6, "name": "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.hubspot.int_hubspot__pivot_daily_ticket_history"}, "model.hubspot.int_hubspot__scd_daily_company_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_company_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "company_id": {"type": "bigint", "index": 3, "name": "company_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 5, "name": "hubspot_owner_id", "comment": null}, "lifecyclestage": {"type": "text", "index": 6, "name": "lifecyclestage", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.int_hubspot__scd_daily_company_history"}, "model.hubspot.int_hubspot__scd_daily_contact_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_contact_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "lifecyclestage": {"type": "text", "index": 5, "name": "lifecyclestage", "comment": null}, "hs_predictivecontactscore_v2": {"type": "text", "index": 6, "name": "hs_predictivecontactscore_v2", "comment": null}, "hubspot_owner_id": {"type": "text", "index": 7, "name": "hubspot_owner_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.hubspot.int_hubspot__scd_daily_contact_history"}, "model.hubspot.int_hubspot__scd_daily_deal_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_deal_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "deal_pipeline_id": {"type": "text", "index": 5, "name": "deal_pipeline_id", "comment": null}, "pipeline_stage_id": {"type": "text", "index": 6, "name": "pipeline_stage_id", "comment": null}, "amount": {"type": "text", "index": 7, "name": "amount", "comment": null}, "amount_in_home_currency": {"type": "text", "index": 8, "name": "amount_in_home_currency", "comment": null}, "owner_id": {"type": "text", "index": 9, "name": "owner_id", "comment": null}, "hubspot_team_id": {"type": "text", "index": 10, "name": "hubspot_team_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.hubspot.int_hubspot__scd_daily_deal_history"}, "model.hubspot.int_hubspot__scd_daily_ticket_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_ticket_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 3, "name": "ticket_id", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "hs_pipeline": {"type": "text", "index": 5, "name": "hs_pipeline", "comment": null}, "hs_pipeline_stage": {"type": "text", "index": 6, "name": "hs_pipeline_stage", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.int_hubspot__scd_daily_ticket_history"}, "model.hubspot.int_hubspot__ticket_calendar_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "int_hubspot__ticket_calendar_spine", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "source_relation": {"type": "text", "index": 3, "name": "source_relation", "comment": null}, "id": {"type": "text", "index": 4, "name": "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.hubspot.int_hubspot__ticket_calendar_spine"}, "model.hubspot.stg_hubspot__company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company", "database": "postgres", "comment": "Each record represents a company in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the company."}, "is_company_deleted": {"type": "boolean", "index": 3, "name": "is_company_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "company_name": {"type": "text", "index": 5, "name": "company_name", "comment": "The name of the company."}, "description": {"type": "text", "index": 6, "name": "description", "comment": "A short statement about the company's mission and goals."}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": "The date the company was added to your account."}, "industry": {"type": "text", "index": 8, "name": "industry", "comment": "The type of business the company performs."}, "street_address": {"type": "text", "index": 9, "name": "street_address", "comment": "The street address of the company."}, "street_address_2": {"type": "text", "index": 10, "name": "street_address_2", "comment": "Additional address information for the company."}, "city": {"type": "text", "index": 11, "name": "city", "comment": "The city where the company is located."}, "state": {"type": "text", "index": 12, "name": "state", "comment": "The state where the company is located."}, "country": {"type": "text", "index": 13, "name": "country", "comment": "The country where the company is located."}, "company_annual_revenue": {"type": "integer", "index": 14, "name": "company_annual_revenue", "comment": "The actual or estimated annual revenue of the company."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company"}, "model.hubspot.stg_hubspot__company_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company_list", "database": "postgres", "comment": "Each record represents a company list in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": "The ID of the company list."}, "company_list_name": {"type": "character varying", "index": 3, "name": "company_list_name", "comment": "The name of the company list."}, "created_by_id": {"type": "character varying", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the company list."}, "object_type_id": {"type": "character varying", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "character varying", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'."}, "processing_type": {"type": "character varying", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'."}, "list_version": {"type": "bigint", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "timestamp without time zone", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_company_list_deleted": {"type": "boolean", "index": 10, "name": "is_company_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_list"}, "model.hubspot.stg_hubspot__company_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member", "database": "postgres", "comment": "Each record represents a 'link' between a company and a company list.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_company_list_member_deleted": {"type": "boolean", "index": 2, "name": "is_company_list_member_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "added_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "added_timestamp", "comment": "The timestamp a company was added to a list."}, "company_id": {"type": "bigint", "index": 5, "name": "company_id", "comment": "The ID of the related company."}, "company_list_id": {"type": "bigint", "index": 6, "name": "company_list_id", "comment": "The ID of the related company list."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_list_member"}, "model.hubspot.stg_hubspot__company_list_member_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "timestamp without time zone", "index": 5, "name": "added_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.hubspot.stg_hubspot__company_list_member_tmp"}, "model.hubspot.stg_hubspot__company_list_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_list_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "character varying", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "character varying", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "character varying", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "character varying", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "bigint", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_list_tmp"}, "model.hubspot.stg_hubspot__company_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history", "database": "postgres", "comment": "Each record represents a change to company record in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The date the company property history record became active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the company property history record."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether the company property history record is currently active."}, "company_id": {"type": "bigint", "index": 6, "name": "company_id", "comment": "The ID of the related company record."}, "field_name": {"type": "text", "index": 7, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 8, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "integer", "index": 9, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 11, "name": "new_value", "comment": "The new value of the field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_property_history"}, "model.hubspot.stg_hubspot__company_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "integer", "index": 5, "name": "source_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_property_history_tmp"}, "model.hubspot.stg_hubspot__company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_name": {"type": "text", "index": 4, "name": "property_name", "comment": null}, "property_description": {"type": "text", "index": 5, "name": "property_description", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_createdate", "comment": null}, "property_industry": {"type": "text", "index": 7, "name": "property_industry", "comment": null}, "property_address": {"type": "text", "index": 8, "name": "property_address", "comment": null}, "property_address_2": {"type": "text", "index": 9, "name": "property_address_2", "comment": null}, "property_city": {"type": "text", "index": 10, "name": "property_city", "comment": null}, "property_state": {"type": "text", "index": 11, "name": "property_state", "comment": null}, "property_country": {"type": "text", "index": 12, "name": "property_country", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 13, "name": "property_annualrevenue", "comment": null}, "property_hs_all-funky-a9384-syntax": {"type": "integer", "index": 14, "name": "property_hs_all-funky-a9384-syntax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__company_tmp"}, "model.hubspot.stg_hubspot__contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact", "database": "postgres", "comment": "Each record represents a contact in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": "The ID of the contact."}, "is_contact_deleted": {"type": "boolean", "index": 3, "name": "is_contact_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "merged_object_ids": {"type": "text", "index": 4, "name": "merged_object_ids", "comment": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API."}, "email": {"type": "text", "index": 5, "name": "email", "comment": "The email address of the contact."}, "contact_company": {"type": "text", "index": 6, "name": "contact_company", "comment": "The name of the contact's company."}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": "The contact's first name."}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": "The contact's last name."}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": "The date that the contact was created in your HubSpot account."}, "job_title": {"type": "integer", "index": 10, "name": "job_title", "comment": "The contact's job title."}, "company_annual_revenue": {"type": "integer", "index": 11, "name": "company_annual_revenue", "comment": "The contact's annual company revenue."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact"}, "model.hubspot.stg_hubspot__contact_form_submission": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission", "database": "postgres", "comment": "Table containing contact form submission information.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 2, "name": "occurred_timestamp", "comment": "A Unix timestamp in milliseconds of the time the submission occurred."}, "form_id": {"type": "character varying", "index": 3, "name": "form_id", "comment": "The GUID of the form that the submission belongs to."}, "contact_id": {"type": "bigint", "index": 4, "name": "contact_id", "comment": "The ID of the related contact."}, "conversion_id": {"type": "character varying", "index": 5, "name": "conversion_id", "comment": "A Unique ID for the specific form conversion."}, "page_id": {"type": "integer", "index": 6, "name": "page_id", "comment": "The ID of the related page."}, "page_url": {"type": "text", "index": 7, "name": "page_url", "comment": "The URL that the form was submitted on, if applicable."}, "portal_id": {"type": "integer", "index": 8, "name": "portal_id", "comment": "The hub ID."}, "title": {"type": "text", "index": 9, "name": "title", "comment": "The title of the page that the form was submitted on. This will default to the name of the form if no title is provided."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_form_submission"}, "model.hubspot.stg_hubspot__contact_form_submission_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"timestamp": {"type": "timestamp without time zone", "index": 1, "name": "timestamp", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "conversion_id": {"type": "character varying", "index": 4, "name": "conversion_id", "comment": null}, "page_id": {"type": "integer", "index": 5, "name": "page_id", "comment": null}, "page_url": {"type": "text", "index": 6, "name": "page_url", "comment": null}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__contact_form_submission_tmp"}, "model.hubspot.stg_hubspot__contact_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_list", "database": "postgres", "comment": "Each record represents a contact list in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": "The ID of the contact list."}, "contact_list_name": {"type": "text", "index": 3, "name": "contact_list_name", "comment": "The name of the contact list."}, "created_by_id": {"type": "integer", "index": 4, "name": "created_by_id", "comment": "The unique identifier of the user who created the contact list."}, "object_type_id": {"type": "text", "index": 5, "name": "object_type_id", "comment": "The ID that corresponds to the type of object stored by the list."}, "processing_status": {"type": "text", "index": 6, "name": "processing_status", "comment": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'."}, "processing_type": {"type": "text", "index": 7, "name": "processing_type", "comment": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists."}, "list_version": {"type": "integer", "index": 8, "name": "list_version", "comment": "Represents the version number of the list, incrementing with each modification."}, "filters_updated_at": {"type": "text", "index": 9, "name": "filters_updated_at", "comment": "The timestamp indicating when the list's filters were last updated."}, "is_contact_list_deleted": {"type": "boolean", "index": 10, "name": "is_contact_list_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp of the time that the list was last modified."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 12, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "created_timestamp": {"type": "timestamp without time zone", "index": 13, "name": "created_timestamp", "comment": "A timestamp of the time the list was created."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_list"}, "model.hubspot.stg_hubspot__contact_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member", "database": "postgres", "comment": "Each record represents a 'link' between a contact and a contact list.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_contact_list_member_deleted": {"type": "boolean", "index": 2, "name": "is_contact_list_member_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "added_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "added_timestamp", "comment": "The timestamp a contact was added to a list."}, "contact_id": {"type": "integer", "index": 5, "name": "contact_id", "comment": "The ID of the related contact."}, "contact_list_id": {"type": "integer", "index": 6, "name": "contact_list_id", "comment": "The ID of the related contact list."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_list_member"}, "model.hubspot.stg_hubspot__contact_list_member_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "text", "index": 5, "name": "added_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.hubspot.stg_hubspot__contact_list_member_tmp"}, "model.hubspot.stg_hubspot__contact_list_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "integer", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "text", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "text", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "integer", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "text", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_list_tmp"}, "model.hubspot.stg_hubspot__contact_merge_audit": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit", "database": "postgres", "comment": "Each record contains a contact merge event and the contacts affected by the merge.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "canonical_vid": {"type": "integer", "index": 2, "name": "canonical_vid", "comment": "The contact ID of the contact which the vid_to_merge contact was merged into."}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": "The ID of the contact."}, "entity_id": {"type": "text", "index": 4, "name": "entity_id", "comment": "The ID of the related entity."}, "first_name": {"type": "integer", "index": 5, "name": "first_name", "comment": "The contact's first name."}, "last_name": {"type": "integer", "index": 6, "name": "last_name", "comment": "The contact's last name."}, "num_properties_moved": {"type": "integer", "index": 7, "name": "num_properties_moved", "comment": "The number of properties which were removed from the merged contact."}, "timestamp_at": {"type": "timestamp without time zone", "index": 8, "name": "timestamp_at", "comment": "Timestamp of when the contacts were merged."}, "user_id": {"type": "integer", "index": 9, "name": "user_id", "comment": "The ID of the user."}, "vid_to_merge": {"type": "bigint", "index": 10, "name": "vid_to_merge", "comment": "The ID of the contact which was merged."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 11, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_merge_audit"}, "model.hubspot.stg_hubspot__contact_merge_audit_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"canonical_vid": {"type": "integer", "index": 1, "name": "canonical_vid", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "vid_to_merge": {"type": "bigint", "index": 3, "name": "vid_to_merge", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "entity_id": {"type": "text", "index": 5, "name": "entity_id", "comment": null}, "first_name": {"type": "integer", "index": 6, "name": "first_name", "comment": null}, "last_name": {"type": "integer", "index": 7, "name": "last_name", "comment": null}, "num_properties_moved": {"type": "integer", "index": 8, "name": "num_properties_moved", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 9, "name": "timestamp", "comment": null}, "user_id": {"type": "integer", "index": 10, "name": "user_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.hubspot.stg_hubspot__contact_merge_audit_tmp"}, "model.hubspot.stg_hubspot__contact_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history", "database": "postgres", "comment": "Each record represents a change to contact record in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The date the contact property history record became active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the contact property history record."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether the contact property history record is currently active."}, "contact_id": {"type": "integer", "index": 6, "name": "contact_id", "comment": "The ID of the related contact record."}, "field_name": {"type": "text", "index": 7, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 8, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 9, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 11, "name": "new_value", "comment": "The new value of the field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_property_history"}, "model.hubspot.stg_hubspot__contact_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_property_history_tmp"}, "model.hubspot.stg_hubspot__contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "property_email": {"type": "text", "index": 3, "name": "property_email", "comment": null}, "id": {"type": "integer", "index": 4, "name": "id", "comment": null}, "property_company": {"type": "text", "index": 5, "name": "property_company", "comment": null}, "property_firstname": {"type": "text", "index": 6, "name": "property_firstname", "comment": null}, "property_lastname": {"type": "text", "index": 7, "name": "property_lastname", "comment": null}, "property_email_1": {"type": "text", "index": 8, "name": "property_email_1", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 9, "name": "property_createdate", "comment": null}, "property_jobtitle": {"type": "integer", "index": 10, "name": "property_jobtitle", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 11, "name": "property_annualrevenue", "comment": null}, "property_hs_merged_object_ids": {"type": "text", "index": 12, "name": "property_hs_merged_object_ids", "comment": null}, "property_created_at": {"type": "timestamp without time zone", "index": 13, "name": "property_created_at", "comment": null}, "property_first_conversion_date": {"type": "timestamp without time zone", "index": 14, "name": "property_first_conversion_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__contact_tmp"}, "model.hubspot.stg_hubspot__conversation_actor": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor", "database": "postgres", "comment": "Each record represents an actor (user or contact) in HubSpot conversations.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "actor_id": {"type": "character varying", "index": 3, "name": "actor_id", "comment": "Unique ID of the actor. The first letter corresponds with the type of actor (A- agent, B- bot, S- system, E- email, I- integration, L- customer agent)."}, "avatar": {"type": "character varying", "index": 4, "name": "avatar", "comment": "URL of the actor's avatar image."}, "email": {"type": "character varying", "index": 5, "name": "email", "comment": "Email address of the actor."}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": "Display name of the actor."}, "type": {"type": "text", "index": 7, "name": "type", "comment": "Type of the actor (e.g., VISITOR, AGENT, BOT, SYSTEM)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_actor"}, "model.hubspot.stg_hubspot__conversation_actor_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "avatar": {"type": "character varying", "index": 2, "name": "avatar", "comment": null}, "email": {"type": "character varying", "index": 3, "name": "email", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "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.hubspot.stg_hubspot__conversation_actor_tmp"}, "model.hubspot.stg_hubspot__conversation_channel": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel", "database": "postgres", "comment": "Each record represents a channel through which users can contact your team, such as email, Chat, Facebook Messenger, or WhatsApp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": "Unique ID of the channel."}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": "Display name of the channel."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_channel"}, "model.hubspot.stg_hubspot__conversation_channel_account": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account", "database": "postgres", "comment": "Each record represents an instance of a channel connected to an inbox, such as a specific email address or Facebook Messenger account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "channel_account_id": {"type": "character varying", "index": 4, "name": "channel_account_id", "comment": "Unique ID of the channel account."}, "channel_id": {"type": "character varying", "index": 5, "name": "channel_id", "comment": "ID of the channel this account belongs to."}, "inbox_id": {"type": "character varying", "index": 6, "name": "inbox_id", "comment": "ID of the inbox this channel account is connected to."}, "is_active": {"type": "boolean", "index": 7, "name": "is_active", "comment": "Boolean indicating whether the channel account is active."}, "is_authorized": {"type": "boolean", "index": 8, "name": "is_authorized", "comment": "Boolean indicating whether the channel account is authorized."}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": "Timestamp when the channel account was created."}, "name": {"type": "character varying", "index": 10, "name": "name", "comment": "Display name of the channel account."}, "delivery_identifier_type": {"type": "character varying", "index": 11, "name": "delivery_identifier_type", "comment": "The type of delivery identifier for this channel account (e.g., HS_EMAIL_ADDRESS)."}, "delivery_identifier_value": {"type": "character varying", "index": 12, "name": "delivery_identifier_value", "comment": "The value of the delivery identifier (e.g., the email address)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_channel_account"}, "model.hubspot.stg_hubspot__conversation_channel_account_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "channel_id": {"type": "character varying", "index": 2, "name": "channel_id", "comment": null}, "inbox_id": {"type": "character varying", "index": 3, "name": "inbox_id", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "authorized": {"type": "boolean", "index": 5, "name": "authorized", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 8, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 9, "name": "delivery_identifier_value", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__conversation_channel_account_tmp"}, "model.hubspot.stg_hubspot__conversation_channel_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_channel_tmp"}, "model.hubspot.stg_hubspot__conversation_inbox": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox", "database": "postgres", "comment": "Each record represents a conversation inbox in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "inbox_id": {"type": "character varying", "index": 4, "name": "inbox_id", "comment": "Unique ID of the inbox."}, "is_active": {"type": "boolean", "index": 5, "name": "is_active", "comment": "Boolean indicating whether the inbox is active."}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": "Timestamp when the inbox was created."}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": "Display name of the inbox."}, "type": {"type": "text", "index": 8, "name": "type", "comment": "Type of the inbox (e.g., HELP_DESK, INBOX)."}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": "Timestamp when the inbox was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_inbox"}, "model.hubspot.stg_hubspot__conversation_inbox_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "active": {"type": "boolean", "index": 2, "name": "active", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 7, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_inbox_tmp"}, "model.hubspot.stg_hubspot__conversation_message_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history", "database": "postgres", "comment": "Each record represents a version of a conversation message, tracking changes over time via SCD Type 2.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The (UTC DATETIME) when a record became inactive in the source database."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether this is the currently active version of the record."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "message_id": {"type": "character varying", "index": 7, "name": "message_id", "comment": "Unique ID of the conversation message."}, "thread_id": {"type": "character varying", "index": 8, "name": "thread_id", "comment": "ID of the thread this message belongs to."}, "channel_account_id": {"type": "character varying", "index": 9, "name": "channel_account_id", "comment": "ID of the channel account associated with this message."}, "channel_id": {"type": "character varying", "index": 10, "name": "channel_id", "comment": "ID of the channel associated with this message."}, "from_inbox_id": {"type": "character varying", "index": 11, "name": "from_inbox_id", "comment": "ID of the inbox the message was sent from."}, "to_inbox_id": {"type": "character varying", "index": 12, "name": "to_inbox_id", "comment": "ID of the inbox the message was sent to."}, "assigned_to_actor_id": {"type": "character varying", "index": 13, "name": "assigned_to_actor_id", "comment": "ID of the agent the thread was assigned to at message time."}, "assigned_from_actor_id": {"type": "character varying", "index": 14, "name": "assigned_from_actor_id", "comment": "ID of the previous assignee before this message triggered a reassignment."}, "created_at": {"type": "timestamp without time zone", "index": 15, "name": "created_at", "comment": "Timestamp when the message was created."}, "created_by_actor_id": {"type": "character varying", "index": 16, "name": "created_by_actor_id", "comment": "ID of the user who created the message."}, "created_by_actor_type": {"type": "text", "index": 17, "name": "created_by_actor_type", "comment": "Type of the actor (VISITOR, AGENT, BOT, SYSTEM, EMAIL, INTEGRATION, LLM, OTHER) who created the message. Inferred from the prefix of `created_by_actor_id`."}, "direction": {"type": "text", "index": 18, "name": "direction", "comment": "Direction of the message (e.g., INCOMING, OUTGOING)."}, "in_reply_to_id": {"type": "character varying", "index": 19, "name": "in_reply_to_id", "comment": "ID of the message this message is a reply to."}, "new_status": {"type": "character varying", "index": 20, "name": "new_status", "comment": "The thread status set by this message event (e.g., OPEN, CLOSED)."}, "rich_text": {"type": "character varying", "index": 21, "name": "rich_text", "comment": "HTML-formatted body of the message."}, "subject": {"type": "character varying", "index": 22, "name": "subject", "comment": "Subject line of the message."}, "text": {"type": "character varying", "index": 23, "name": "text", "comment": "Plain-text body of the message."}, "truncation_status": {"type": "text", "index": 24, "name": "truncation_status", "comment": "Indicates whether the message body was truncated (e.g., NOT_TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY, TRUNCATED)."}, "type": {"type": "text", "index": 25, "name": "type", "comment": "Type of the message event (e.g., MESSAGE, COMMENT, WELCOME_MESSAGE)."}, "updated_at": {"type": "timestamp without time zone", "index": 26, "name": "updated_at", "comment": "Timestamp when the message record was last updated."}, "client_type": {"type": "text", "index": 27, "name": "client_type", "comment": "The type of client used to send the message (e.g., SYSTEM, HUBSPOT, INTEGRATION)."}, "status_type": {"type": "text", "index": 28, "name": "status_type", "comment": "The status type of the message (e.g., SENT, RECEIVED)."}, "version_rank": {"type": "bigint", "index": 29, "name": "version_rank", "comment": "Row number ordered by _fivetran_end descending; rank 1 is the most recent active version of the message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_message_history"}, "model.hubspot.stg_hubspot__conversation_message_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "thread_id": {"type": "character varying", "index": 2, "name": "thread_id", "comment": null}, "channel_account_id": {"type": "character varying", "index": 3, "name": "channel_account_id", "comment": null}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": null}, "from_inbox_id": {"type": "character varying", "index": 5, "name": "from_inbox_id", "comment": null}, "to_inbox_id": {"type": "character varying", "index": 6, "name": "to_inbox_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "assigned_from": {"type": "character varying", "index": 8, "name": "assigned_from", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "created_by": {"type": "character varying", "index": 10, "name": "created_by", "comment": null}, "direction": {"type": "character varying", "index": 11, "name": "direction", "comment": null}, "in_reply_to_id": {"type": "character varying", "index": 12, "name": "in_reply_to_id", "comment": null}, "new_status": {"type": "character varying", "index": 13, "name": "new_status", "comment": null}, "rich_text": {"type": "character varying", "index": 14, "name": "rich_text", "comment": null}, "subject": {"type": "character varying", "index": 15, "name": "subject", "comment": null}, "text": {"type": "character varying", "index": 16, "name": "text", "comment": null}, "truncation_status": {"type": "character varying", "index": 17, "name": "truncation_status", "comment": null}, "type": {"type": "character varying", "index": 18, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 19, "name": "updated_at", "comment": null}, "client_type": {"type": "character varying", "index": 20, "name": "client_type", "comment": null}, "status_type": {"type": "character varying", "index": 21, "name": "status_type", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 22, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 23, "name": "_fivetran_synced", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 25, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 26, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_message_history_tmp"}, "model.hubspot.stg_hubspot__conversation_message_recipient": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient", "database": "postgres", "comment": "Each record represents a recipient associated with a conversation message.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_id": {"type": "character varying", "index": 3, "name": "_fivetran_id", "comment": "Unique ID generated by Fivetran for this recipient record."}, "actor_id": {"type": "character varying", "index": 4, "name": "actor_id", "comment": "ID of the actor (user or contact) who received the message."}, "message_id": {"type": "character varying", "index": 5, "name": "message_id", "comment": "ID of the message this recipient is associated with."}, "thread_id": {"type": "character varying", "index": 6, "name": "thread_id", "comment": "ID of the thread this message belongs to."}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": "Display name of the recipient."}, "recipient_field": {"type": "character varying", "index": 8, "name": "recipient_field", "comment": "The role of this recipient in the message (e.g., TO, CC, BCC)."}, "delivery_identifier_type": {"type": "character varying", "index": 9, "name": "delivery_identifier_type", "comment": "The type of delivery identifier for the recipient (e.g., HS_EMAIL_ADDRESS)."}, "delivery_identifier_value": {"type": "character varying", "index": 10, "name": "delivery_identifier_value", "comment": "The value of the delivery identifier (e.g., the email address)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_message_recipient"}, "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "character varying", "index": 1, "name": "_fivetran_id", "comment": null}, "actor_id": {"type": "character varying", "index": 2, "name": "actor_id", "comment": null}, "message_id": {"type": "character varying", "index": 3, "name": "message_id", "comment": null}, "thread_id": {"type": "character varying", "index": 4, "name": "thread_id", "comment": null}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": null}, "recipient_field": {"type": "character varying", "index": 6, "name": "recipient_field", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 7, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 8, "name": "delivery_identifier_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__conversation_message_recipient_tmp"}, "model.hubspot.stg_hubspot__conversation_thread": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread", "database": "postgres", "comment": "Each record represents a conversation thread in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "conversation_thread_id": {"type": "character varying", "index": 3, "name": "conversation_thread_id", "comment": "Unique ID of the conversation thread."}, "inbox_id": {"type": "character varying", "index": 4, "name": "inbox_id", "comment": "ID of the inbox the thread belongs to."}, "associated_contact_id": {"type": "integer", "index": 5, "name": "associated_contact_id", "comment": "ID of the contact associated with the thread."}, "associated_ticket_id": {"type": "integer", "index": 6, "name": "associated_ticket_id", "comment": "ID of the ticket associated with the thread."}, "original_channel_account_id": {"type": "character varying", "index": 7, "name": "original_channel_account_id", "comment": "ID of the channel account through which the thread was originally created."}, "original_channel_id": {"type": "character varying", "index": 8, "name": "original_channel_id", "comment": "ID of the channel through which the thread was originally created."}, "assigned_to_actor_id": {"type": "character varying", "index": 9, "name": "assigned_to_actor_id", "comment": "ID of the agent the thread is assigned to."}, "closed_at": {"type": "timestamp without time zone", "index": 10, "name": "closed_at", "comment": "Timestamp when the thread was closed."}, "created_at": {"type": "timestamp without time zone", "index": 11, "name": "created_at", "comment": "Timestamp when the thread was created."}, "latest_message_at": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_at", "comment": "Timestamp of the most recent message (sent or received) in the thread."}, "latest_message_received_at": {"type": "timestamp without time zone", "index": 13, "name": "latest_message_received_at", "comment": "Timestamp of the most recently received message in the thread."}, "latest_message_sent_at": {"type": "timestamp without time zone", "index": 14, "name": "latest_message_sent_at", "comment": "Timestamp of the most recently sent message in the thread."}, "is_spam": {"type": "character varying", "index": 15, "name": "is_spam", "comment": "Indicates whether the thread has been marked as spam."}, "status": {"type": "character varying", "index": 16, "name": "status", "comment": "Current status of the thread (e.g., OPEN, CLOSED)."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_thread"}, "model.hubspot.stg_hubspot__conversation_thread_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "inbox_id": {"type": "character varying", "index": 2, "name": "inbox_id", "comment": null}, "associated_contact_id": {"type": "character varying", "index": 3, "name": "associated_contact_id", "comment": null}, "associated_ticket_id": {"type": "character varying", "index": 4, "name": "associated_ticket_id", "comment": null}, "original_channel_account_id": {"type": "character varying", "index": 5, "name": "original_channel_account_id", "comment": null}, "original_channel_id": {"type": "character varying", "index": 6, "name": "original_channel_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "closed_at": {"type": "timestamp without time zone", "index": 8, "name": "closed_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "latest_message_received_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "latest_message_received_timestamp", "comment": null}, "latest_message_sent_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "latest_message_sent_timestamp", "comment": null}, "latest_message_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_timestamp", "comment": null}, "spam": {"type": "character varying", "index": 13, "name": "spam", "comment": null}, "status": {"type": "character varying", "index": 14, "name": "status", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 15, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__conversation_thread_tmp"}, "model.hubspot.stg_hubspot__deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal", "database": "postgres", "comment": "Each record represents a deal in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "deal_name": {"type": "text", "index": 2, "name": "deal_name", "comment": "The name you have given this deal."}, "closed_date": {"type": "timestamp without time zone", "index": 3, "name": "closed_date", "comment": "The day the deal is expected to close, or was closed."}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": "The date the deal was created. This property is set automatically by HubSpot."}, "is_deal_deleted": {"type": "boolean", "index": 5, "name": "is_deal_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 7, "name": "deal_id", "comment": "The ID of the deal"}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": "The ID of the deal's pipeline."}, "deal_pipeline_stage_id": {"type": "text", "index": 9, "name": "deal_pipeline_stage_id", "comment": "The ID of the deal's pipeline stage."}, "owner_id": {"type": "bigint", "index": 10, "name": "owner_id", "comment": "The ID of the deal's owner."}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": "The hub ID."}, "description": {"type": "integer", "index": 12, "name": "description", "comment": "A brief description of the deal."}, "amount": {"type": "integer", "index": 13, "name": "amount", "comment": "The total value of the deal in the deal's currency."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal"}, "model.hubspot.stg_hubspot__deal_company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_company", "database": "postgres", "comment": "Each record represents a 'link' between a deal and company.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "company_id": {"type": "integer", "index": 2, "name": "company_id", "comment": "The ID of the company."}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": "The ID of the deal."}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": "The ID of the type."}, "category": {"type": "text", "index": 5, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_company"}, "model.hubspot.stg_hubspot__deal_company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "integer", "index": 1, "name": "company_id", "comment": null}, "deal_id": {"type": "integer", "index": 2, "name": "deal_id", "comment": null}, "type_id": {"type": "integer", "index": 3, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_company_tmp"}, "model.hubspot.stg_hubspot__deal_contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact", "database": "postgres", "comment": "Each record represents a 'link' between a deal and contact.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "contact_id": {"type": "bigint", "index": 2, "name": "contact_id", "comment": "The ID of the contact."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "The ID of the deal."}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": "The ID of the type."}, "category": {"type": "text", "index": 5, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_contact"}, "model.hubspot.stg_hubspot__deal_contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 5, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_contact_tmp"}, "model.hubspot.stg_hubspot__deal_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline", "database": "postgres", "comment": "Each record represents a pipeline in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_deal_pipeline_deleted": {"type": "boolean", "index": 2, "name": "is_deal_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 4, "name": "is_active", "comment": "Whether the stage is currently in use."}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": "Used to determine the order in which the pipelines appear when viewed in HubSpot"}, "pipeline_label": {"type": "text", "index": 6, "name": "pipeline_label", "comment": "The human-readable label for the pipeline. The label is used when showing the pipeline in HubSpot."}, "deal_pipeline_id": {"type": "text", "index": 7, "name": "deal_pipeline_id", "comment": "The ID of the pipeline."}, "deal_pipeline_created_at": {"type": "text", "index": 8, "name": "deal_pipeline_created_at", "comment": "A timestamp representing when the record was created."}, "deal_pipeline_updated_at": {"type": "text", "index": 9, "name": "deal_pipeline_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline"}, "model.hubspot.stg_hubspot__deal_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage", "database": "postgres", "comment": "Each record represents a pipeline stage in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_deal_pipeline_stage_deleted": {"type": "boolean", "index": 2, "name": "is_deal_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 4, "name": "is_active", "comment": "Whether the pipeline stage is currently in use."}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal (\"Closed Won\" vs \"Closed Lost\"), refer to the pipeline_stage_label column."}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "pipeline_stage_label": {"type": "text", "index": 7, "name": "pipeline_stage_label", "comment": "The human-readable label for the stage. The label is used when showing the stage in HubSpot."}, "deal_pipeline_id": {"type": "text", "index": 8, "name": "deal_pipeline_id", "comment": "The ID of the related pipeline."}, "probability": {"type": "double precision", "index": 9, "name": "probability", "comment": "The probability that the deal will close. Used for the deal forecast."}, "deal_pipeline_stage_id": {"type": "text", "index": 10, "name": "deal_pipeline_stage_id", "comment": "The ID of the pipeline stage."}, "deal_pipeline_stage_created_at": {"type": "text", "index": 11, "name": "deal_pipeline_stage_created_at", "comment": "A timestamp representing when the record was created."}, "deal_pipeline_stage_updated_at": {"type": "text", "index": 12, "name": "deal_pipeline_stage_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage"}, "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 3, "name": "active", "comment": null}, "closed_won": {"type": "boolean", "index": 4, "name": "closed_won", "comment": null}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": null}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": null}, "probability": {"type": "double precision", "index": 7, "name": "probability", "comment": null}, "stage_id": {"type": "character varying(100)", "index": 8, "name": "stage_id", "comment": null}, "label": {"type": "text", "index": 9, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying(100)", "index": 10, "name": "pipeline_id", "comment": null}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 12, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"}, "model.hubspot.stg_hubspot__deal_pipeline_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying(100)", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 8, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_tmp"}, "model.hubspot.stg_hubspot__deal_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history", "database": "postgres", "comment": "Each record represents the details of your deal properties.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_start", "comment": "The date the deal property history record became active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the deal property history record."}, "_fivetran_active": {"type": "boolean", "index": 5, "name": "_fivetran_active", "comment": "Boolean indicating whether the deal property history record is currently active."}, "deal_id": {"type": "bigint", "index": 6, "name": "deal_id", "comment": "The ID of the related deal record."}, "field_name": {"type": "text", "index": 7, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 8, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 9, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 11, "name": "new_value", "comment": "The new value of the field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_property_history"}, "model.hubspot.stg_hubspot__deal_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "source_id": {"type": "text", "index": 6, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_property_history_tmp"}, "model.hubspot.stg_hubspot__deal_stage": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage", "database": "postgres", "comment": "Each record represents a deal stage.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "date_entered": {"type": "timestamp without time zone", "index": 2, "name": "date_entered", "comment": "The timestamp the deal stage was entered."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "Reference to the deal."}, "source": {"type": "text", "index": 4, "name": "source", "comment": "The relevant source of the deal stage."}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": "Reference to the source."}, "deal_stage_name": {"type": "text", "index": 6, "name": "deal_stage_name", "comment": "The value of the deal stage. Typically the name of the stage."}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": "Boolean indicating whether the deal stage is active."}, "_fivetran_end": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_end", "comment": "The Fivetran calculated exit time of the deal stage."}, "_fivetran_start": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_start", "comment": "The date the deal stage was entered."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_stage"}, "model.hubspot.stg_hubspot__deal_stage_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_start": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_start", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 3, "name": "_fivetran_active", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "date_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_entered", "comment": null}, "source": {"type": "text", "index": 7, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 8, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 9, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_stage_tmp"}, "model.hubspot.stg_hubspot__deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "deal_pipeline_id": {"type": "character varying(100)", "index": 3, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "character varying(100)", "index": 4, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 5, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 6, "name": "portal_id", "comment": null}, "property_dealname": {"type": "text", "index": 7, "name": "property_dealname", "comment": null}, "property_description": {"type": "integer", "index": 8, "name": "property_description", "comment": null}, "property_amount": {"type": "integer", "index": 9, "name": "property_amount", "comment": null}, "property_closedate": {"type": "timestamp without time zone", "index": 10, "name": "property_closedate", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 11, "name": "property_createdate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__deal_tmp"}, "model.hubspot.stg_hubspot__email_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign", "database": "postgres", "comment": "Each record represents an email campaign in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": "The app ID."}, "app_name": {"type": "text", "index": 4, "name": "app_name", "comment": "The app name."}, "content_id": {"type": "bigint", "index": 5, "name": "content_id", "comment": "The ID of the content."}, "email_campaign_id": {"type": "bigint", "index": 6, "name": "email_campaign_id", "comment": "The ID of the email campaign."}, "email_campaign_name": {"type": "text", "index": 7, "name": "email_campaign_name", "comment": "The name of the email campaign."}, "num_included": {"type": "integer", "index": 8, "name": "num_included", "comment": "The number of messages included as part of the email campaign."}, "num_queued": {"type": "integer", "index": 9, "name": "num_queued", "comment": "The number of messages queued as part of the email campaign."}, "email_campaign_sub_type": {"type": "integer", "index": 10, "name": "email_campaign_sub_type", "comment": "The email campaign sub-type."}, "email_campaign_subject": {"type": "text", "index": 11, "name": "email_campaign_subject", "comment": "The subject of the email campaign."}, "email_campaign_type": {"type": "text", "index": 12, "name": "email_campaign_type", "comment": "The email campaign type."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_campaign"}, "model.hubspot.stg_hubspot__email_campaign_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "content_id": {"type": "bigint", "index": 4, "name": "content_id", "comment": null}, "num_included": {"type": "integer", "index": 5, "name": "num_included", "comment": null}, "num_queued": {"type": "integer", "index": 6, "name": "num_queued", "comment": null}, "sub_type": {"type": "integer", "index": 7, "name": "sub_type", "comment": null}, "type": {"type": "text", "index": 8, "name": "type", "comment": null}, "app_name": {"type": "text", "index": 9, "name": "app_name", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "subject": {"type": "text", "index": 11, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_campaign_tmp"}, "model.hubspot.stg_hubspot__email_event": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event", "database": "postgres", "comment": "Each record represents an email event in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": "The ID of the app that sent the email."}, "caused_timestamp": {"type": "timestamp without time zone", "index": 4, "name": "caused_timestamp", "comment": "The timestamp of the event that caused this event."}, "caused_by_event_id": {"type": "integer", "index": 5, "name": "caused_by_event_id", "comment": "The event ID which uniquely identifies the event which directly caused this event. If not applicable, this property is omitted."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The created timestamp of the event."}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": "The ID of the related email campaign."}, "is_filtered_event": {"type": "boolean", "index": 8, "name": "is_filtered_event", "comment": "A boolean representing whether the event has been filtered out of reporting based on customer reports settings or not."}, "event_id": {"type": "text", "index": 9, "name": "event_id", "comment": "The ID of the event."}, "obsoleted_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "obsoleted_timestamp", "comment": "The timestamp of the event that made the current event obsolete."}, "obsoleted_by_event_id": {"type": "integer", "index": 11, "name": "obsoleted_by_event_id", "comment": "The event ID which uniquely identifies the follow-on event which makes this current event obsolete. If not applicable, this property is omitted."}, "portal_id": {"type": "integer", "index": 12, "name": "portal_id", "comment": "The hub ID."}, "recipient_email_address": {"type": "text", "index": 13, "name": "recipient_email_address", "comment": "The email address of the contact related to the event."}, "sent_timestamp": {"type": "timestamp without time zone", "index": 14, "name": "sent_timestamp", "comment": "The timestamp of the SENT event related to this event."}, "sent_by_event_id": {"type": "text", "index": 15, "name": "sent_by_event_id", "comment": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted."}, "event_type": {"type": "text", "index": 16, "name": "event_type", "comment": "The type of event."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event"}, "model.hubspot.stg_hubspot__email_event_bounce": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce", "database": "postgres", "comment": "Each record represents a BOUNCE email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bounce_category": {"type": "text", "index": 3, "name": "bounce_category", "comment": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "returned_status": {"type": "integer", "index": 6, "name": "returned_status", "comment": "The status code returned from the recipient's email server."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_bounce"}, "model.hubspot.stg_hubspot__email_event_bounce_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 3, "name": "category", "comment": null}, "status": {"type": "integer", "index": 4, "name": "status", "comment": null}, "response": {"type": "text", "index": 5, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_bounce_tmp"}, "model.hubspot.stg_hubspot__email_event_click": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click", "database": "postgres", "comment": "Each record represents a CLICK email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "referer_url": {"type": "integer", "index": 7, "name": "referer_url", "comment": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client."}, "click_url": {"type": "text", "index": 8, "name": "click_url", "comment": "The URL within the message that the recipient clicked."}, "user_agent": {"type": "text", "index": 9, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_click"}, "model.hubspot.stg_hubspot__email_event_click_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "referer": {"type": "integer", "index": 3, "name": "referer", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_click_tmp"}, "model.hubspot.stg_hubspot__email_event_deferred": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred", "database": "postgres", "comment": "Each record represents a DEFERRED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "attempt_number": {"type": "integer", "index": 3, "name": "attempt_number", "comment": "The delivery attempt number."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "integer", "index": 5, "name": "returned_response", "comment": "The full response from the recipient's email server."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_deferred"}, "model.hubspot.stg_hubspot__email_event_deferred_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "attempt": {"type": "integer", "index": 3, "name": "attempt", "comment": null}, "response": {"type": "integer", "index": 4, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_deferred_tmp"}, "model.hubspot.stg_hubspot__email_event_delivered": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered", "database": "postgres", "comment": "Each record represents a DELIVERED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "returned_response": {"type": "text", "index": 4, "name": "returned_response", "comment": "The full response from the recipient's email server."}, "smtp_id": {"type": "text", "index": 5, "name": "smtp_id", "comment": "An ID attached to the message by HubSpot."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_delivered"}, "model.hubspot.stg_hubspot__email_event_delivered_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "response": {"type": "text", "index": 3, "name": "response", "comment": null}, "smtp_id": {"type": "text", "index": 4, "name": "smtp_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.hubspot.stg_hubspot__email_event_delivered_tmp"}, "model.hubspot.stg_hubspot__email_event_dropped": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped", "database": "postgres", "comment": "Each record represents a DROPPED email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "drop_message": {"type": "text", "index": 5, "name": "drop_message", "comment": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'."}, "drop_reason": {"type": "text", "index": 6, "name": "drop_reason", "comment": "The reason why the email message was dropped. See below for the possible values."}, "from_email": {"type": "text", "index": 7, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 8, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 9, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 10, "name": "email_subject", "comment": "The subject line of the email message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_dropped"}, "model.hubspot.stg_hubspot__email_event_dropped_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "drop_reason": {"type": "text", "index": 3, "name": "drop_reason", "comment": null}, "bcc": {"type": "text", "index": 4, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 5, "name": "cc", "comment": null}, "drop_message": {"type": "text", "index": 6, "name": "drop_message", "comment": null}, "from": {"type": "text", "index": 7, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 8, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 9, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_dropped_tmp"}, "model.hubspot.stg_hubspot__email_event_forward": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward", "database": "postgres", "comment": "Each record represents a FORWARD email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_forward"}, "model.hubspot.stg_hubspot__email_event_forward_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_forward_tmp"}, "model.hubspot.stg_hubspot__email_event_open": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open", "database": "postgres", "comment": "Each record represents a OPEN email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "duration_open": {"type": "integer", "index": 4, "name": "duration_open", "comment": "If provided and nonzero, the approximate number of milliseconds the user had opened the email."}, "event_id": {"type": "text", "index": 5, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 7, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_open"}, "model.hubspot.stg_hubspot__email_event_open_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "duration": {"type": "integer", "index": 3, "name": "duration", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 6, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_open_tmp"}, "model.hubspot.stg_hubspot__email_event_print": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print", "database": "postgres", "comment": "Each record represents a PRINT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "geo_location": {"type": "text", "index": 6, "name": "geo_location", "comment": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_print"}, "model.hubspot.stg_hubspot__email_event_print_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_print_tmp"}, "model.hubspot.stg_hubspot__email_event_sent": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent", "database": "postgres", "comment": "Each record represents a SENT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "bcc_emails": {"type": "text", "index": 3, "name": "bcc_emails", "comment": "The 'bcc' field of the email message."}, "cc_emails": {"type": "text", "index": 4, "name": "cc_emails", "comment": "The 'cc' field of the email message."}, "from_email": {"type": "text", "index": 5, "name": "from_email", "comment": "The 'from' field of the email message."}, "event_id": {"type": "text", "index": 6, "name": "event_id", "comment": "The ID of the event."}, "reply_to_email": {"type": "text", "index": 7, "name": "reply_to_email", "comment": "The 'reply-to' field of the email message."}, "email_subject": {"type": "text", "index": 8, "name": "email_subject", "comment": "The subject line of the email message."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_sent"}, "model.hubspot.stg_hubspot__email_event_sent_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bcc": {"type": "text", "index": 3, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 4, "name": "cc", "comment": null}, "from": {"type": "text", "index": 5, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 6, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_sent_tmp"}, "model.hubspot.stg_hubspot__email_event_spam_report": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report", "database": "postgres", "comment": "Each record represents a SPAM_REPORT email event.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "event_id": {"type": "text", "index": 3, "name": "event_id", "comment": "The ID of the event."}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": "The contact's IP address when the event occurred."}, "user_agent": {"type": "integer", "index": 5, "name": "user_agent", "comment": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report"}, "model.hubspot.stg_hubspot__email_event_spam_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "ip_address": {"type": "integer", "index": 3, "name": "ip_address", "comment": null}, "user_agent": {"type": "integer", "index": 4, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report_tmp"}, "model.hubspot.stg_hubspot__email_event_status_change": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change", "database": "postgres", "comment": "Each record represents a STATUS_CHANGE email event in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_bounced": {"type": "integer", "index": 3, "name": "is_bounced", "comment": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n"}, "event_id": {"type": "text", "index": 4, "name": "event_id", "comment": "The ID of the event."}, "subscription_status": {"type": "text", "index": 5, "name": "subscription_status", "comment": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n"}, "requested_by_email": {"type": "integer", "index": 6, "name": "requested_by_email", "comment": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted."}, "change_source": {"type": "text", "index": 7, "name": "change_source", "comment": "The source of the subscription change."}, "subscriptions": {"type": "text", "index": 8, "name": "subscriptions", "comment": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_status_change"}, "model.hubspot.stg_hubspot__email_event_status_change_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bounced": {"type": "integer", "index": 3, "name": "bounced", "comment": null}, "portal_subscription_status": {"type": "text", "index": 4, "name": "portal_subscription_status", "comment": null}, "requested_by": {"type": "integer", "index": 5, "name": "requested_by", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "subscriptions": {"type": "text", "index": 7, "name": "subscriptions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_status_change_tmp"}, "model.hubspot.stg_hubspot__email_event_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__email_event_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "caused_by_created": {"type": "timestamp without time zone", "index": 4, "name": "caused_by_created", "comment": null}, "caused_by_id": {"type": "integer", "index": 5, "name": "caused_by_id", "comment": null}, "created": {"type": "timestamp without time zone", "index": 6, "name": "created", "comment": null}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": null}, "obsoleted_by_created": {"type": "timestamp without time zone", "index": 8, "name": "obsoleted_by_created", "comment": null}, "obsoleted_by_id": {"type": "integer", "index": 9, "name": "obsoleted_by_id", "comment": null}, "portal_id": {"type": "integer", "index": 10, "name": "portal_id", "comment": null}, "sent_by_created": {"type": "timestamp without time zone", "index": 11, "name": "sent_by_created", "comment": null}, "sent_by_id": {"type": "text", "index": 12, "name": "sent_by_id", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "filtered_event": {"type": "boolean", "index": 14, "name": "filtered_event", "comment": null}, "recipient": {"type": "text", "index": 15, "name": "recipient", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__email_event_tmp"}, "model.hubspot.stg_hubspot__engagement": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement", "database": "postgres", "comment": "Each record represents an engagement", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": "The hub ID."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement"}, "model.hubspot.stg_hubspot__engagement_call": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call", "database": "postgres", "comment": "Each record represents a CALL engagement event. All source `property_hs_*` fields", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "source_relation": {"type": "text", "index": 9, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_call"}, "model.hubspot.stg_hubspot__engagement_call_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_call_tmp"}, "model.hubspot.stg_hubspot__engagement_communication": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication", "database": "postgres", "comment": "Each record represents a 'link' between a communication and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "ID of the engagement associated with the communication."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "source_relation": {"type": "text", "index": 9, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_communication"}, "model.hubspot.stg_hubspot__engagement_communication_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_communication_tmp"}, "model.hubspot.stg_hubspot__engagement_company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company", "database": "postgres", "comment": "Each record represents a 'link' between a company and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "company_id": {"type": "bigint", "index": 2, "name": "company_id", "comment": "The ID of the related company."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 6, "name": "type_id", "comment": null}, "source_relation": {"type": "text", "index": 7, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_company"}, "model.hubspot.stg_hubspot__engagement_company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_company_tmp"}, "model.hubspot.stg_hubspot__engagement_contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact", "database": "postgres", "comment": "Each record represents a 'link' between a contact and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "contact_id": {"type": "bigint", "index": 2, "name": "contact_id", "comment": "The ID of the related contact."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 6, "name": "type_id", "comment": null}, "source_relation": {"type": "text", "index": 7, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_contact"}, "model.hubspot.stg_hubspot__engagement_contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_contact_tmp"}, "model.hubspot.stg_hubspot__engagement_deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal", "database": "postgres", "comment": "Each record represents a 'link' between a deal and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": "The ID of the related deal."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "engagement_type": {"type": "text", "index": 5, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 6, "name": "type_id", "comment": null}, "source_relation": {"type": "text", "index": 7, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_deal"}, "model.hubspot.stg_hubspot__engagement_deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_deal_tmp"}, "model.hubspot.stg_hubspot__engagement_email": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email", "database": "postgres", "comment": "Each record represents an EMAIL engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": "The type of the engagement."}, "engagement_id": {"type": "bigint", "index": 4, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the email's time of occurrence and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the email. This field determines the team listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "all_owner_ids": {"type": "integer", "index": 9, "name": "all_owner_ids", "comment": null}, "all_team_ids": {"type": "integer", "index": 10, "name": "all_team_ids", "comment": null}, "email_subject": {"type": "text", "index": 11, "name": "email_subject", "comment": null}, "email_text": {"type": "text", "index": 12, "name": "email_text", "comment": null}, "lastmodifieddate": {"type": "text", "index": 13, "name": "lastmodifieddate", "comment": null}, "modified_by": {"type": "integer", "index": 14, "name": "modified_by", "comment": null}, "source_relation": {"type": "text", "index": 15, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_email"}, "model.hubspot.stg_hubspot__engagement_email_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_all_owner_ids": {"type": "integer", "index": 4, "name": "property_hs_all_owner_ids", "comment": null}, "property_hs_all_team_ids": {"type": "integer", "index": 5, "name": "property_hs_all_team_ids", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_hs_createdate", "comment": null}, "property_hs_email_subject": {"type": "text", "index": 7, "name": "property_hs_email_subject", "comment": null}, "property_hs_email_text": {"type": "text", "index": 8, "name": "property_hs_email_text", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 9, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_modified_by": {"type": "integer", "index": 10, "name": "property_hs_modified_by", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 12, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 13, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_email_tmp"}, "model.hubspot.stg_hubspot__engagement_meeting": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting", "database": "postgres", "comment": "Each record represents a MEETING engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": "The type of the engagement."}, "engagement_id": {"type": "bigint", "index": 4, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the meeting's time of creation and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the meeting's time of occurrence and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the meeting. This field determines the user listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the meeting. This field determines the team listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "created_from_link_id": {"type": "integer", "index": 9, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 10, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 11, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 12, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 13, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 14, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 15, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 16, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 17, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 18, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 19, "name": "title", "comment": null}, "source_relation": {"type": "text", "index": 20, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_meeting"}, "model.hubspot.stg_hubspot__engagement_meeting_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_from_link_id": {"type": "integer", "index": 3, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 4, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 5, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 8, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 9, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 10, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 11, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 12, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 13, "name": "title", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_meeting_tmp"}, "model.hubspot.stg_hubspot__engagement_note": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note", "database": "postgres", "comment": "Each record represents a NOTE engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "note": {"type": "text", "index": 3, "name": "note", "comment": "The body of the note. The body has a limit of 65536 characters."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "engagement_id": {"type": "bigint", "index": 5, "name": "engagement_id", "comment": "The ID of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "This field marks the note's time of creation and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "occurred_timestamp", "comment": "This field marks the note's time of occurrence and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 8, "name": "owner_id", "comment": "The ID of the owner associated with the note. This field determines the user listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 9, "name": "team_id", "comment": "The ID of the team associated with the note. This field determines the team listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "body_preview": {"type": "text", "index": 10, "name": "body_preview", "comment": null}, "lastmodifieddate": {"type": "text", "index": 11, "name": "lastmodifieddate", "comment": null}, "note_body": {"type": "text", "index": 12, "name": "note_body", "comment": null}, "source_relation": {"type": "text", "index": 13, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_note"}, "model.hubspot.stg_hubspot__engagement_note_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_body_preview": {"type": "text", "index": 4, "name": "property_hs_body_preview", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_createdate", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 6, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_note_body": {"type": "text", "index": 7, "name": "property_hs_note_body", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 9, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 10, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 11, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_note_tmp"}, "model.hubspot.stg_hubspot__engagement_task": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task", "database": "postgres", "comment": "Each record represents a TASK engagement event.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": "Boolean to mark rows that were deleted in the source database."}, "engagement_id": {"type": "bigint", "index": 3, "name": "engagement_id", "comment": "The ID of the engagement."}, "engagement_type": {"type": "text", "index": 4, "name": "engagement_type", "comment": "The type of the engagement."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "This field marks the task's time of creation and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "occurred_timestamp", "comment": "This field marks the task's time of occurrence and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "owner_id": {"type": "integer", "index": 7, "name": "owner_id", "comment": "The ID of the owner associated with the task. This field determines the user listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n"}, "team_id": {"type": "integer", "index": 8, "name": "team_id", "comment": "The ID of the team associated with the task. This field determines the team listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n"}, "task_type": {"type": "text", "index": 9, "name": "task_type", "comment": null}, "object_id": {"type": "bigint", "index": 10, "name": "object_id", "comment": null}, "engagement_source": {"type": "text", "index": 11, "name": "engagement_source", "comment": null}, "source_relation": {"type": "text", "index": 12, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_task"}, "model.hubspot.stg_hubspot__engagement_task_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_object_id": {"type": "bigint", "index": 5, "name": "property_hs_object_id", "comment": null}, "property_hs_task_type": {"type": "text", "index": 6, "name": "property_hs_task_type", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 8, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 9, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 10, "name": "type", "comment": null}, "task_type": {"type": "text", "index": 11, "name": "task_type", "comment": null}, "property_hs_engagement_source": {"type": "text", "index": 12, "name": "property_hs_engagement_source", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__engagement_task_tmp"}, "model.hubspot.stg_hubspot__engagement_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__engagement_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "type": {"type": "text", "index": 2, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_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.hubspot.stg_hubspot__engagement_tmp"}, "model.hubspot.stg_hubspot__form": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__form", "database": "postgres", "comment": "Each record represents a form created in HubSpot, including metadata about its configuration and behavior.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": "Unique identifier for the form."}, "action": {"type": "text", "index": 3, "name": "action", "comment": "The form action type or endpoint triggered upon submission."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Timestamp when the form was created."}, "css_class": {"type": "text", "index": 5, "name": "css_class", "comment": "CSS class applied to the form for styling purposes."}, "follow_up_id": {"type": "integer", "index": 6, "name": "follow_up_id", "comment": "ID of the follow-up action or workflow triggered by the form."}, "form_type": {"type": "text", "index": 7, "name": "form_type", "comment": "Category of the form, such as regular, pop-up, or embedded form."}, "lead_nurturing_campaign_id": {"type": "integer", "index": 8, "name": "lead_nurturing_campaign_id", "comment": "ID of the associated lead nurturing campaign, if applicable."}, "method": {"type": "text", "index": 9, "name": "method", "comment": "HTTP method used for form submission (typically POST)."}, "form_name": {"type": "text", "index": 10, "name": "form_name", "comment": "Name of the form as defined in HubSpot."}, "notify_recipients": {"type": "boolean", "index": 11, "name": "notify_recipients", "comment": "List of email addresses that receive notifications on form submissions."}, "portal_id": {"type": "integer", "index": 12, "name": "portal_id", "comment": "The hub ID."}, "redirect": {"type": "text", "index": 13, "name": "redirect", "comment": "URL users are redirected to after submitting the form."}, "submit_text": {"type": "text", "index": 14, "name": "submit_text", "comment": "Text displayed on the form's submit button."}, "updated_at": {"type": "timestamp without time zone", "index": 15, "name": "updated_at", "comment": "Timestamp when the form was last updated."}, "is_deleted": {"type": "boolean", "index": 16, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__form"}, "model.hubspot.stg_hubspot__form_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__form_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"guid": {"type": "character varying", "index": 1, "name": "guid", "comment": null}, "action": {"type": "text", "index": 2, "name": "action", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "css_class": {"type": "text", "index": 4, "name": "css_class", "comment": null}, "follow_up_id": {"type": "integer", "index": 5, "name": "follow_up_id", "comment": null}, "form_type": {"type": "text", "index": 6, "name": "form_type", "comment": null}, "lead_nurturing_campaign_id": {"type": "integer", "index": 7, "name": "lead_nurturing_campaign_id", "comment": null}, "method": {"type": "text", "index": 8, "name": "method", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "notify_recipients": {"type": "boolean", "index": 10, "name": "notify_recipients", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "redirect": {"type": "text", "index": 12, "name": "redirect", "comment": null}, "submit_text": {"type": "text", "index": 13, "name": "submit_text", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__form_tmp"}, "model.hubspot.stg_hubspot__marketing_event": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event", "database": "postgres", "comment": "Each record represents a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_marketing_event_deleted": {"type": "boolean", "index": 2, "name": "is_marketing_event_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_id": {"type": "bigint", "index": 4, "name": "marketing_event_id", "comment": "The unique ID of the marketing event."}, "app_id": {"type": "character varying", "index": 5, "name": "app_id", "comment": "The string ID of the app associated with the marketing event."}, "app_name": {"type": "character varying", "index": 6, "name": "app_name", "comment": "The name of the app associated with the marketing event."}, "attendees": {"type": "bigint", "index": 7, "name": "attendees", "comment": "Number of attended contact records of a marketing event."}, "cancellations": {"type": "bigint", "index": 8, "name": "cancellations", "comment": "Number of cancelled contact records of a marketing event."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The timestamp when the marketing event was created."}, "end_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "end_timestamp", "comment": "The timestamp when the marketing event ends."}, "event_cancelled": {"type": "boolean", "index": 11, "name": "event_cancelled", "comment": "Boolean indicating whether the marketing event was cancelled."}, "event_completed": {"type": "boolean", "index": 12, "name": "event_completed", "comment": "Boolean indicating whether the marketing event has been completed."}, "event_description": {"type": "character varying", "index": 13, "name": "event_description", "comment": "A description of the marketing event."}, "event_name": {"type": "character varying", "index": 14, "name": "event_name", "comment": "The name of the marketing event."}, "event_organizer": {"type": "character varying", "index": 15, "name": "event_organizer", "comment": "The name of the organizer of the marketing event."}, "event_status": {"type": "character varying", "index": 16, "name": "event_status", "comment": "The current status of the marketing event."}, "event_type": {"type": "character varying", "index": 17, "name": "event_type", "comment": "The type of marketing event."}, "event_url": {"type": "character varying", "index": 18, "name": "event_url", "comment": "A URL in the external event application where the marketing event can be managed."}, "external_event_id": {"type": "character varying", "index": 19, "name": "external_event_id", "comment": "The ID that is associated with this marketing event in the external event application."}, "no_shows": {"type": "bigint", "index": 20, "name": "no_shows", "comment": "Number of no-show contact records of a marketing event."}, "registrants": {"type": "bigint", "index": 21, "name": "registrants", "comment": "Number of registered contact records of a marketing event."}, "start_timestamp": {"type": "timestamp without time zone", "index": 22, "name": "start_timestamp", "comment": "The timestamp when the marketing event starts."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 23, "name": "updated_timestamp", "comment": "The timestamp when the marketing event was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event"}, "model.hubspot.stg_hubspot__marketing_event_custom_property": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property", "database": "postgres", "comment": "Each record represents a custom property on a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_id": {"type": "bigint", "index": 3, "name": "marketing_event_id", "comment": "The ID of the related marketing event."}, "property_name": {"type": "character varying", "index": 4, "name": "property_name", "comment": "The name of the custom property."}, "property_value": {"type": "character varying", "index": 5, "name": "property_value", "comment": "The value of the custom property."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property"}, "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"marketing_event_id": {"type": "bigint", "index": 1, "name": "marketing_event_id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "value": {"type": "character varying", "index": 3, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"}, "model.hubspot.stg_hubspot__marketing_event_list": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list", "database": "postgres", "comment": "Each record represents a list associated with a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_list_id": {"type": "bigint", "index": 3, "name": "marketing_event_list_id", "comment": "The unique ID of the marketing event list."}, "marketing_event_id": {"type": "bigint", "index": 4, "name": "marketing_event_id", "comment": "The ID of the related marketing event."}, "marketing_event_list_name": {"type": "character varying", "index": 5, "name": "marketing_event_list_name", "comment": "The name of the marketing event list."}, "created_by_id": {"type": "character varying", "index": 6, "name": "created_by_id", "comment": "The ID of the user who created the list."}, "updated_by_id": {"type": "character varying", "index": 7, "name": "updated_by_id", "comment": "The ID of the user who last updated the list."}, "filters_updated_at": {"type": "timestamp without time zone", "index": 8, "name": "filters_updated_at", "comment": "The timestamp when the list filters were last updated."}, "created_timestamp": {"type": "timestamp without time zone", "index": 9, "name": "created_timestamp", "comment": "The timestamp when the list was created."}, "processing_status": {"type": "character varying", "index": 10, "name": "processing_status", "comment": "The current processing status of the list."}, "deleted_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "deleted_timestamp", "comment": "The timestamp when the list was deleted, if applicable."}, "list_version": {"type": "bigint", "index": 12, "name": "list_version", "comment": "The version number of the list."}, "object_type_id": {"type": "character varying", "index": 13, "name": "object_type_id", "comment": "The ID corresponding to the object type stored by the list."}, "size": {"type": "bigint", "index": 14, "name": "size", "comment": "The number of records in the list."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 15, "name": "updated_timestamp", "comment": "The timestamp when the list was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_list"}, "model.hubspot.stg_hubspot__marketing_event_list_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "created_by_id": {"type": "character varying", "index": 3, "name": "created_by_id", "comment": null}, "updated_by_id": {"type": "character varying", "index": 4, "name": "updated_by_id", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 5, "name": "filters_updated_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "processing_status": {"type": "character varying", "index": 7, "name": "processing_status", "comment": null}, "deleted_at": {"type": "timestamp without time zone", "index": 8, "name": "deleted_at", "comment": null}, "list_version": {"type": "bigint", "index": 9, "name": "list_version", "comment": null}, "object_type_id": {"type": "character varying", "index": 10, "name": "object_type_id", "comment": null}, "size": {"type": "bigint", "index": 11, "name": "size", "comment": null}, "name": {"type": "character varying", "index": 12, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 13, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 14, "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.hubspot.stg_hubspot__marketing_event_list_tmp"}, "model.hubspot.stg_hubspot__marketing_event_participant": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant", "database": "postgres", "comment": "Each record represents a participant in a marketing event in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "marketing_event_participant_id": {"type": "bigint", "index": 3, "name": "marketing_event_participant_id", "comment": "The unique ID of the marketing event participant record."}, "marketing_event_id": {"type": "bigint", "index": 4, "name": "marketing_event_id", "comment": "The ID of the related marketing event."}, "contact_id": {"type": "bigint", "index": 5, "name": "contact_id", "comment": "The ID of the related contact."}, "created_timestamp": {"type": "timestamp without time zone", "index": 6, "name": "created_timestamp", "comment": "The timestamp when the participant record was created."}, "occurred_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "occurred_timestamp", "comment": "The timestamp when the participation event occurred."}, "attendance_percentage": {"type": "double precision", "index": 8, "name": "attendance_percentage", "comment": "Percentage of the participation duration relative to the event duration."}, "attendance_state": {"type": "character varying", "index": 9, "name": "attendance_state", "comment": "The attendance state of the participant (e.g., ATTENDED, CANCELLED, EMPTY, NO_SHOW, REGISTERED)."}, "attendance_duration_seconds": {"type": "bigint", "index": 10, "name": "attendance_duration_seconds", "comment": "The number of seconds the participation lasted."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__marketing_event_participant"}, "model.hubspot.stg_hubspot__marketing_event_participant_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "properties_occurred_at": {"type": "timestamp without time zone", "index": 5, "name": "properties_occurred_at", "comment": null}, "properties_attendance_percentage": {"type": "double precision", "index": 6, "name": "properties_attendance_percentage", "comment": null}, "properties_attendance_state": {"type": "character varying", "index": 7, "name": "properties_attendance_state", "comment": null}, "properties_attendance_duration_seconds": {"type": "bigint", "index": 8, "name": "properties_attendance_duration_seconds", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__marketing_event_participant_tmp"}, "model.hubspot.stg_hubspot__marketing_event_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "app_id": {"type": "character varying", "index": 2, "name": "app_id", "comment": null}, "app_name": {"type": "character varying", "index": 3, "name": "app_name", "comment": null}, "attendees": {"type": "bigint", "index": 4, "name": "attendees", "comment": null}, "cancellations": {"type": "bigint", "index": 5, "name": "cancellations", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 7, "name": "end_date_time", "comment": null}, "event_cancelled": {"type": "boolean", "index": 8, "name": "event_cancelled", "comment": null}, "event_completed": {"type": "boolean", "index": 9, "name": "event_completed", "comment": null}, "event_description": {"type": "character varying", "index": 10, "name": "event_description", "comment": null}, "event_name": {"type": "character varying", "index": 11, "name": "event_name", "comment": null}, "event_organizer": {"type": "character varying", "index": 12, "name": "event_organizer", "comment": null}, "event_status": {"type": "character varying", "index": 13, "name": "event_status", "comment": null}, "event_type": {"type": "character varying", "index": 14, "name": "event_type", "comment": null}, "event_url": {"type": "character varying", "index": 15, "name": "event_url", "comment": null}, "external_event_id": {"type": "character varying", "index": 16, "name": "external_event_id", "comment": null}, "no_shows": {"type": "bigint", "index": 17, "name": "no_shows", "comment": null}, "registrants": {"type": "bigint", "index": 18, "name": "registrants", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 19, "name": "start_date_time", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 20, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 21, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 22, "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.hubspot.stg_hubspot__marketing_event_tmp"}, "model.hubspot.stg_hubspot__merged_deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal", "database": "postgres", "comment": "Each record represents a deal that has been merged along with the related deal it's been merged into.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "deal_id": {"type": "bigint", "index": 3, "name": "deal_id", "comment": "The ID of the deal the record has been merged INTO."}, "merged_deal_id": {"type": "bigint", "index": 4, "name": "merged_deal_id", "comment": "ID of deal that has been merged."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__merged_deal"}, "model.hubspot.stg_hubspot__merged_deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "merged_deal_id": {"type": "bigint", "index": 2, "name": "merged_deal_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__merged_deal_tmp"}, "model.hubspot.stg_hubspot__owner": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__owner", "database": "postgres", "comment": "Each record represents an owner/user in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "owner_id": {"type": "bigint", "index": 3, "name": "owner_id", "comment": "The ID of the owner."}, "active_user_id": {"type": "integer", "index": 4, "name": "active_user_id", "comment": "ID of the active user account associated with the owner. Null if owner is not an active user."}, "created_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "created_timestamp", "comment": "A timestamp for when the owner was created."}, "email_address": {"type": "text", "index": 6, "name": "email_address", "comment": "The email address of the owner."}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": "The first name of the owner."}, "last_name": {"type": "text", "index": 8, "name": "last_name", "comment": "The last name of the owner."}, "portal_id": {"type": "integer", "index": 9, "name": "portal_id", "comment": "The hub ID."}, "owner_type": {"type": "text", "index": 10, "name": "owner_type", "comment": "The type of owner."}, "updated_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "updated_timestamp", "comment": "A timestamp for when the owner was last updated."}, "full_name": {"type": "text", "index": 12, "name": "full_name", "comment": "Full name of the owner."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__owner"}, "model.hubspot.stg_hubspot__owner_team": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__owner_team", "database": "postgres", "comment": "Table mapping owners to their associated teams in HubSpot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "owner_id": {"type": "bigint", "index": 2, "name": "owner_id", "comment": "Unique ID of the HubSpot owner (user) assigned to the team."}, "team_id": {"type": "bigint", "index": 3, "name": "team_id", "comment": "Unique ID of the team to which the owner belongs."}, "is_team_primary": {"type": "boolean", "index": 4, "name": "is_team_primary", "comment": "Indicates whether the team is the owner's primary team."}, "is_deleted": {"type": "boolean", "index": 5, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__owner_team"}, "model.hubspot.stg_hubspot__owner_team_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__owner_team_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": null}, "is_team_primary": {"type": "boolean", "index": 3, "name": "is_team_primary", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__owner_team_tmp"}, "model.hubspot.stg_hubspot__owner_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__owner_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 6, "name": "updated_at", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 9, "name": "last_name", "comment": null}, "active_user_id": {"type": "integer", "index": 10, "name": "active_user_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.hubspot.stg_hubspot__owner_tmp"}, "model.hubspot.stg_hubspot__property": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__property", "database": "postgres", "comment": "Each record represents a property.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": "(DEPRECATED IN OCTOBER 2025) Fivetran generated id. Joins to `property_id` (ALSO DEPRECATED) in the `PROPERTY_OPTION` table. Use `hubspot_object` to join to `PROPERTY_OPTION` instead.\n"}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "calculated": {"type": "boolean", "index": 4, "name": "calculated", "comment": "Indicates if the property is calculated by a HubSpot process"}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": "Timestamp representing when the property was created."}, "description": {"type": "text", "index": 6, "name": "description", "comment": "A description of the property."}, "field_type": {"type": "text", "index": 7, "name": "field_type", "comment": "One of textarea, text, date, file, number, select, radio, checkbox, or booleancheckbox."}, "group_name": {"type": "text", "index": 8, "name": "group_name", "comment": "The name of the property group that the property belongs to."}, "hubspot_defined": {"type": "boolean", "index": 9, "name": "hubspot_defined", "comment": "This will be true for default properties that are built into HubSpot."}, "hubspot_object": {"type": "text", "index": 10, "name": "hubspot_object", "comment": "If this property is related to other objects, the object will be listed here. Part of the primary key with `property_name`. Use `hubspot_object` to join with the `PROPERTY_OPTION` table.\n"}, "property_label": {"type": "text", "index": 11, "name": "property_label", "comment": "A human readable label for the property."}, "property_name": {"type": "text", "index": 12, "name": "property_name", "comment": "The internal name of the property. Part of the primary key with `hubspot_object`."}, "property_type": {"type": "text", "index": 13, "name": "property_type", "comment": "One of string, number, date, datetime, or enumeration."}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": "Timestamp representing when the property was last updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__property"}, "model.hubspot.stg_hubspot__property_option": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__property_option", "database": "postgres", "comment": "Each record represents an option for the related property.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "property_option_label": {"type": "text", "index": 2, "name": "property_option_label", "comment": "The label of the option displayed inside the HubSpot app. Part of the composite primary key with `hubspot_object` and `property_option_name`."}, "property_id": {"type": "text", "index": 3, "name": "property_id", "comment": "(DEPRECATED IN OCTOBER 2025) The ID of the related property. Use `hubspot_object` to join with the `PROPERTY` table instead."}, "hubspot_object": {"type": "text", "index": 4, "name": "hubspot_object", "comment": "If this option's property is related to other objects, the object will be listed here. Part of the primary key with `property_option_name` and `property_option_label`. Use `hubspot_object` to join with the `PROPERTY` table.\n"}, "property_option_name": {"type": "text", "index": 5, "name": "property_option_name", "comment": "The internal name of the property option. Part of the primary key with `hubspot_object` and `property_option_label`."}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "display_order": {"type": "integer", "index": 7, "name": "display_order", "comment": "Order of options displayed in Hubspot, starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values."}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": "Boolean if the option will be displayed in HubSpot"}, "property_option_value": {"type": "text", "index": 9, "name": "property_option_value", "comment": "The internal value of the option."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__property_option"}, "model.hubspot.stg_hubspot__property_option_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__property_option_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"label": {"type": "text", "index": 1, "name": "label", "comment": null}, "property_id": {"type": "text", "index": 2, "name": "property_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "display_order": {"type": "integer", "index": 4, "name": "display_order", "comment": null}, "hidden": {"type": "boolean", "index": 5, "name": "hidden", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "hubspot_object": {"type": "text", "index": 7, "name": "hubspot_object", "comment": null}, "name": {"type": "text", "index": 8, "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.hubspot.stg_hubspot__property_option_tmp"}, "model.hubspot.stg_hubspot__property_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__property_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "calculated": {"type": "boolean", "index": 3, "name": "calculated", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "description": {"type": "text", "index": 5, "name": "description", "comment": null}, "field_type": {"type": "text", "index": 6, "name": "field_type", "comment": null}, "group_name": {"type": "text", "index": 7, "name": "group_name", "comment": null}, "hubspot_defined": {"type": "boolean", "index": 8, "name": "hubspot_defined", "comment": null}, "hubspot_object": {"type": "text", "index": 9, "name": "hubspot_object", "comment": null}, "label": {"type": "text", "index": 10, "name": "label", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "show_currency_symbol": {"type": "boolean", "index": 12, "name": "show_currency_symbol", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__property_tmp"}, "model.hubspot.stg_hubspot__role": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__role", "database": "postgres", "comment": "Table containing role information for HubSpot users.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "role_id": {"type": "bigint", "index": 2, "name": "role_id", "comment": "Unique ID of the role."}, "role_name": {"type": "text", "index": 3, "name": "role_name", "comment": "Name of the role."}, "requires_billing_write": {"type": "boolean", "index": 4, "name": "requires_billing_write", "comment": "Indicates whether the role requires billing write access."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__role"}, "model.hubspot.stg_hubspot__role_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__role_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "requires_billing_write": {"type": "boolean", "index": 3, "name": "requires_billing_write", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__role_tmp"}, "model.hubspot.stg_hubspot__submission_response": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__submission_response", "database": "postgres", "comment": "Each record represents a single field response from a HubSpot form submission.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "conversion_id": {"type": "character varying", "index": 2, "name": "conversion_id", "comment": "Unique identifier for the specific form conversion event."}, "form_id": {"type": "character varying", "index": 3, "name": "form_id", "comment": "The ID of the form the submission belongs to."}, "field_name": {"type": "character varying", "index": 4, "name": "field_name", "comment": "The name of the form field."}, "field_value": {"type": "character varying", "index": 5, "name": "field_value", "comment": "The value submitted for the form field."}, "submitted_at": {"type": "bigint", "index": 6, "name": "submitted_at", "comment": "Unix timestamp in milliseconds of when the form was submitted."}, "submitted_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "submitted_timestamp", "comment": "Timestamp of when the form was submitted, converted from the `submitted_at` field."}, "page_url": {"type": "character varying", "index": 8, "name": "page_url", "comment": "The URL of the page where the form was submitted."}, "object_type_id": {"type": "character varying", "index": 9, "name": "object_type_id", "comment": "The ID corresponding to the HubSpot object type associated with the submission."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__submission_response"}, "model.hubspot.stg_hubspot__submission_response_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__submission_response_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"conversion_id": {"type": "character varying", "index": 1, "name": "conversion_id", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "field_name": {"type": "character varying", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "submitted_at": {"type": "bigint", "index": 5, "name": "submitted_at", "comment": null}, "page_url": {"type": "character varying", "index": 6, "name": "page_url", "comment": null}, "object_type_id": {"type": "character varying", "index": 7, "name": "object_type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__submission_response_tmp"}, "model.hubspot.stg_hubspot__team": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__team", "database": "postgres", "comment": "Table containing HubSpot team details.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": "Unique ID of the team."}, "team_name": {"type": "text", "index": 3, "name": "team_name", "comment": "Name of the team."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 5, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team"}, "model.hubspot.stg_hubspot__team_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__team_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team_tmp"}, "model.hubspot.stg_hubspot__team_user": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__team_user", "database": "postgres", "comment": "Table representing associations between users and teams, including secondary team assignments.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": "Unique ID of the associated team."}, "user_id": {"type": "integer", "index": 3, "name": "user_id", "comment": "Unique ID of the user associated with the team."}, "is_secondary_user": {"type": "boolean", "index": 4, "name": "is_secondary_user", "comment": "Indicates whether the team is a secondary team for the user."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team_user"}, "model.hubspot.stg_hubspot__team_user_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__team_user_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"user_id": {"type": "integer", "index": 1, "name": "user_id", "comment": null}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": null}, "is_secondary_user": {"type": "boolean", "index": 3, "name": "is_secondary_user", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__team_user_tmp"}, "model.hubspot.stg_hubspot__ticket": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket", "database": "postgres", "comment": "Each record represents a ticket in Hubspot.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "ID of the ticket."}, "is_ticket_deleted": {"type": "boolean", "index": 3, "name": "is_ticket_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "closed_date": {"type": "timestamp without time zone", "index": 5, "name": "closed_date", "comment": "The date the ticket was closed."}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": "The date the ticket was created."}, "first_agent_reply_at": {"type": "timestamp without time zone", "index": 7, "name": "first_agent_reply_at", "comment": "the date for the first agent reply on the ticket."}, "ticket_pipeline_id": {"type": "text", "index": 8, "name": "ticket_pipeline_id", "comment": "The ID of the ticket's pipeline."}, "ticket_pipeline_stage_id": {"type": "text", "index": 9, "name": "ticket_pipeline_stage_id", "comment": "The ID of the ticket's pipeline stage."}, "ticket_category": {"type": "text", "index": 10, "name": "ticket_category", "comment": "The category of the ticket."}, "ticket_priority": {"type": "integer", "index": 11, "name": "ticket_priority", "comment": "The priority of the ticket."}, "owner_id": {"type": "integer", "index": 12, "name": "owner_id", "comment": "The ID of the deal's owner."}, "ticket_subject": {"type": "text", "index": 13, "name": "ticket_subject", "comment": "Short summary of ticket."}, "ticket_content": {"type": "text", "index": 14, "name": "ticket_content", "comment": "Text in body of the ticket."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket"}, "model.hubspot.stg_hubspot__ticket_company": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and company.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": "The ID of the related company."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_company"}, "model.hubspot.stg_hubspot__ticket_company_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_company_tmp"}, "model.hubspot.stg_hubspot__ticket_contact": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and a contact.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": "The ID of the related contact."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_contact"}, "model.hubspot.stg_hubspot__ticket_contact_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_contact_tmp"}, "model.hubspot.stg_hubspot__ticket_deal": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and a deal.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": "The ID of the related deal."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_deal"}, "model.hubspot.stg_hubspot__ticket_deal_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_deal_tmp"}, "model.hubspot.stg_hubspot__ticket_engagement": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement", "database": "postgres", "comment": "Each record represents a 'link' between a ticket and an engagement.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": "The ID of the related ticket."}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": "The ID of the related engagement."}, "category": {"type": "text", "index": 4, "name": "category", "comment": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label)."}, "source_relation": {"type": "text", "index": 5, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_engagement"}, "model.hubspot.stg_hubspot__ticket_engagement_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_engagement_tmp"}, "model.hubspot.stg_hubspot__ticket_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline", "database": "postgres", "comment": "Each record represents a ticket pipeline.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "ticket_pipeline_id": {"type": "text", "index": 2, "name": "ticket_pipeline_id", "comment": "Reference to the pipeline."}, "is_ticket_pipeline_deleted": {"type": "boolean", "index": 3, "name": "is_ticket_pipeline_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 5, "name": "is_active", "comment": "Boolean indicating whether the pipeline is active."}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "pipeline_label": {"type": "text", "index": 7, "name": "pipeline_label", "comment": "The human-readable label for the stage. The label is used when showing the stage in HubSpot."}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": "Reference to the object type."}, "ticket_pipeline_created_at": {"type": "timestamp without time zone", "index": 9, "name": "ticket_pipeline_created_at", "comment": "A timestamp representing when the record was created."}, "ticket_pipeline_updated_at": {"type": "timestamp without time zone", "index": 10, "name": "ticket_pipeline_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline"}, "model.hubspot.stg_hubspot__ticket_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage", "database": "postgres", "comment": "Each record represents a ticket pipeline stage.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "is_ticket_pipeline_stage_deleted": {"type": "boolean", "index": 2, "name": "is_ticket_pipeline_stage_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_active": {"type": "boolean", "index": 4, "name": "is_active", "comment": "Boolean indicating whether the pipeline stage is active."}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": "Used to determine the order in which the stages appear when viewed in HubSpot."}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": "Boolean indicating if the pipeline stage is closed."}, "pipeline_stage_label": {"type": "text", "index": 7, "name": "pipeline_stage_label", "comment": "The human-readable label for the stage. The label is used when showing the stage in HubSpot."}, "ticket_pipeline_id": {"type": "text", "index": 8, "name": "ticket_pipeline_id", "comment": "The ID of the pipeline."}, "ticket_pipeline_stage_id": {"type": "text", "index": 9, "name": "ticket_pipeline_stage_id", "comment": "The ID of the pipeline stage."}, "ticket_state": {"type": "text", "index": 10, "name": "ticket_state", "comment": "State of the ticket."}, "ticket_pipeline_stage_created_at": {"type": "timestamp without time zone", "index": 11, "name": "ticket_pipeline_stage_created_at", "comment": "A timestamp representing when the record was created."}, "ticket_pipeline_stage_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "ticket_pipeline_stage_updated_at", "comment": "A timestamp representing when the record was updated."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage"}, "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"stage_id": {"type": "character varying", "index": 1, "name": "stage_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": null}, "label": {"type": "text", "index": 7, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying", "index": 8, "name": "pipeline_id", "comment": null}, "ticket_state": {"type": "text", "index": 9, "name": "ticket_state", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 11, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"}, "model.hubspot.stg_hubspot__ticket_pipeline_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "object_type_id": {"type": "text", "index": 7, "name": "object_type_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_tmp"}, "model.hubspot.stg_hubspot__ticket_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history", "database": "postgres", "comment": "Each record represents a change to ticket record in Hubspot.", "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "_fivetran_start": {"type": "text", "index": 2, "name": "_fivetran_start", "comment": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database."}, "_fivetran_end": {"type": "text", "index": 3, "name": "_fivetran_end", "comment": "The (UTC DATETIME) when a record became inactive in the source database."}, "ticket_id": {"type": "integer", "index": 4, "name": "ticket_id", "comment": "The ID of the related ticket record."}, "field_name": {"type": "text", "index": 5, "name": "field_name", "comment": "The name of the field being changed."}, "change_source": {"type": "text", "index": 6, "name": "change_source", "comment": "The source (reason) of the change."}, "change_source_id": {"type": "text", "index": 7, "name": "change_source_id", "comment": "The ID of the object that caused the change, if applicable."}, "change_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "change_timestamp", "comment": "The timestamp the changed occurred."}, "new_value": {"type": "text", "index": 9, "name": "new_value", "comment": "The new value of the field."}, "source_relation": {"type": "text", "index": 10, "name": "source_relation", "comment": "Identifies the record's source."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_property_history"}, "model.hubspot.stg_hubspot__ticket_property_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": null}, "timestamp_instant": {"type": "timestamp without time zone", "index": 6, "name": "timestamp_instant", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "text", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "text", "index": 9, "name": "_fivetran_end", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_property_history_tmp"}, "model.hubspot.stg_hubspot__ticket_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__ticket_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": null}, "property_closed_date": {"type": "timestamp without time zone", "index": 4, "name": "property_closed_date", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_createdate", "comment": null}, "property_first_agent_reply_date": {"type": "timestamp without time zone", "index": 6, "name": "property_first_agent_reply_date", "comment": null}, "property_hs_pipeline": {"type": "character varying", "index": 7, "name": "property_hs_pipeline", "comment": null}, "property_hs_pipeline_stage": {"type": "character varying", "index": 8, "name": "property_hs_pipeline_stage", "comment": null}, "property_hs_ticket_category": {"type": "text", "index": 9, "name": "property_hs_ticket_category", "comment": null}, "property_hs_ticket_priority": {"type": "integer", "index": 10, "name": "property_hs_ticket_priority", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 11, "name": "property_hubspot_owner_id", "comment": null}, "property_subject": {"type": "text", "index": 12, "name": "property_subject", "comment": null}, "property_content": {"type": "text", "index": 13, "name": "property_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__ticket_tmp"}, "model.hubspot.stg_hubspot__users": {"metadata": {"type": "BASE TABLE", "schema": "public_hubspot", "name": "stg_hubspot__users", "database": "postgres", "comment": "Table containing information about HubSpot users.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "Identifies the record's source."}, "user_id": {"type": "bigint", "index": 2, "name": "user_id", "comment": "Unique ID of the user."}, "primary_team_id": {"type": "integer", "index": 3, "name": "primary_team_id", "comment": "ID of the user's primary team."}, "role_id": {"type": "bigint", "index": 4, "name": "role_id", "comment": "ID of the role assigned to the user."}, "email": {"type": "text", "index": 5, "name": "email", "comment": "Email address of the user."}, "first_name": {"type": "text", "index": 6, "name": "first_name", "comment": "First name of the user."}, "last_name": {"type": "text", "index": 7, "name": "last_name", "comment": "Last name of the user."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.hubspot.stg_hubspot__users"}, "model.hubspot.stg_hubspot__users_tmp": {"metadata": {"type": "VIEW", "schema": "public_hubspot", "name": "stg_hubspot__users_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "primary_team_id": {"type": "integer", "index": 2, "name": "primary_team_id", "comment": null}, "role_id": {"type": "bigint", "index": 3, "name": "role_id", "comment": null}, "email": {"type": "text", "index": 4, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 6, "name": "last_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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.hubspot.stg_hubspot__users_tmp"}}, "sources": {"source.hubspot.hubspot.company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_name": {"type": "text", "index": 4, "name": "property_name", "comment": null}, "property_description": {"type": "text", "index": 5, "name": "property_description", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_createdate", "comment": null}, "property_industry": {"type": "text", "index": 7, "name": "property_industry", "comment": null}, "property_address": {"type": "text", "index": 8, "name": "property_address", "comment": null}, "property_address_2": {"type": "text", "index": 9, "name": "property_address_2", "comment": null}, "property_city": {"type": "text", "index": 10, "name": "property_city", "comment": null}, "property_state": {"type": "text", "index": 11, "name": "property_state", "comment": null}, "property_country": {"type": "text", "index": 12, "name": "property_country", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 13, "name": "property_annualrevenue", "comment": null}, "property_hs_all-funky-a9384-syntax": {"type": "integer", "index": 14, "name": "property_hs_all-funky-a9384-syntax", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company"}, "source.hubspot.hubspot.company_list": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "character varying", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "character varying", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "character varying", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "character varying", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "character varying", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "bigint", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company_list"}, "source.hubspot.hubspot.company_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "company_list_id": {"type": "bigint", "index": 2, "name": "company_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "timestamp without time zone", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company_list_member"}, "source.hubspot.hubspot.company_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "company_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "integer", "index": 5, "name": "source_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.company_property_history"}, "source.hubspot.hubspot.contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "property_email": {"type": "text", "index": 3, "name": "property_email", "comment": null}, "id": {"type": "integer", "index": 4, "name": "id", "comment": null}, "property_company": {"type": "text", "index": 5, "name": "property_company", "comment": null}, "property_firstname": {"type": "text", "index": 6, "name": "property_firstname", "comment": null}, "property_lastname": {"type": "text", "index": 7, "name": "property_lastname", "comment": null}, "property_email_1": {"type": "text", "index": 8, "name": "property_email_1", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 9, "name": "property_createdate", "comment": null}, "property_jobtitle": {"type": "integer", "index": 10, "name": "property_jobtitle", "comment": null}, "property_annualrevenue": {"type": "integer", "index": 11, "name": "property_annualrevenue", "comment": null}, "property_hs_merged_object_ids": {"type": "text", "index": 12, "name": "property_hs_merged_object_ids", "comment": null}, "property_created_at": {"type": "timestamp without time zone", "index": 13, "name": "property_created_at", "comment": null}, "property_first_conversion_date": {"type": "timestamp without time zone", "index": 14, "name": "property_first_conversion_date", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact"}, "source.hubspot.hubspot.contact_form_submission": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_form_submission_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"timestamp": {"type": "timestamp without time zone", "index": 1, "name": "timestamp", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "conversion_id": {"type": "character varying", "index": 4, "name": "conversion_id", "comment": null}, "page_id": {"type": "integer", "index": 5, "name": "page_id", "comment": null}, "page_url": {"type": "text", "index": 6, "name": "page_url", "comment": null}, "portal_id": {"type": "integer", "index": 7, "name": "portal_id", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.contact_form_submission"}, "source.hubspot.hubspot.contact_list": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 5, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "created_by_id": {"type": "integer", "index": 7, "name": "created_by_id", "comment": null}, "object_type_id": {"type": "text", "index": 8, "name": "object_type_id", "comment": null}, "processing_status": {"type": "text", "index": 9, "name": "processing_status", "comment": null}, "processing_type": {"type": "text", "index": 10, "name": "processing_type", "comment": null}, "list_version": {"type": "integer", "index": 11, "name": "list_version", "comment": null}, "filters_updated_at": {"type": "text", "index": 12, "name": "filters_updated_at", "comment": null}, "custom_field": {"type": "text", "index": 13, "name": "custom_field", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_list"}, "source.hubspot.hubspot.contact_list_member": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_list_member_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "contact_list_id": {"type": "integer", "index": 2, "name": "contact_list_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "added_at": {"type": "text", "index": 5, "name": "added_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_list_member"}, "source.hubspot.hubspot.contact_merge_audit": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_merge_audit_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"canonical_vid": {"type": "integer", "index": 1, "name": "canonical_vid", "comment": null}, "contact_id": {"type": "integer", "index": 2, "name": "contact_id", "comment": null}, "vid_to_merge": {"type": "bigint", "index": 3, "name": "vid_to_merge", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "entity_id": {"type": "text", "index": 5, "name": "entity_id", "comment": null}, "first_name": {"type": "integer", "index": 6, "name": "first_name", "comment": null}, "last_name": {"type": "integer", "index": 7, "name": "last_name", "comment": null}, "num_properties_moved": {"type": "integer", "index": 8, "name": "num_properties_moved", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 9, "name": "timestamp", "comment": null}, "user_id": {"type": "integer", "index": 10, "name": "user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_merge_audit"}, "source.hubspot.hubspot.contact_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "contact_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "integer", "index": 1, "name": "contact_id", "comment": null}, "timestamp": {"type": "timestamp without time zone", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.contact_property_history"}, "source.hubspot.hubspot.conversation_actor": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_actor_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "avatar": {"type": "character varying", "index": 2, "name": "avatar", "comment": null}, "email": {"type": "character varying", "index": 3, "name": "email", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_actor"}, "source.hubspot.hubspot.conversation_channel_account": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "channel_id": {"type": "character varying", "index": 2, "name": "channel_id", "comment": null}, "inbox_id": {"type": "character varying", "index": 3, "name": "inbox_id", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "authorized": {"type": "boolean", "index": 5, "name": "authorized", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 7, "name": "name", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 8, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 9, "name": "delivery_identifier_value", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 10, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.conversation_channel_account"}, "source.hubspot.hubspot.conversation_channel": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_channel_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 3, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_channel"}, "source.hubspot.hubspot.conversation_inbox": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_inbox_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "active": {"type": "boolean", "index": 2, "name": "active", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "name": {"type": "character varying", "index": 4, "name": "name", "comment": null}, "type": {"type": "character varying", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 7, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_inbox"}, "source.hubspot.hubspot.conversation_message_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "thread_id": {"type": "character varying", "index": 2, "name": "thread_id", "comment": null}, "channel_account_id": {"type": "character varying", "index": 3, "name": "channel_account_id", "comment": null}, "channel_id": {"type": "character varying", "index": 4, "name": "channel_id", "comment": null}, "from_inbox_id": {"type": "character varying", "index": 5, "name": "from_inbox_id", "comment": null}, "to_inbox_id": {"type": "character varying", "index": 6, "name": "to_inbox_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "assigned_from": {"type": "character varying", "index": 8, "name": "assigned_from", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "created_by": {"type": "character varying", "index": 10, "name": "created_by", "comment": null}, "direction": {"type": "character varying", "index": 11, "name": "direction", "comment": null}, "in_reply_to_id": {"type": "character varying", "index": 12, "name": "in_reply_to_id", "comment": null}, "new_status": {"type": "character varying", "index": 13, "name": "new_status", "comment": null}, "rich_text": {"type": "character varying", "index": 14, "name": "rich_text", "comment": null}, "subject": {"type": "character varying", "index": 15, "name": "subject", "comment": null}, "text": {"type": "character varying", "index": 16, "name": "text", "comment": null}, "truncation_status": {"type": "character varying", "index": 17, "name": "truncation_status", "comment": null}, "type": {"type": "character varying", "index": 18, "name": "type", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 19, "name": "updated_at", "comment": null}, "client_type": {"type": "character varying", "index": 20, "name": "client_type", "comment": null}, "status_type": {"type": "character varying", "index": 21, "name": "status_type", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 22, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 23, "name": "_fivetran_synced", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 24, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 25, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 26, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_message_history"}, "source.hubspot.hubspot.conversation_message_recipient": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_message_recipient_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "character varying", "index": 1, "name": "_fivetran_id", "comment": null}, "actor_id": {"type": "character varying", "index": 2, "name": "actor_id", "comment": null}, "message_id": {"type": "character varying", "index": 3, "name": "message_id", "comment": null}, "thread_id": {"type": "character varying", "index": 4, "name": "thread_id", "comment": null}, "name": {"type": "character varying", "index": 5, "name": "name", "comment": null}, "recipient_field": {"type": "character varying", "index": 6, "name": "recipient_field", "comment": null}, "delivery_identifier_type": {"type": "character varying", "index": 7, "name": "delivery_identifier_type", "comment": null}, "delivery_identifier_value": {"type": "character varying", "index": 8, "name": "delivery_identifier_value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.conversation_message_recipient"}, "source.hubspot.hubspot.conversation_thread": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "conversation_thread_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying", "index": 1, "name": "id", "comment": null}, "inbox_id": {"type": "character varying", "index": 2, "name": "inbox_id", "comment": null}, "associated_contact_id": {"type": "character varying", "index": 3, "name": "associated_contact_id", "comment": null}, "associated_ticket_id": {"type": "character varying", "index": 4, "name": "associated_ticket_id", "comment": null}, "original_channel_account_id": {"type": "character varying", "index": 5, "name": "original_channel_account_id", "comment": null}, "original_channel_id": {"type": "character varying", "index": 6, "name": "original_channel_id", "comment": null}, "assigned_to": {"type": "character varying", "index": 7, "name": "assigned_to", "comment": null}, "closed_at": {"type": "timestamp without time zone", "index": 8, "name": "closed_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": null}, "latest_message_received_timestamp": {"type": "timestamp without time zone", "index": 10, "name": "latest_message_received_timestamp", "comment": null}, "latest_message_sent_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "latest_message_sent_timestamp", "comment": null}, "latest_message_timestamp": {"type": "timestamp without time zone", "index": 12, "name": "latest_message_timestamp", "comment": null}, "spam": {"type": "character varying", "index": 13, "name": "spam", "comment": null}, "status": {"type": "character varying", "index": 14, "name": "status", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 15, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.conversation_thread"}, "source.hubspot.hubspot.deal_company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "integer", "index": 1, "name": "company_id", "comment": null}, "deal_id": {"type": "integer", "index": 2, "name": "deal_id", "comment": null}, "type_id": {"type": "integer", "index": 3, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_company"}, "source.hubspot.hubspot.deal_contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "category": {"type": "text", "index": 5, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_contact"}, "source.hubspot.hubspot.deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 2, "name": "is_deleted", "comment": null}, "deal_pipeline_id": {"type": "character varying(100)", "index": 3, "name": "deal_pipeline_id", "comment": null}, "deal_pipeline_stage_id": {"type": "character varying(100)", "index": 4, "name": "deal_pipeline_stage_id", "comment": null}, "owner_id": {"type": "bigint", "index": 5, "name": "owner_id", "comment": null}, "portal_id": {"type": "integer", "index": 6, "name": "portal_id", "comment": null}, "property_dealname": {"type": "text", "index": 7, "name": "property_dealname", "comment": null}, "property_description": {"type": "integer", "index": 8, "name": "property_description", "comment": null}, "property_amount": {"type": "integer", "index": 9, "name": "property_amount", "comment": null}, "property_closedate": {"type": "timestamp without time zone", "index": 10, "name": "property_closedate", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 11, "name": "property_createdate", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal"}, "source.hubspot.hubspot.deal_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying(100)", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 8, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_pipeline"}, "source.hubspot.hubspot.deal_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_deleted": {"type": "boolean", "index": 1, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 3, "name": "active", "comment": null}, "closed_won": {"type": "boolean", "index": 4, "name": "closed_won", "comment": null}, "is_closed": {"type": "boolean", "index": 5, "name": "is_closed", "comment": null}, "display_order": {"type": "integer", "index": 6, "name": "display_order", "comment": null}, "probability": {"type": "double precision", "index": 7, "name": "probability", "comment": null}, "stage_id": {"type": "character varying(100)", "index": 8, "name": "stage_id", "comment": null}, "label": {"type": "text", "index": 9, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying(100)", "index": 10, "name": "pipeline_id", "comment": null}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": null}, "updated_at": {"type": "text", "index": 12, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_pipeline_stage"}, "source.hubspot.hubspot.deal_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "timestamp": {"type": "text", "index": 2, "name": "timestamp", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "source_id": {"type": "text", "index": 6, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_end", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 10, "name": "_fivetran_active", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_property_history"}, "source.hubspot.hubspot.deal_stage": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "deal_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_start": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_start", "comment": null}, "deal_id": {"type": "bigint", "index": 2, "name": "deal_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 3, "name": "_fivetran_active", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "date_entered": {"type": "timestamp without time zone", "index": 6, "name": "date_entered", "comment": null}, "source": {"type": "text", "index": 7, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 8, "name": "source_id", "comment": null}, "value": {"type": "text", "index": 9, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.deal_stage"}, "source.hubspot.hubspot.email_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "content_id": {"type": "bigint", "index": 4, "name": "content_id", "comment": null}, "num_included": {"type": "integer", "index": 5, "name": "num_included", "comment": null}, "num_queued": {"type": "integer", "index": 6, "name": "num_queued", "comment": null}, "sub_type": {"type": "integer", "index": 7, "name": "sub_type", "comment": null}, "type": {"type": "text", "index": 8, "name": "type", "comment": null}, "app_name": {"type": "text", "index": 9, "name": "app_name", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "subject": {"type": "text", "index": 11, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_campaign"}, "source.hubspot.hubspot.email_event_bounce": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_bounce_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 3, "name": "category", "comment": null}, "status": {"type": "integer", "index": 4, "name": "status", "comment": null}, "response": {"type": "text", "index": 5, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_bounce"}, "source.hubspot.hubspot.email_event_click": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_click_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "referer": {"type": "integer", "index": 3, "name": "referer", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "ip_address": {"type": "integer", "index": 6, "name": "ip_address", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}, "user_agent": {"type": "text", "index": 8, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_click"}, "source.hubspot.hubspot.email_event": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "app_id": {"type": "integer", "index": 3, "name": "app_id", "comment": null}, "caused_by_created": {"type": "timestamp without time zone", "index": 4, "name": "caused_by_created", "comment": null}, "caused_by_id": {"type": "integer", "index": 5, "name": "caused_by_id", "comment": null}, "created": {"type": "timestamp without time zone", "index": 6, "name": "created", "comment": null}, "email_campaign_id": {"type": "integer", "index": 7, "name": "email_campaign_id", "comment": null}, "obsoleted_by_created": {"type": "timestamp without time zone", "index": 8, "name": "obsoleted_by_created", "comment": null}, "obsoleted_by_id": {"type": "integer", "index": 9, "name": "obsoleted_by_id", "comment": null}, "portal_id": {"type": "integer", "index": 10, "name": "portal_id", "comment": null}, "sent_by_created": {"type": "timestamp without time zone", "index": 11, "name": "sent_by_created", "comment": null}, "sent_by_id": {"type": "text", "index": 12, "name": "sent_by_id", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "filtered_event": {"type": "boolean", "index": 14, "name": "filtered_event", "comment": null}, "recipient": {"type": "text", "index": 15, "name": "recipient", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event"}, "source.hubspot.hubspot.email_event_deferred": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_deferred_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "attempt": {"type": "integer", "index": 3, "name": "attempt", "comment": null}, "response": {"type": "integer", "index": 4, "name": "response", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_deferred"}, "source.hubspot.hubspot.email_event_delivered": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_delivered_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "response": {"type": "text", "index": 3, "name": "response", "comment": null}, "smtp_id": {"type": "text", "index": 4, "name": "smtp_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_delivered"}, "source.hubspot.hubspot.email_event_dropped": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_dropped_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "drop_reason": {"type": "text", "index": 3, "name": "drop_reason", "comment": null}, "bcc": {"type": "text", "index": 4, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 5, "name": "cc", "comment": null}, "drop_message": {"type": "text", "index": 6, "name": "drop_message", "comment": null}, "from": {"type": "text", "index": 7, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 8, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 9, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_dropped"}, "source.hubspot.hubspot.email_event_forward": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_forward_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_forward"}, "source.hubspot.hubspot.email_event_open": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_open_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "duration": {"type": "integer", "index": 3, "name": "duration", "comment": null}, "browser": {"type": "text", "index": 4, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 5, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 6, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 7, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_open"}, "source.hubspot.hubspot.email_event_print": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_print_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "browser": {"type": "text", "index": 3, "name": "browser", "comment": null}, "ip_address": {"type": "integer", "index": 4, "name": "ip_address", "comment": null}, "location": {"type": "text", "index": 5, "name": "location", "comment": null}, "user_agent": {"type": "text", "index": 6, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_print"}, "source.hubspot.hubspot.email_event_sent": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_sent_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bcc": {"type": "text", "index": 3, "name": "bcc", "comment": null}, "cc": {"type": "text", "index": 4, "name": "cc", "comment": null}, "from": {"type": "text", "index": 5, "name": "from", "comment": null}, "reply_to": {"type": "text", "index": 6, "name": "reply_to", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_sent"}, "source.hubspot.hubspot.email_event_spam_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_spam_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "ip_address": {"type": "integer", "index": 3, "name": "ip_address", "comment": null}, "user_agent": {"type": "integer", "index": 4, "name": "user_agent", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_spam_report"}, "source.hubspot.hubspot.email_event_status_change": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "email_event_status_change_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "bounced": {"type": "integer", "index": 3, "name": "bounced", "comment": null}, "portal_subscription_status": {"type": "text", "index": 4, "name": "portal_subscription_status", "comment": null}, "requested_by": {"type": "integer", "index": 5, "name": "requested_by", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "subscriptions": {"type": "text", "index": 7, "name": "subscriptions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.email_event_status_change"}, "source.hubspot.hubspot.engagement_call": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_call_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_call"}, "source.hubspot.hubspot.engagement_communication": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_communication_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_timestamp", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_communication"}, "source.hubspot.hubspot.engagement_company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"company_id": {"type": "bigint", "index": 1, "name": "company_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_company"}, "source.hubspot.hubspot.engagement_contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"contact_id": {"type": "bigint", "index": 1, "name": "contact_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_contact"}, "source.hubspot.hubspot.engagement": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "type": {"type": "text", "index": 2, "name": "type", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement"}, "source.hubspot.hubspot.engagement_deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "engagement_id": {"type": "bigint", "index": 2, "name": "engagement_id", "comment": null}, "engagement_type": {"type": "text", "index": 3, "name": "engagement_type", "comment": null}, "type_id": {"type": "integer", "index": 4, "name": "type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "category": {"type": "text", "index": 6, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_deal"}, "source.hubspot.hubspot.engagement_email": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_email_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_all_owner_ids": {"type": "integer", "index": 4, "name": "property_hs_all_owner_ids", "comment": null}, "property_hs_all_team_ids": {"type": "integer", "index": 5, "name": "property_hs_all_team_ids", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 6, "name": "property_hs_createdate", "comment": null}, "property_hs_email_subject": {"type": "text", "index": 7, "name": "property_hs_email_subject", "comment": null}, "property_hs_email_text": {"type": "text", "index": 8, "name": "property_hs_email_text", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 9, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_modified_by": {"type": "integer", "index": 10, "name": "property_hs_modified_by", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 11, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 12, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 13, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_email"}, "source.hubspot.hubspot.engagement_meeting": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_meeting_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_from_link_id": {"type": "integer", "index": 3, "name": "created_from_link_id", "comment": null}, "end_time": {"type": "text", "index": 4, "name": "end_time", "comment": null}, "pre_meeting_prospect_reminders": {"type": "text", "index": 5, "name": "pre_meeting_prospect_reminders", "comment": null}, "source": {"type": "text", "index": 6, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 7, "name": "source_id", "comment": null}, "start_time": {"type": "text", "index": 8, "name": "start_time", "comment": null}, "web_conference_meeting_id": {"type": "integer", "index": 9, "name": "web_conference_meeting_id", "comment": null}, "meeting_outcome": {"type": "integer", "index": 10, "name": "meeting_outcome", "comment": null}, "body": {"type": "text", "index": 11, "name": "body", "comment": null}, "external_url": {"type": "text", "index": 12, "name": "external_url", "comment": null}, "title": {"type": "text", "index": 13, "name": "title", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_meeting"}, "source.hubspot.hubspot.engagement_note": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_note_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_body_preview": {"type": "text", "index": 4, "name": "property_hs_body_preview", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_hs_createdate", "comment": null}, "property_hs_lastmodifieddate": {"type": "text", "index": 6, "name": "property_hs_lastmodifieddate", "comment": null}, "property_hs_note_body": {"type": "text", "index": 7, "name": "property_hs_note_body", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 8, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 9, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 10, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 11, "name": "type", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_note"}, "source.hubspot.hubspot.engagement_task": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "engagement_task_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"engagement_id": {"type": "bigint", "index": 1, "name": "engagement_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "property_hs_createdate": {"type": "timestamp without time zone", "index": 4, "name": "property_hs_createdate", "comment": null}, "property_hs_object_id": {"type": "bigint", "index": 5, "name": "property_hs_object_id", "comment": null}, "property_hs_task_type": {"type": "text", "index": 6, "name": "property_hs_task_type", "comment": null}, "property_hs_timestamp": {"type": "timestamp without time zone", "index": 7, "name": "property_hs_timestamp", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 8, "name": "property_hubspot_owner_id", "comment": null}, "property_hubspot_team_id": {"type": "integer", "index": 9, "name": "property_hubspot_team_id", "comment": null}, "type": {"type": "text", "index": 10, "name": "type", "comment": null}, "task_type": {"type": "text", "index": 11, "name": "task_type", "comment": null}, "property_hs_engagement_source": {"type": "text", "index": 12, "name": "property_hs_engagement_source", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.engagement_task"}, "source.hubspot.hubspot.form": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "form_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"guid": {"type": "character varying", "index": 1, "name": "guid", "comment": null}, "action": {"type": "text", "index": 2, "name": "action", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": null}, "css_class": {"type": "text", "index": 4, "name": "css_class", "comment": null}, "follow_up_id": {"type": "integer", "index": 5, "name": "follow_up_id", "comment": null}, "form_type": {"type": "text", "index": 6, "name": "form_type", "comment": null}, "lead_nurturing_campaign_id": {"type": "integer", "index": 7, "name": "lead_nurturing_campaign_id", "comment": null}, "method": {"type": "text", "index": 8, "name": "method", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "notify_recipients": {"type": "boolean", "index": 10, "name": "notify_recipients", "comment": null}, "portal_id": {"type": "integer", "index": 11, "name": "portal_id", "comment": null}, "redirect": {"type": "text", "index": 12, "name": "redirect", "comment": null}, "submit_text": {"type": "text", "index": 13, "name": "submit_text", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.form"}, "source.hubspot.hubspot.marketing_event_custom_property": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_custom_property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"marketing_event_id": {"type": "bigint", "index": 1, "name": "marketing_event_id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "value": {"type": "character varying", "index": 3, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.marketing_event_custom_property"}, "source.hubspot.hubspot.marketing_event": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "app_id": {"type": "character varying", "index": 2, "name": "app_id", "comment": null}, "app_name": {"type": "character varying", "index": 3, "name": "app_name", "comment": null}, "attendees": {"type": "bigint", "index": 4, "name": "attendees", "comment": null}, "cancellations": {"type": "bigint", "index": 5, "name": "cancellations", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 7, "name": "end_date_time", "comment": null}, "event_cancelled": {"type": "boolean", "index": 8, "name": "event_cancelled", "comment": null}, "event_completed": {"type": "boolean", "index": 9, "name": "event_completed", "comment": null}, "event_description": {"type": "character varying", "index": 10, "name": "event_description", "comment": null}, "event_name": {"type": "character varying", "index": 11, "name": "event_name", "comment": null}, "event_organizer": {"type": "character varying", "index": 12, "name": "event_organizer", "comment": null}, "event_status": {"type": "character varying", "index": 13, "name": "event_status", "comment": null}, "event_type": {"type": "character varying", "index": 14, "name": "event_type", "comment": null}, "event_url": {"type": "character varying", "index": 15, "name": "event_url", "comment": null}, "external_event_id": {"type": "character varying", "index": 16, "name": "external_event_id", "comment": null}, "no_shows": {"type": "bigint", "index": 17, "name": "no_shows", "comment": null}, "registrants": {"type": "bigint", "index": 18, "name": "registrants", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 19, "name": "start_date_time", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 20, "name": "updated_at", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 21, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 22, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.marketing_event"}, "source.hubspot.hubspot.marketing_event_list": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_list_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "created_by_id": {"type": "character varying", "index": 3, "name": "created_by_id", "comment": null}, "updated_by_id": {"type": "character varying", "index": 4, "name": "updated_by_id", "comment": null}, "filters_updated_at": {"type": "timestamp without time zone", "index": 5, "name": "filters_updated_at", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 6, "name": "created_at", "comment": null}, "processing_status": {"type": "character varying", "index": 7, "name": "processing_status", "comment": null}, "deleted_at": {"type": "timestamp without time zone", "index": 8, "name": "deleted_at", "comment": null}, "list_version": {"type": "bigint", "index": 9, "name": "list_version", "comment": null}, "object_type_id": {"type": "character varying", "index": 10, "name": "object_type_id", "comment": null}, "size": {"type": "bigint", "index": 11, "name": "size", "comment": null}, "name": {"type": "character varying", "index": 12, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 13, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 14, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.marketing_event_list"}, "source.hubspot.hubspot.marketing_event_participant": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "marketing_event_participant_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "marketing_event_id": {"type": "bigint", "index": 2, "name": "marketing_event_id", "comment": null}, "contact_id": {"type": "bigint", "index": 3, "name": "contact_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": null}, "properties_occurred_at": {"type": "timestamp without time zone", "index": 5, "name": "properties_occurred_at", "comment": null}, "properties_attendance_percentage": {"type": "double precision", "index": 6, "name": "properties_attendance_percentage", "comment": null}, "properties_attendance_state": {"type": "character varying", "index": 7, "name": "properties_attendance_state", "comment": null}, "properties_attendance_duration_seconds": {"type": "bigint", "index": 8, "name": "properties_attendance_duration_seconds", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.marketing_event_participant"}, "source.hubspot.hubspot.merged_deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "merged_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"deal_id": {"type": "bigint", "index": 1, "name": "deal_id", "comment": null}, "merged_deal_id": {"type": "bigint", "index": 2, "name": "merged_deal_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.merged_deal"}, "source.hubspot.hubspot.owner": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "portal_id": {"type": "integer", "index": 4, "name": "portal_id", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 6, "name": "updated_at", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 9, "name": "last_name", "comment": null}, "active_user_id": {"type": "integer", "index": 10, "name": "active_user_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.owner"}, "source.hubspot.hubspot.owner_team": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "owner_team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"owner_id": {"type": "bigint", "index": 1, "name": "owner_id", "comment": null}, "team_id": {"type": "bigint", "index": 2, "name": "team_id", "comment": null}, "is_team_primary": {"type": "boolean", "index": 3, "name": "is_team_primary", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.owner_team"}, "source.hubspot.hubspot.property": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "calculated": {"type": "boolean", "index": 3, "name": "calculated", "comment": null}, "created_at": {"type": "text", "index": 4, "name": "created_at", "comment": null}, "description": {"type": "text", "index": 5, "name": "description", "comment": null}, "field_type": {"type": "text", "index": 6, "name": "field_type", "comment": null}, "group_name": {"type": "text", "index": 7, "name": "group_name", "comment": null}, "hubspot_defined": {"type": "boolean", "index": 8, "name": "hubspot_defined", "comment": null}, "hubspot_object": {"type": "text", "index": 9, "name": "hubspot_object", "comment": null}, "label": {"type": "text", "index": 10, "name": "label", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "show_currency_symbol": {"type": "boolean", "index": 12, "name": "show_currency_symbol", "comment": null}, "type": {"type": "text", "index": 13, "name": "type", "comment": null}, "updated_at": {"type": "text", "index": 14, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.property"}, "source.hubspot.hubspot.property_option": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "property_option_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"label": {"type": "text", "index": 1, "name": "label", "comment": null}, "property_id": {"type": "text", "index": 2, "name": "property_id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "display_order": {"type": "integer", "index": 4, "name": "display_order", "comment": null}, "hidden": {"type": "boolean", "index": 5, "name": "hidden", "comment": null}, "value": {"type": "text", "index": 6, "name": "value", "comment": null}, "hubspot_object": {"type": "text", "index": 7, "name": "hubspot_object", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.property_option"}, "source.hubspot.hubspot.role": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "role_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "requires_billing_write": {"type": "boolean", "index": 3, "name": "requires_billing_write", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.role"}, "source.hubspot.hubspot.submission_response": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "submission_response_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"conversion_id": {"type": "character varying", "index": 1, "name": "conversion_id", "comment": null}, "form_id": {"type": "character varying", "index": 2, "name": "form_id", "comment": null}, "field_name": {"type": "character varying", "index": 3, "name": "field_name", "comment": null}, "field_value": {"type": "character varying", "index": 4, "name": "field_value", "comment": null}, "submitted_at": {"type": "bigint", "index": 5, "name": "submitted_at", "comment": null}, "page_url": {"type": "character varying", "index": 6, "name": "page_url", "comment": null}, "object_type_id": {"type": "character varying", "index": 7, "name": "object_type_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.submission_response"}, "source.hubspot.hubspot.team": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.team"}, "source.hubspot.hubspot.team_user": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "team_user_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"user_id": {"type": "integer", "index": 1, "name": "user_id", "comment": null}, "team_id": {"type": "integer", "index": 2, "name": "team_id", "comment": null}, "is_secondary_user": {"type": "boolean", "index": 3, "name": "is_secondary_user", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.team_user"}, "source.hubspot.hubspot.ticket_company": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_company_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "company_id": {"type": "integer", "index": 3, "name": "company_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_company"}, "source.hubspot.hubspot.ticket_contact": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_contact_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "contact_id": {"type": "integer", "index": 3, "name": "contact_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_contact"}, "source.hubspot.hubspot.ticket": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "is_deleted": {"type": "boolean", "index": 3, "name": "is_deleted", "comment": null}, "property_closed_date": {"type": "timestamp without time zone", "index": 4, "name": "property_closed_date", "comment": null}, "property_createdate": {"type": "timestamp without time zone", "index": 5, "name": "property_createdate", "comment": null}, "property_first_agent_reply_date": {"type": "timestamp without time zone", "index": 6, "name": "property_first_agent_reply_date", "comment": null}, "property_hs_pipeline": {"type": "character varying", "index": 7, "name": "property_hs_pipeline", "comment": null}, "property_hs_pipeline_stage": {"type": "character varying", "index": 8, "name": "property_hs_pipeline_stage", "comment": null}, "property_hs_ticket_category": {"type": "text", "index": 9, "name": "property_hs_ticket_category", "comment": null}, "property_hs_ticket_priority": {"type": "integer", "index": 10, "name": "property_hs_ticket_priority", "comment": null}, "property_hubspot_owner_id": {"type": "integer", "index": 11, "name": "property_hubspot_owner_id", "comment": null}, "property_subject": {"type": "text", "index": 12, "name": "property_subject", "comment": null}, "property_content": {"type": "text", "index": 13, "name": "property_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket"}, "source.hubspot.hubspot.ticket_deal": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_deal_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "deal_id": {"type": "integer", "index": 3, "name": "deal_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_deal"}, "source.hubspot.hubspot.ticket_engagement": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_engagement_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "engagement_id": {"type": "integer", "index": 3, "name": "engagement_id", "comment": null}, "category": {"type": "text", "index": 4, "name": "category", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_engagement"}, "source.hubspot.hubspot.ticket_pipeline": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"pipeline_id": {"type": "character varying", "index": 1, "name": "pipeline_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "label": {"type": "text", "index": 6, "name": "label", "comment": null}, "object_type_id": {"type": "text", "index": 7, "name": "object_type_id", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_pipeline"}, "source.hubspot.hubspot.ticket_pipeline_stage": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_pipeline_stage_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"stage_id": {"type": "character varying", "index": 1, "name": "stage_id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "active": {"type": "boolean", "index": 4, "name": "active", "comment": null}, "display_order": {"type": "integer", "index": 5, "name": "display_order", "comment": null}, "is_closed": {"type": "boolean", "index": 6, "name": "is_closed", "comment": null}, "label": {"type": "text", "index": 7, "name": "label", "comment": null}, "pipeline_id": {"type": "character varying", "index": 8, "name": "pipeline_id", "comment": null}, "ticket_state": {"type": "text", "index": 9, "name": "ticket_state", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 11, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_pipeline_stage"}, "source.hubspot.hubspot.ticket_property_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "ticket_property_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "ticket_id": {"type": "integer", "index": 2, "name": "ticket_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "source": {"type": "text", "index": 4, "name": "source", "comment": null}, "source_id": {"type": "text", "index": 5, "name": "source_id", "comment": null}, "timestamp_instant": {"type": "timestamp without time zone", "index": 6, "name": "timestamp_instant", "comment": null}, "value": {"type": "text", "index": 7, "name": "value", "comment": null}, "_fivetran_start": {"type": "text", "index": 8, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "text", "index": 9, "name": "_fivetran_end", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.hubspot.hubspot.ticket_property_history"}, "source.hubspot.hubspot.users": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "users_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "primary_team_id": {"type": "integer", "index": 2, "name": "primary_team_id", "comment": null}, "role_id": {"type": "bigint", "index": 3, "name": "role_id", "comment": null}, "email": {"type": "text", "index": 4, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 5, "name": "first_name", "comment": null}, "last_name": {"type": "text", "index": 6, "name": "last_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "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": "source.hubspot.hubspot.users"}}, "errors": null} \ No newline at end of file diff --git a/docs/manifest.json b/docs/manifest.json index a65468c..bbad1ac 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", "dbt_version": "1.12.0", "generated_at": "2026-08-06T16:42:23.697870Z", "invocation_id": "1800dcb5-7038-4e0c-ae53-10df66e0e45f", "invocation_started_at": "2026-08-06T16:41:53.653100+00:00", "env": {}, "project_name": "hubspot_integration_tests", "project_id": "5e587fba07ab8a9a57427c930291accf", "user_id": null, "send_anonymous_usage_stats": false, "adapter_type": "postgres", "quoting": {"database": true, "schema": true, "identifier": true, "column": null}, "run_started_at": "2026-08-06T16:41:53.653339+00:00"}, "nodes": {"seed.hubspot_integration_tests.engagement_call_data": {"database": "postgres", "schema": "public", "name": "engagement_call_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_call_data.csv", "original_file_path": "seeds/engagement_call_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_call_data", "fqn": ["hubspot_integration_tests", "engagement_call_data"], "alias": "engagement_call_data", "checksum": {"name": "sha256", "checksum": "cb6182d3d0902fd0b832c3c15d063ccaf81e2a62ed35e58abfc2d2acc35c6d7d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786034517.1922965, "relation_name": "\"postgres\".\"public\".\"engagement_call_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.owner_data": {"database": "postgres", "schema": "public", "name": "owner_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "owner_data.csv", "original_file_path": "seeds/owner_data.csv", "unique_id": "seed.hubspot_integration_tests.owner_data", "fqn": ["hubspot_integration_tests", "owner_data"], "alias": "owner_data", "checksum": {"name": "sha256", "checksum": "63e8faba4edb6401581d0a710751e0a7f3172c48fca277bf969eed631de3442c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"owner_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.20032, "relation_name": "\"postgres\".\"public\".\"owner_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_contact_data": {"database": "postgres", "schema": "public", "name": "engagement_contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_contact_data.csv", "original_file_path": "seeds/engagement_contact_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_contact_data", "fqn": ["hubspot_integration_tests", "engagement_contact_data"], "alias": "engagement_contact_data", "checksum": {"name": "sha256", "checksum": "ddd5be7c4fded570cf78e791c53ff7820919ebed4b97b376b68dc9d7cb88ee61"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "contact_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.2040238, "relation_name": "\"postgres\".\"public\".\"engagement_contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_channel_data": {"database": "postgres", "schema": "public", "name": "conversation_channel_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_channel_data.csv", "original_file_path": "seeds/conversation_channel_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_channel_data", "fqn": ["hubspot_integration_tests", "conversation_channel_data"], "alias": "conversation_channel_data", "checksum": {"name": "sha256", "checksum": "37ceda53750f0882249e4f821600e680f254da18330acbaaaf4d3bedb2afb5e2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.2077184, "relation_name": "\"postgres\".\"public\".\"conversation_channel_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_list_data": {"database": "postgres", "schema": "public", "name": "company_list_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_list_data.csv", "original_file_path": "seeds/company_list_data.csv", "unique_id": "seed.hubspot_integration_tests.company_list_data", "fqn": ["hubspot_integration_tests", "company_list_data"], "alias": "company_list_data", "checksum": {"name": "sha256", "checksum": "838f953b882a48b5a7f9dcabb0e024d09d3046cb3a0761774d50ff9e65c3220c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "_fivetran_deleted": "boolean", "_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "name": "varchar", "created_by_id": "varchar", "object_type_id": "varchar", "processing_status": "varchar", "processing_type": "varchar", "list_version": "bigint", "filters_updated_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "created_by_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "object_type_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "processing_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "processing_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "list_version": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "filters_updated_at": "timestamp"}}, "created_at": 1786034517.2153604, "relation_name": "\"postgres\".\"public\".\"company_list_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_list_member_data": {"database": "postgres", "schema": "public", "name": "contact_list_member_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_list_member_data.csv", "original_file_path": "seeds/contact_list_member_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_list_member_data", "fqn": ["hubspot_integration_tests", "contact_list_member_data"], "alias": "contact_list_member_data", "checksum": {"name": "sha256", "checksum": "6b99af2cc326b0d01ca9e40c3f65f85dd6ed0e80f875394f6394c8d633cec35c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.2190323, "relation_name": "\"postgres\".\"public\".\"contact_list_member_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_merge_audit_data": {"database": "postgres", "schema": "public", "name": "contact_merge_audit_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_merge_audit_data.csv", "original_file_path": "seeds/contact_merge_audit_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_merge_audit_data", "fqn": ["hubspot_integration_tests", "contact_merge_audit_data"], "alias": "contact_merge_audit_data", "checksum": {"name": "sha256", "checksum": "bc58ce75085b38346a5ba2589c46b10ae70f84376c2954c4f9dc9835df6334ee"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"vid_to_merge": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"vid_to_merge": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.2225451, "relation_name": "\"postgres\".\"public\".\"contact_merge_audit_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_property_history_data": {"database": "postgres", "schema": "public", "name": "company_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_property_history_data.csv", "original_file_path": "seeds/company_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.company_property_history_data", "fqn": ["hubspot_integration_tests", "company_property_history_data"], "alias": "company_property_history_data", "checksum": {"name": "sha256", "checksum": "3462987f5fa08d4fb357f819c1afa015366594aa448f1fcf9edcbb5a54a53f23"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"company_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"company_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.226269, "relation_name": "\"postgres\".\"public\".\"company_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_company_data": {"database": "postgres", "schema": "public", "name": "engagement_company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_company_data.csv", "original_file_path": "seeds/engagement_company_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_company_data", "fqn": ["hubspot_integration_tests", "engagement_company_data"], "alias": "engagement_company_data", "checksum": {"name": "sha256", "checksum": "052a711fa2c1fecec78445cb28390ae31b87c48a4012deccb4c59379a18e5c3c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "company_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "company_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.2299461, "relation_name": "\"postgres\".\"public\".\"engagement_company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.property_option_data": {"database": "postgres", "schema": "public", "name": "property_option_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "property_option_data.csv", "original_file_path": "seeds/property_option_data.csv", "unique_id": "seed.hubspot_integration_tests.property_option_data", "fqn": ["hubspot_integration_tests", "property_option_data"], "alias": "property_option_data", "checksum": {"name": "sha256", "checksum": "1d6abb5e2b665cef38bdc8094a52c6d9e6bf17c1da8b1944e0b5a4cebf86971c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.2335048, "relation_name": "\"postgres\".\"public\".\"property_option_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_note_data": {"database": "postgres", "schema": "public", "name": "engagement_note_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_note_data.csv", "original_file_path": "seeds/engagement_note_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_note_data", "fqn": ["hubspot_integration_tests", "engagement_note_data"], "alias": "engagement_note_data", "checksum": {"name": "sha256", "checksum": "c9c1d724b0da4e24df833b5749e7e58fd98b7076974c6a69c630f1221bec68e2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786034517.2371109, "relation_name": "\"postgres\".\"public\".\"engagement_note_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_engagement_data": {"database": "postgres", "schema": "public", "name": "ticket_engagement_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_engagement_data.csv", "original_file_path": "seeds/ticket_engagement_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_engagement_data", "fqn": ["hubspot_integration_tests", "ticket_engagement_data"], "alias": "ticket_engagement_data", "checksum": {"name": "sha256", "checksum": "e82183e02a005bef5543db4bb29b3993936bfdaf54725b87db7adde6e783fdce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.240752, "relation_name": "\"postgres\".\"public\".\"ticket_engagement_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_inbox_data": {"database": "postgres", "schema": "public", "name": "conversation_inbox_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_inbox_data.csv", "original_file_path": "seeds/conversation_inbox_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_inbox_data", "fqn": ["hubspot_integration_tests", "conversation_inbox_data"], "alias": "conversation_inbox_data", "checksum": {"name": "sha256", "checksum": "598b1a8ddf02546496b0c568f3d6deb07870f236ba0b57a22c56b29235e1620a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "active": "boolean", "created_at": "timestamp", "name": "varchar", "type": "varchar", "updated_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "active": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "created_at": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "updated_at": "timestamp"}}, "created_at": 1786034517.2443779, "relation_name": "\"postgres\".\"public\".\"conversation_inbox_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_channel_account_data": {"database": "postgres", "schema": "public", "name": "conversation_channel_account_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_channel_account_data.csv", "original_file_path": "seeds/conversation_channel_account_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_channel_account_data", "fqn": ["hubspot_integration_tests", "conversation_channel_account_data"], "alias": "conversation_channel_account_data", "checksum": {"name": "sha256", "checksum": "ab2103ed11b4a354170f51c63d95e97549407eb9690286c82c0fc1d5942bba0c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "channel_id": "varchar", "inbox_id": "varchar", "active": "boolean", "authorized": "boolean", "created_at": "timestamp", "name": "varchar", "delivery_identifier_type": "varchar", "delivery_identifier_value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "channel_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "active": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "authorized": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "created_at": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.2482274, "relation_name": "\"postgres\".\"public\".\"conversation_channel_account_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_dropped_data_postgres": {"database": "postgres", "schema": "public", "name": "email_event_dropped_data_postgres", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_dropped_data_postgres.csv", "original_file_path": "seeds/email_event_dropped_data_postgres.csv", "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data_postgres", "fqn": ["hubspot_integration_tests", "email_event_dropped_data_postgres"], "alias": "email_event_dropped_data", "checksum": {"name": "sha256", "checksum": "67533a391764bd55035ea642a7a06bdc9e96f155b33942c1fb9616fea2beb1de"}, "config": {"enabled": true, "alias": "email_event_dropped_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "email_event_dropped_data", "enabled": "{{ true if target.type == 'postgres' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786034517.251981, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_spam_report_data": {"database": "postgres", "schema": "public", "name": "email_event_spam_report_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_spam_report_data.csv", "original_file_path": "seeds/email_event_spam_report_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_spam_report_data", "fqn": ["hubspot_integration_tests", "email_event_spam_report_data"], "alias": "email_event_spam_report_data", "checksum": {"name": "sha256", "checksum": "5b3eacc85df91b0a1c4f10e96dbedcf5c5da06e040f9a7e2f2a8cef297b8378d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.2554812, "relation_name": "\"postgres\".\"public\".\"email_event_spam_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_actor_data": {"database": "postgres", "schema": "public", "name": "conversation_actor_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_actor_data.csv", "original_file_path": "seeds/conversation_actor_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_actor_data", "fqn": ["hubspot_integration_tests", "conversation_actor_data"], "alias": "conversation_actor_data", "checksum": {"name": "sha256", "checksum": "6e1b3534bd2abe007c3883d6c0077a79930bc4521d9db03ccda17000572553a5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "varchar", "avatar": "varchar", "email": "varchar", "name": "varchar", "type": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "avatar": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "email": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.2591984, "relation_name": "\"postgres\".\"public\".\"conversation_actor_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.users_data": {"database": "postgres", "schema": "public", "name": "users_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "users_data.csv", "original_file_path": "seeds/users_data.csv", "unique_id": "seed.hubspot_integration_tests.users_data", "fqn": ["hubspot_integration_tests", "users_data"], "alias": "users_data", "checksum": {"name": "sha256", "checksum": "5c2fdbed75a4bfa6f9d3baf59049ecf8327ceef56ff56d51982f2bfcc322f718"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "role_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "role_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.2629027, "relation_name": "\"postgres\".\"public\".\"users_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_data": {"database": "postgres", "schema": "public", "name": "deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_data.csv", "original_file_path": "seeds/deal_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_data", "fqn": ["hubspot_integration_tests", "deal_data"], "alias": "deal_data", "checksum": {"name": "sha256", "checksum": "ef4971d5d5051776f058c50422ddb52f1f968071fae5eecaa12f3777a071c175"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint", "owner_id": "bigint", "property_closedate": "timestamp", "property_createdate": "timestamp", "deal_pipeline_id": "varchar(100)", "deal_pipeline_stage_id": "varchar(100)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "property_closedate": "timestamp", "property_createdate": "timestamp", "deal_pipeline_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}", "deal_pipeline_stage_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}"}}, "created_at": 1786034517.2665431, "relation_name": "\"postgres\".\"public\".\"deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_company_data": {"database": "postgres", "schema": "public", "name": "ticket_company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_company_data.csv", "original_file_path": "seeds/ticket_company_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_company_data", "fqn": ["hubspot_integration_tests", "ticket_company_data"], "alias": "ticket_company_data", "checksum": {"name": "sha256", "checksum": "9c8017640c79e32f405290b937bac10f3aea449a6da13d213914c826a58cd6cf"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.2738326, "relation_name": "\"postgres\".\"public\".\"ticket_company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_participant_data": {"database": "postgres", "schema": "public", "name": "marketing_event_participant_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_participant_data.csv", "original_file_path": "seeds/marketing_event_participant_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_participant_data", "fqn": ["hubspot_integration_tests", "marketing_event_participant_data"], "alias": "marketing_event_participant_data", "checksum": {"name": "sha256", "checksum": "fb833bb425116b4c2739dc56b953873fa39ca50ecc5f9d73fb2f0c5fdc6963e1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "marketing_event_id": "bigint", "contact_id": "bigint", "properties_attendance_duration_seconds": "bigint", "properties_attendance_percentage": "float", "created_at": "timestamp", "properties_occurred_at": "timestamp", "_fivetran_synced": "timestamp", "properties_attendance_state": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "marketing_event_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "properties_attendance_duration_seconds": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "properties_attendance_percentage": "{{ 'float64' if target.type == 'bigquery' else 'float' }}", "created_at": "timestamp", "properties_occurred_at": "timestamp", "_fivetran_synced": "timestamp", "properties_attendance_state": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.277463, "relation_name": "\"postgres\".\"public\".\"marketing_event_participant_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.submission_response_data": {"database": "postgres", "schema": "public", "name": "submission_response_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "submission_response_data.csv", "original_file_path": "seeds/submission_response_data.csv", "unique_id": "seed.hubspot_integration_tests.submission_response_data", "fqn": ["hubspot_integration_tests", "submission_response_data"], "alias": "submission_response_data", "checksum": {"name": "sha256", "checksum": "e8d187696e4e1174535227f0d54dc332f319ced2b65c5279470a1e0b67eb9c4c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"submitted_at": "bigint", "_fivetran_synced": "timestamp", "conversion_id": "varchar", "form_id": "varchar", "field_name": "varchar", "field_value": "varchar", "page_url": "varchar", "object_type_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"submitted_at": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "conversion_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "form_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "field_name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "field_value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "page_url": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "object_type_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.2813022, "relation_name": "\"postgres\".\"public\".\"submission_response_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_email_data": {"database": "postgres", "schema": "public", "name": "engagement_email_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_email_data.csv", "original_file_path": "seeds/engagement_email_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_email_data", "fqn": ["hubspot_integration_tests", "engagement_email_data"], "alias": "engagement_email_data", "checksum": {"name": "sha256", "checksum": "92889176a07fd7ee29f64c41eb254b8bc83102cc4d5f6a5df2786a49c7bf635e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786034517.2888138, "relation_name": "\"postgres\".\"public\".\"engagement_email_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_list_data": {"database": "postgres", "schema": "public", "name": "marketing_event_list_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_list_data.csv", "original_file_path": "seeds/marketing_event_list_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_list_data", "fqn": ["hubspot_integration_tests", "marketing_event_list_data"], "alias": "marketing_event_list_data", "checksum": {"name": "sha256", "checksum": "346d6b6bbd3633c8c7bdc4a3e8c823d932a1427ccf81c6fffe452814142b2048"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "marketing_event_id": "bigint", "list_version": "bigint", "size": "bigint", "filters_updated_at": "timestamp", "created_at": "timestamp", "deleted_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "name": "varchar", "created_by_id": "varchar", "updated_by_id": "varchar", "processing_status": "varchar", "object_type_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "marketing_event_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "list_version": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "size": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "filters_updated_at": "timestamp", "created_at": "timestamp", "deleted_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "created_by_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "updated_by_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "processing_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "object_type_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.2929053, "relation_name": "\"postgres\".\"public\".\"marketing_event_list_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_data": {"database": "postgres", "schema": "public", "name": "contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_data.csv", "original_file_path": "seeds/contact_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_data", "fqn": ["hubspot_integration_tests", "contact_data"], "alias": "contact_data", "checksum": {"name": "sha256", "checksum": "bc751862a73b90c64241bb3e0006fa01ceb00ece2a29323da49412463cf1b938"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3007956, "relation_name": "\"postgres\".\"public\".\"contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_contact_data": {"database": "postgres", "schema": "public", "name": "deal_contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_contact_data.csv", "original_file_path": "seeds/deal_contact_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_contact_data", "fqn": ["hubspot_integration_tests", "deal_contact_data"], "alias": "deal_contact_data", "checksum": {"name": "sha256", "checksum": "55ae3e8166d78a6457118c8a46cd967e34edcc2677206855f88a204cb5346b70"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"contact_id": "bigint", "deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3044791, "relation_name": "\"postgres\".\"public\".\"deal_contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.team_data": {"database": "postgres", "schema": "public", "name": "team_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "team_data.csv", "original_file_path": "seeds/team_data.csv", "unique_id": "seed.hubspot_integration_tests.team_data", "fqn": ["hubspot_integration_tests", "team_data"], "alias": "team_data", "checksum": {"name": "sha256", "checksum": "f5119d8441fa80e5d6ea6e95cc834825b452975d6894c03d226eeb0fcb12d804"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3081996, "relation_name": "\"postgres\".\"public\".\"team_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_property_history_data": {"database": "postgres", "schema": "public", "name": "contact_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_property_history_data.csv", "original_file_path": "seeds/contact_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_property_history_data", "fqn": ["hubspot_integration_tests", "contact_property_history_data"], "alias": "contact_property_history_data", "checksum": {"name": "sha256", "checksum": "35d8aa810d62553192c41e6ca9f7b019fd86be4f12f19bad39d45a70ae475714"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "timestamp": "timestamp"}}, "created_at": 1786034517.3120294, "relation_name": "\"postgres\".\"public\".\"contact_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_campaign_data": {"database": "postgres", "schema": "public", "name": "email_campaign_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_campaign_data.csv", "original_file_path": "seeds/email_campaign_data.csv", "unique_id": "seed.hubspot_integration_tests.email_campaign_data", "fqn": ["hubspot_integration_tests", "email_campaign_data"], "alias": "email_campaign_data", "checksum": {"name": "sha256", "checksum": "ee721995ffb55b71eed966753908d37a1f035c990794b76144f05ad343af8550"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "content_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "content_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3157756, "relation_name": "\"postgres\".\"public\".\"email_campaign_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_list_data": {"database": "postgres", "schema": "public", "name": "contact_list_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_list_data.csv", "original_file_path": "seeds/contact_list_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_list_data", "fqn": ["hubspot_integration_tests", "contact_list_data"], "alias": "contact_list_data", "checksum": {"name": "sha256", "checksum": "ddc7444e3de7929c78d387b60d2a6e3edbc1d52ac32b790a4a43e0d9d5829473"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3194075, "relation_name": "\"postgres\".\"public\".\"contact_list_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_pipeline_data": {"database": "postgres", "schema": "public", "name": "ticket_pipeline_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_pipeline_data.csv", "original_file_path": "seeds/ticket_pipeline_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_data", "fqn": ["hubspot_integration_tests", "ticket_pipeline_data"], "alias": "ticket_pipeline_data", "checksum": {"name": "sha256", "checksum": "29ee49b2c5ea97be925fabdef44cc24316ad39a23ff9ee5c1ae3c35c2610486f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"pipeline_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"pipeline_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.322977, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_message_history_data": {"database": "postgres", "schema": "public", "name": "conversation_message_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_message_history_data.csv", "original_file_path": "seeds/conversation_message_history_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_message_history_data", "fqn": ["hubspot_integration_tests", "conversation_message_history_data"], "alias": "conversation_message_history_data", "checksum": {"name": "sha256", "checksum": "ae9e0d1d37a0ca1d70c7a57ddbe171638a9a8c593d675f4bc0234216e090ff83"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "_fivetran_active": "boolean", "id": "varchar", "thread_id": "varchar", "channel_account_id": "varchar", "channel_id": "varchar", "from_inbox_id": "varchar", "to_inbox_id": "varchar", "assigned_to": "varchar", "assigned_from": "varchar", "created_at": "timestamp", "created_by": "varchar", "direction": "varchar", "in_reply_to_id": "varchar", "new_status": "varchar", "rich_text": "varchar", "subject": "varchar", "text": "varchar", "truncation_status": "varchar", "type": "varchar", "updated_at": "timestamp", "client_type": "varchar", "status_type": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "_fivetran_active": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "thread_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "channel_account_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "channel_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "from_inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "to_inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "assigned_to": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "assigned_from": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "created_at": "timestamp", "created_by": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "direction": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "in_reply_to_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "new_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "rich_text": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "subject": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "text": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "truncation_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "updated_at": "timestamp", "client_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "status_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.3270276, "relation_name": "\"postgres\".\"public\".\"conversation_message_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_delivered_data": {"database": "postgres", "schema": "public", "name": "email_event_delivered_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_delivered_data.csv", "original_file_path": "seeds/email_event_delivered_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_delivered_data", "fqn": ["hubspot_integration_tests", "email_event_delivered_data"], "alias": "email_event_delivered_data", "checksum": {"name": "sha256", "checksum": "17081123e8396f7ffaba509180c463ce9684b973f6703e8b4984bba400f41dd8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3308141, "relation_name": "\"postgres\".\"public\".\"email_event_delivered_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_data": {"database": "postgres", "schema": "public", "name": "marketing_event_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_data.csv", "original_file_path": "seeds/marketing_event_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_data", "fqn": ["hubspot_integration_tests", "marketing_event_data"], "alias": "marketing_event_data", "checksum": {"name": "sha256", "checksum": "1264c16ca1391a36bb59a4893a6b57e1e00b042f63ac098170f0d5720458919a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "app_id": "varchar", "attendees": "bigint", "cancellations": "bigint", "no_shows": "bigint", "registrants": "bigint", "event_cancelled": "boolean", "event_completed": "boolean", "_fivetran_deleted": "boolean", "created_at": "timestamp", "end_date_time": "timestamp", "start_date_time": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "app_name": "varchar", "event_description": "varchar", "event_name": "varchar", "event_organizer": "varchar", "event_status": "varchar", "event_type": "varchar", "event_url": "varchar", "external_event_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "app_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "attendees": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "cancellations": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "no_shows": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "registrants": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "event_cancelled": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "event_completed": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "created_at": "timestamp", "end_date_time": "timestamp", "start_date_time": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "app_name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_description": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_organizer": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_url": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "external_event_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.3345928, "relation_name": "\"postgres\".\"public\".\"marketing_event_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_data_postgres": {"database": "postgres", "schema": "public", "name": "company_data_postgres", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data_postgres.csv", "original_file_path": "seeds/company_data_postgres.csv", "unique_id": "seed.hubspot_integration_tests.company_data_postgres", "fqn": ["hubspot_integration_tests", "company_data_postgres"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "73625b97c04121c6ca87ee71a6f0a68ab9e587a475c4b6c6b5e475d138980624"}, "config": {"enabled": true, "alias": "company_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "company_data", "enabled": "{{ true if target.type == 'postgres' and not var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3383782, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_data": {"database": "postgres", "schema": "public", "name": "engagement_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_data.csv", "original_file_path": "seeds/engagement_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_data", "fqn": ["hubspot_integration_tests", "engagement_data"], "alias": "engagement_data", "checksum": {"name": "sha256", "checksum": "f988895788ec22b2131419e6e38f5f7717cc3302b2fd4914529d5f94657eb44c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp"}}, "created_at": 1786034517.3419785, "relation_name": "\"postgres\".\"public\".\"engagement_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.role_data": {"database": "postgres", "schema": "public", "name": "role_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "role_data.csv", "original_file_path": "seeds/role_data.csv", "unique_id": "seed.hubspot_integration_tests.role_data", "fqn": ["hubspot_integration_tests", "role_data"], "alias": "role_data", "checksum": {"name": "sha256", "checksum": "3cbd245835bbd8e516e6df3c7fdce611ed9b483ed186fee40a6c7fdc77743922"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3461235, "relation_name": "\"postgres\".\"public\".\"role_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_list_member_data": {"database": "postgres", "schema": "public", "name": "company_list_member_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_list_member_data.csv", "original_file_path": "seeds/company_list_member_data.csv", "unique_id": "seed.hubspot_integration_tests.company_list_member_data", "fqn": ["hubspot_integration_tests", "company_list_member_data"], "alias": "company_list_member_data", "checksum": {"name": "sha256", "checksum": "edcd5971b7f86d0de68b188b7607d6a418c791a6f683c43595e0c87286cf99f4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"company_id": "bigint", "company_list_id": "bigint", "_fivetran_deleted": "boolean", "_fivetran_synced": "timestamp", "added_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"company_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "company_list_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_synced": "timestamp", "added_at": "timestamp"}}, "created_at": 1786034517.349972, "relation_name": "\"postgres\".\"public\".\"company_list_member_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_thread_data": {"database": "postgres", "schema": "public", "name": "conversation_thread_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_thread_data.csv", "original_file_path": "seeds/conversation_thread_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_thread_data", "fqn": ["hubspot_integration_tests", "conversation_thread_data"], "alias": "conversation_thread_data", "checksum": {"name": "sha256", "checksum": "bb0424ea8471c7b479162a01c5c02c40f907966ddf3606e5eee4d3482e8278f2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "inbox_id": "varchar", "associated_contact_id": "varchar", "associated_ticket_id": "varchar", "original_channel_account_id": "varchar", "original_channel_id": "varchar", "assigned_to": "varchar", "closed_at": "timestamp", "created_at": "timestamp", "latest_message_received_timestamp": "timestamp", "latest_message_sent_timestamp": "timestamp", "latest_message_timestamp": "timestamp", "spam": "varchar", "status": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "associated_contact_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "associated_ticket_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "original_channel_account_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "original_channel_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "assigned_to": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "closed_at": "timestamp", "created_at": "timestamp", "latest_message_received_timestamp": "timestamp", "latest_message_sent_timestamp": "timestamp", "latest_message_timestamp": "timestamp", "spam": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.3538623, "relation_name": "\"postgres\".\"public\".\"conversation_thread_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_stage_data": {"database": "postgres", "schema": "public", "name": "deal_stage_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_stage_data.csv", "original_file_path": "seeds/deal_stage_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_stage_data", "fqn": ["hubspot_integration_tests", "deal_stage_data"], "alias": "deal_stage_data", "checksum": {"name": "sha256", "checksum": "b9519b383402bcdf8c66775d1d83020db2d1e33a1e2598a83109be526bd56101"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3576093, "relation_name": "\"postgres\".\"public\".\"deal_stage_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_property_history_data": {"database": "postgres", "schema": "public", "name": "ticket_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_property_history_data.csv", "original_file_path": "seeds/ticket_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_property_history_data", "fqn": ["hubspot_integration_tests", "ticket_property_history_data"], "alias": "ticket_property_history_data", "checksum": {"name": "sha256", "checksum": "9b328e4208371a41eea11df75ce4cb7b73812ed4a13a1f8fe49595db4ec45d86"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"timestamp_instant": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"timestamp_instant": "timestamp"}}, "created_at": 1786034517.3613338, "relation_name": "\"postgres\".\"public\".\"ticket_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_property_history_data": {"database": "postgres", "schema": "public", "name": "deal_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_property_history_data.csv", "original_file_path": "seeds/deal_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_property_history_data", "fqn": ["hubspot_integration_tests", "deal_property_history_data"], "alias": "deal_property_history_data", "checksum": {"name": "sha256", "checksum": "924128457b878f586f3bf9902ef6f2f17c2f74caef63fb143083c47a98728415"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3684876, "relation_name": "\"postgres\".\"public\".\"deal_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_data": {"database": "postgres", "schema": "public", "name": "ticket_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_data.csv", "original_file_path": "seeds/ticket_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_data", "fqn": ["hubspot_integration_tests", "ticket_data"], "alias": "ticket_data", "checksum": {"name": "sha256", "checksum": "c3edf20a13788b50e4736f1ec482bd3afa89db11b3d04650082ec5533733b2e4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"property_closed_date": "timestamp", "property_createdate": "timestamp", "property_hs_pipeline": "varchar", "property_hs_pipeline_stage": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"property_closed_date": "timestamp", "property_createdate": "timestamp", "property_hs_pipeline": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "property_hs_pipeline_stage": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.3721406, "relation_name": "\"postgres\".\"public\".\"ticket_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_open_data": {"database": "postgres", "schema": "public", "name": "email_event_open_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_open_data.csv", "original_file_path": "seeds/email_event_open_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_open_data", "fqn": ["hubspot_integration_tests", "email_event_open_data"], "alias": "email_event_open_data", "checksum": {"name": "sha256", "checksum": "19849df38ebaf01d9a044ab75123d78072936702357ede19a6c574acc569287b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3757093, "relation_name": "\"postgres\".\"public\".\"email_event_open_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.property_data": {"database": "postgres", "schema": "public", "name": "property_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "property_data.csv", "original_file_path": "seeds/property_data.csv", "unique_id": "seed.hubspot_integration_tests.property_data", "fqn": ["hubspot_integration_tests", "property_data"], "alias": "property_data", "checksum": {"name": "sha256", "checksum": "3047ea0395efbbfbe631491917c3f974f10bee7403ac19e4140b5d7f2c08e5fe"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3792825, "relation_name": "\"postgres\".\"public\".\"property_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_sent_data_postgres": {"database": "postgres", "schema": "public", "name": "email_event_sent_data_postgres", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_sent_data_postgres.csv", "original_file_path": "seeds/email_event_sent_data_postgres.csv", "unique_id": "seed.hubspot_integration_tests.email_event_sent_data_postgres", "fqn": ["hubspot_integration_tests", "email_event_sent_data_postgres"], "alias": "email_event_sent_data", "checksum": {"name": "sha256", "checksum": "80ffa8bf0d8e99c8986e86b295e3dc1b0846adaee9e5eaf638f7603b92c0aa44"}, "config": {"enabled": true, "alias": "email_event_sent_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "email_event_sent_data", "enabled": "{{ true if target.type == 'postgres' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786034517.3864853, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_click_data": {"database": "postgres", "schema": "public", "name": "email_event_click_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_click_data.csv", "original_file_path": "seeds/email_event_click_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_click_data", "fqn": ["hubspot_integration_tests", "email_event_click_data"], "alias": "email_event_click_data", "checksum": {"name": "sha256", "checksum": "43db504350a17932c8c0c3188984caaa1383a0dca5c2f1e397e6d6c6bd2a7a6f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3899806, "relation_name": "\"postgres\".\"public\".\"email_event_click_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_deferred_data": {"database": "postgres", "schema": "public", "name": "email_event_deferred_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_deferred_data.csv", "original_file_path": "seeds/email_event_deferred_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_deferred_data", "fqn": ["hubspot_integration_tests", "email_event_deferred_data"], "alias": "email_event_deferred_data", "checksum": {"name": "sha256", "checksum": "57fdcaa6af4ab17b6c8abc9dc5202a3251b01648e931df6fa78df7c3602244b5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.393609, "relation_name": "\"postgres\".\"public\".\"email_event_deferred_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_company_data": {"database": "postgres", "schema": "public", "name": "deal_company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_company_data.csv", "original_file_path": "seeds/deal_company_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_company_data", "fqn": ["hubspot_integration_tests", "deal_company_data"], "alias": "deal_company_data", "checksum": {"name": "sha256", "checksum": "27dace40324c3c15e24dfeaff3d8a27595feba3cc583da93ec9aec19e32aadea"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.3971186, "relation_name": "\"postgres\".\"public\".\"deal_company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.team_user_data": {"database": "postgres", "schema": "public", "name": "team_user_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "team_user_data.csv", "original_file_path": "seeds/team_user_data.csv", "unique_id": "seed.hubspot_integration_tests.team_user_data", "fqn": ["hubspot_integration_tests", "team_user_data"], "alias": "team_user_data", "checksum": {"name": "sha256", "checksum": "d5c54abec6ebea1e67b90f82f50eae4e21eadaf97837c32aa77f583a3058c685"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.4005775, "relation_name": "\"postgres\".\"public\".\"team_user_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_pipeline_stage_data": {"database": "postgres", "schema": "public", "name": "deal_pipeline_stage_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_pipeline_stage_data.csv", "original_file_path": "seeds/deal_pipeline_stage_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_pipeline_stage_data", "fqn": ["hubspot_integration_tests", "deal_pipeline_stage_data"], "alias": "deal_pipeline_stage_data", "checksum": {"name": "sha256", "checksum": "8de8b661475ff929bd6648963bf1905620226a2369aa63d241985f3e9c6a2ae9"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"stage_id": "varchar(100)", "pipeline_id": "varchar(100)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"stage_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}", "pipeline_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}"}}, "created_at": 1786034517.4041083, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_stage_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.owner_team_data": {"database": "postgres", "schema": "public", "name": "owner_team_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "owner_team_data.csv", "original_file_path": "seeds/owner_team_data.csv", "unique_id": "seed.hubspot_integration_tests.owner_team_data", "fqn": ["hubspot_integration_tests", "owner_team_data"], "alias": "owner_team_data", "checksum": {"name": "sha256", "checksum": "18adef1b8697819d55c611d7e4e2a7520b0de7772553a6bb3f38d89bdea160c5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"owner_id": "bigint", "team_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "team_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.4078298, "relation_name": "\"postgres\".\"public\".\"owner_team_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_meeting_data": {"database": "postgres", "schema": "public", "name": "engagement_meeting_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_meeting_data.csv", "original_file_path": "seeds/engagement_meeting_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_meeting_data", "fqn": ["hubspot_integration_tests", "engagement_meeting_data"], "alias": "engagement_meeting_data", "checksum": {"name": "sha256", "checksum": "87dc6217963c671ee6f0e6818ac61c63b6d6b419fc26d1aaf47bae8a7883e63b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp"}}, "created_at": 1786034517.4114692, "relation_name": "\"postgres\".\"public\".\"engagement_meeting_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_pipeline_data": {"database": "postgres", "schema": "public", "name": "deal_pipeline_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_pipeline_data.csv", "original_file_path": "seeds/deal_pipeline_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_pipeline_data", "fqn": ["hubspot_integration_tests", "deal_pipeline_data"], "alias": "deal_pipeline_data", "checksum": {"name": "sha256", "checksum": "381289e17003be7a9c7d62974ba55a8deca3135a8a41b6482b4507188a8f12a8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"pipeline_id": "varchar(100)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"pipeline_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}"}}, "created_at": 1786034517.4151053, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_status_change_data": {"database": "postgres", "schema": "public", "name": "email_event_status_change_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_status_change_data.csv", "original_file_path": "seeds/email_event_status_change_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_status_change_data", "fqn": ["hubspot_integration_tests", "email_event_status_change_data"], "alias": "email_event_status_change_data", "checksum": {"name": "sha256", "checksum": "85f07144104d2cba5c89dfcbd317aad76021f4d857965f4ed87905741249e493"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.418603, "relation_name": "\"postgres\".\"public\".\"email_event_status_change_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_task_data": {"database": "postgres", "schema": "public", "name": "engagement_task_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_task_data.csv", "original_file_path": "seeds/engagement_task_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_task_data", "fqn": ["hubspot_integration_tests", "engagement_task_data"], "alias": "engagement_task_data", "checksum": {"name": "sha256", "checksum": "3a8289e23881daaeda15f5d699f9f0096669c3e0185baf17af0a91ad4a1ed21b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "property_hs_object_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "property_hs_object_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786034517.4233658, "relation_name": "\"postgres\".\"public\".\"engagement_task_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_deal_data": {"database": "postgres", "schema": "public", "name": "ticket_deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_deal_data.csv", "original_file_path": "seeds/ticket_deal_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_deal_data", "fqn": ["hubspot_integration_tests", "ticket_deal_data"], "alias": "ticket_deal_data", "checksum": {"name": "sha256", "checksum": "e88279d2fbd4d681e5950794ce98b9f01b648665e056cdc85c816e7922dfb3da"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.4274483, "relation_name": "\"postgres\".\"public\".\"ticket_deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_deal_data": {"database": "postgres", "schema": "public", "name": "engagement_deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_deal_data.csv", "original_file_path": "seeds/engagement_deal_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_deal_data", "fqn": ["hubspot_integration_tests", "engagement_deal_data"], "alias": "engagement_deal_data", "checksum": {"name": "sha256", "checksum": "b59f36bb53707860fe1167a3de8527f68792fa781312dcc83503dec863e2580a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "deal_id": "bigint", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp"}}, "created_at": 1786034517.4311209, "relation_name": "\"postgres\".\"public\".\"engagement_deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_form_submission_data": {"database": "postgres", "schema": "public", "name": "contact_form_submission_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_form_submission_data.csv", "original_file_path": "seeds/contact_form_submission_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_form_submission_data", "fqn": ["hubspot_integration_tests", "contact_form_submission_data"], "alias": "contact_form_submission_data", "checksum": {"name": "sha256", "checksum": "1bdd6c542884b8ba1f9e074271a0420dd356d35b025ccaf2d8ae4da29838c1ec"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"form_id": "varchar", "contact_id": "bigint", "conversion_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"form_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "conversion_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.4348817, "relation_name": "\"postgres\".\"public\".\"contact_form_submission_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_bounce_data": {"database": "postgres", "schema": "public", "name": "email_event_bounce_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_bounce_data.csv", "original_file_path": "seeds/email_event_bounce_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_bounce_data", "fqn": ["hubspot_integration_tests", "email_event_bounce_data"], "alias": "email_event_bounce_data", "checksum": {"name": "sha256", "checksum": "8fd760a7dd303a1d061e42cf27b7ffc07fc8f615807148b6c66f8408a6037b58"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.4424334, "relation_name": "\"postgres\".\"public\".\"email_event_bounce_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_pipeline_stage_data": {"database": "postgres", "schema": "public", "name": "ticket_pipeline_stage_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_pipeline_stage_data.csv", "original_file_path": "seeds/ticket_pipeline_stage_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_stage_data", "fqn": ["hubspot_integration_tests", "ticket_pipeline_stage_data"], "alias": "ticket_pipeline_stage_data", "checksum": {"name": "sha256", "checksum": "40147d412e5ea27d5e02aab93886cd3c13f428f13aa738f3df51fd869124fc8a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"stage_id": "varchar", "pipeline_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"stage_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "pipeline_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.4462047, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_stage_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_print_data": {"database": "postgres", "schema": "public", "name": "email_event_print_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_print_data.csv", "original_file_path": "seeds/email_event_print_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_print_data", "fqn": ["hubspot_integration_tests", "email_event_print_data"], "alias": "email_event_print_data", "checksum": {"name": "sha256", "checksum": "23c6ad69b0a5c8f207c74ffd33c7c103db023646937269ec4116f7c0d87079bd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.44989, "relation_name": "\"postgres\".\"public\".\"email_event_print_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.merged_deal_data": {"database": "postgres", "schema": "public", "name": "merged_deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "merged_deal_data.csv", "original_file_path": "seeds/merged_deal_data.csv", "unique_id": "seed.hubspot_integration_tests.merged_deal_data", "fqn": ["hubspot_integration_tests", "merged_deal_data"], "alias": "merged_deal_data", "checksum": {"name": "sha256", "checksum": "be973774b1f54ecfa138effa2abd1a98ac1b5976c01179c4612607203035e170"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint", "merged_deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "merged_deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.453463, "relation_name": "\"postgres\".\"public\".\"merged_deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.form_data": {"database": "postgres", "schema": "public", "name": "form_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "form_data.csv", "original_file_path": "seeds/form_data.csv", "unique_id": "seed.hubspot_integration_tests.form_data", "fqn": ["hubspot_integration_tests", "form_data"], "alias": "form_data", "checksum": {"name": "sha256", "checksum": "9ba9725c08a147e6337c5bcf088ea7c46a6f369235740398f7d2fd2a5da618e5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"guid": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"guid": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.461564, "relation_name": "\"postgres\".\"public\".\"form_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_forward_data": {"database": "postgres", "schema": "public", "name": "email_event_forward_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_forward_data.csv", "original_file_path": "seeds/email_event_forward_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_forward_data", "fqn": ["hubspot_integration_tests", "email_event_forward_data"], "alias": "email_event_forward_data", "checksum": {"name": "sha256", "checksum": "570f640292d5a4a9cc66561fb33bb49b7246f331f5b7cebf40402f164e97d381"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.4655929, "relation_name": "\"postgres\".\"public\".\"email_event_forward_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_contact_data": {"database": "postgres", "schema": "public", "name": "ticket_contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_contact_data.csv", "original_file_path": "seeds/ticket_contact_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_contact_data", "fqn": ["hubspot_integration_tests", "ticket_contact_data"], "alias": "ticket_contact_data", "checksum": {"name": "sha256", "checksum": "7aea0600716cf14e5a2582a4c8362b853910ae002fc6fe66b6bebe4853e00ec8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786034517.4694672, "relation_name": "\"postgres\".\"public\".\"ticket_contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_communication_data": {"database": "postgres", "schema": "public", "name": "engagement_communication_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_communication_data.csv", "original_file_path": "seeds/engagement_communication_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_communication_data", "fqn": ["hubspot_integration_tests", "engagement_communication_data"], "alias": "engagement_communication_data", "checksum": {"name": "sha256", "checksum": "bac50a0ecc62eab9e96d775705be03a308c42bcafd8f8cd34c07f430eea4bd64"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786034517.473453, "relation_name": "\"postgres\".\"public\".\"engagement_communication_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_custom_property_data": {"database": "postgres", "schema": "public", "name": "marketing_event_custom_property_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_custom_property_data.csv", "original_file_path": "seeds/marketing_event_custom_property_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_custom_property_data", "fqn": ["hubspot_integration_tests", "marketing_event_custom_property_data"], "alias": "marketing_event_custom_property_data", "checksum": {"name": "sha256", "checksum": "008704214cd117d05796e4504eacfdafbf117068cd513ad950974436ffc02512"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"marketing_event_id": "bigint", "_fivetran_synced": "timestamp", "name": "varchar", "value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"marketing_event_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.4773262, "relation_name": "\"postgres\".\"public\".\"marketing_event_custom_property_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_data": {"database": "postgres", "schema": "public", "name": "email_event_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_data.csv", "original_file_path": "seeds/email_event_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_data", "fqn": ["hubspot_integration_tests", "email_event_data"], "alias": "email_event_data", "checksum": {"name": "sha256", "checksum": "ee10ab2bb6d5fae3915fcd8c903d6295684a4f26d40cd330dde3d44ed2d5712d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "caused_by_created": "timestamp", "created": "timestamp", "obsoleted_by_created": "timestamp", "sent_by_created": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "caused_by_created": "timestamp", "created": "timestamp", "obsoleted_by_created": "timestamp", "sent_by_created": "timestamp"}}, "created_at": 1786034517.4810736, "relation_name": "\"postgres\".\"public\".\"email_event_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_message_recipient_data": {"database": "postgres", "schema": "public", "name": "conversation_message_recipient_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_message_recipient_data.csv", "original_file_path": "seeds/conversation_message_recipient_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_message_recipient_data", "fqn": ["hubspot_integration_tests", "conversation_message_recipient_data"], "alias": "conversation_message_recipient_data", "checksum": {"name": "sha256", "checksum": "2085e1a7c69e9d3cdbf92032c4fac11aabd697ca52f355aca460343fbd31f962"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_id": "varchar", "actor_id": "varchar", "message_id": "varchar", "thread_id": "varchar", "name": "varchar", "recipient_field": "varchar", "delivery_identifier_type": "varchar", "delivery_identifier_value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "actor_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "message_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "thread_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "recipient_field": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786034517.4848998, "relation_name": "\"postgres\".\"public\".\"conversation_message_recipient_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "model.hubspot.hubspot__contact_lists": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__contact_lists", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__contact_lists.sql", "original_file_path": "models/marketing/hubspot__contact_lists.sql", "unique_id": "model.hubspot.hubspot__contact_lists", "fqn": ["hubspot", "marketing", "hubspot__contact_lists"], "alias": "hubspot__contact_lists", "checksum": {"name": "sha256", "checksum": "b593e35696f3e3cf2c29908e94474d129496af452a13555f1016d374d5165238"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact list in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_name": {"name": "contact_list_name", "description": "The name of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_contact_list_deleted": {"name": "is_contact_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_bounces": {"name": "total_bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "total_clicks": {"name": "total_clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "total_deferrals": {"name": "total_deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "total_deliveries": {"name": "total_deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "total_drops": {"name": "total_drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "total_forwards": {"name": "total_forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "total_opens": {"name": "total_opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "total_prints": {"name": "total_prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "total_spam_reports": {"name": "total_spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "total_unsubscribes": {"name": "total_unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "total_unique_bounces": {"name": "total_unique_bounces", "description": "The total number of unique email sends with a bounce email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_bounces"]}, "total_unique_clicks": {"name": "total_unique_clicks", "description": "The total number of unique email sends with a click email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_clicks"]}, "total_unique_deferrals": {"name": "total_unique_deferrals", "description": "The total number of unique email sends with a deferral email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deferrals"]}, "total_unique_deliveries": {"name": "total_unique_deliveries", "description": "The total number of unique email sends with a delivery email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deliveries"]}, "total_unique_drops": {"name": "total_unique_drops", "description": "The total number of unique email sends with a drop email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_drops"]}, "total_unique_forwards": {"name": "total_unique_forwards", "description": "The total number of unique email sends with a forward email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_forwards"]}, "total_unique_opens": {"name": "total_unique_opens", "description": "The total number of unique email sends with a opens email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_opens"]}, "total_unique_prints": {"name": "total_unique_prints", "description": "The total number of unique email sends with a print email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_prints"]}, "total_unique_spam_reports": {"name": "total_unique_spam_reports", "description": "The total number of unique email sends with a spam report email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_spam_reports"]}, "total_unique_unsubscribes": {"name": "total_unique_unsubscribes", "description": "The total number of unique email sends with a unsubscribe email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_unsubscribes"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.2631931, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__contact_lists\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_contact_list_enabled'])) }}\n\nwith contact_lists as (\n\n select *\n from {{ ref('stg_hubspot__contact_list') }}\n\n{% if fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_enabled','hubspot_contact_list_member_enabled','hubspot_email_event_sent_enabled']) %}\n\n), email_metrics as (\n\n select *\n from {{ ref('int_hubspot__email_metrics__by_contact_list') }}\n\n), joined as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select \n contact_lists.*,\n {% for metric in email_metrics %}\n coalesce(email_metrics.total_{{ metric }}, 0) as total_{{ metric }},\n coalesce(email_metrics.total_unique_{{ metric }}, 0) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from contact_lists\n left join email_metrics\n on contact_lists.contact_list_id = email_metrics.contact_list_id\n and contact_lists.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined\n\n{% else %}\n\n)\n\nselect *\nfrom contact_lists\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list", "package": null, "version": null}, {"name": "int_hubspot__email_metrics__by_contact_list", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics"], "nodes": ["model.hubspot.stg_hubspot__contact_list", "model.hubspot.int_hubspot__email_metrics__by_contact_list", "model.hubspot.hubspot__email_sends"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__contact_lists.sql", "compiled": true, "compiled_code": "\n\nwith contact_lists as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list\"\n\n\n\n), email_metrics as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__email_metrics__by_contact_list\"\n\n), joined as (\n \n select \n contact_lists.*,\n \n coalesce(email_metrics.total_bounces, 0) as total_bounces,\n coalesce(email_metrics.total_unique_bounces, 0) as total_unique_bounces\n ,\n \n coalesce(email_metrics.total_clicks, 0) as total_clicks,\n coalesce(email_metrics.total_unique_clicks, 0) as total_unique_clicks\n ,\n \n coalesce(email_metrics.total_deferrals, 0) as total_deferrals,\n coalesce(email_metrics.total_unique_deferrals, 0) as total_unique_deferrals\n ,\n \n coalesce(email_metrics.total_deliveries, 0) as total_deliveries,\n coalesce(email_metrics.total_unique_deliveries, 0) as total_unique_deliveries\n ,\n \n coalesce(email_metrics.total_drops, 0) as total_drops,\n coalesce(email_metrics.total_unique_drops, 0) as total_unique_drops\n ,\n \n coalesce(email_metrics.total_forwards, 0) as total_forwards,\n coalesce(email_metrics.total_unique_forwards, 0) as total_unique_forwards\n ,\n \n coalesce(email_metrics.total_opens, 0) as total_opens,\n coalesce(email_metrics.total_unique_opens, 0) as total_unique_opens\n ,\n \n coalesce(email_metrics.total_prints, 0) as total_prints,\n coalesce(email_metrics.total_unique_prints, 0) as total_unique_prints\n ,\n \n coalesce(email_metrics.total_spam_reports, 0) as total_spam_reports,\n coalesce(email_metrics.total_unique_spam_reports, 0) as total_unique_spam_reports\n ,\n \n coalesce(email_metrics.total_unsubscribes, 0) as total_unsubscribes,\n coalesce(email_metrics.total_unique_unsubscribes, 0) as total_unique_unsubscribes\n \n \n from contact_lists\n left join email_metrics\n on contact_lists.contact_list_id = email_metrics.contact_list_id\n and contact_lists.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_campaigns": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_campaigns", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__email_campaigns.sql", "original_file_path": "models/marketing/hubspot__email_campaigns.sql", "unique_id": "model.hubspot.hubspot__email_campaigns", "fqn": ["hubspot", "marketing", "hubspot__email_campaigns"], "alias": "hubspot__email_campaigns", "checksum": {"name": "sha256", "checksum": "e631b4bcffd2f6c080803b7a733ca9a639a8789369d93062656c4148e06f39fc"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an email campaign in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The app ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The app name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "The ID of the content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_name": {"name": "email_campaign_name", "description": "The name of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_sub_type": {"name": "email_campaign_sub_type", "description": "The email campaign sub-type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_subject": {"name": "email_campaign_subject", "description": "The subject of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_type": {"name": "email_campaign_type", "description": "The email campaign type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_included": {"name": "num_included", "description": "The number of messages included as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_queued": {"name": "num_queued", "description": "The number of messages queued as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_bounces": {"name": "total_bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "total_clicks": {"name": "total_clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "total_deferrals": {"name": "total_deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "total_deliveries": {"name": "total_deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "total_drops": {"name": "total_drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "total_forwards": {"name": "total_forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "total_opens": {"name": "total_opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "total_prints": {"name": "total_prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "total_spam_reports": {"name": "total_spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "total_unsubscribes": {"name": "total_unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "total_unique_bounces": {"name": "total_unique_bounces", "description": "The total number of unique email sends with a bounce email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_bounces"]}, "total_unique_clicks": {"name": "total_unique_clicks", "description": "The total number of unique email sends with a click email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_clicks"]}, "total_unique_deferrals": {"name": "total_unique_deferrals", "description": "The total number of unique email sends with a deferral email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deferrals"]}, "total_unique_deliveries": {"name": "total_unique_deliveries", "description": "The total number of unique email sends with a delivery email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deliveries"]}, "total_unique_drops": {"name": "total_unique_drops", "description": "The total number of unique email sends with a drop email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_drops"]}, "total_unique_forwards": {"name": "total_unique_forwards", "description": "The total number of unique email sends with a forward email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_forwards"]}, "total_unique_opens": {"name": "total_unique_opens", "description": "The total number of unique email sends with a opens email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_opens"]}, "total_unique_prints": {"name": "total_unique_prints", "description": "The total number of unique email sends with a print email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_prints"]}, "total_unique_spam_reports": {"name": "total_unique_spam_reports", "description": "The total number of unique email sends with a spam report email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_spam_reports"]}, "total_unique_unsubscribes": {"name": "total_unique_unsubscribes", "description": "The total number of unique email sends with a unsubscribe email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_unsubscribes"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.2463665, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_campaigns\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\n\nwith campaigns as (\n\n select *\n from {{ ref('stg_hubspot__email_campaign') }}\n\n), email_sends as (\n\n select *\n from {{ ref('hubspot__email_sends') }}\n\n), email_metrics as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select\n email_campaign_id,\n source_relation,\n {% for metric in email_metrics %}\n sum(email_sends.{{ metric }}) as total_{{ metric }},\n count(distinct case when email_sends.{{ metric }} > 0 then email_send_id end) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from email_sends\n group by 1, 2\n\n), joined as (\n\n select \n campaigns.*,\n {% for metric in email_metrics %}\n coalesce(email_metrics.total_{{ metric }}, 0) as total_{{ metric }},\n coalesce(email_metrics.total_unique_{{ metric }}, 0) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from campaigns\n left join email_metrics\n on campaigns.email_campaign_id = email_metrics.email_campaign_id\n and campaigns.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_campaign", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics"], "nodes": ["model.hubspot.stg_hubspot__email_campaign", "model.hubspot.hubspot__email_sends"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__email_campaigns.sql", "compiled": true, "compiled_code": "\n\n\nwith campaigns as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign\"\n\n), email_sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\n\n), email_metrics as (\n \n select\n email_campaign_id,\n source_relation,\n \n sum(email_sends.bounces) as total_bounces,\n count(distinct case when email_sends.bounces > 0 then email_send_id end) as total_unique_bounces\n ,\n \n sum(email_sends.clicks) as total_clicks,\n count(distinct case when email_sends.clicks > 0 then email_send_id end) as total_unique_clicks\n ,\n \n sum(email_sends.deferrals) as total_deferrals,\n count(distinct case when email_sends.deferrals > 0 then email_send_id end) as total_unique_deferrals\n ,\n \n sum(email_sends.deliveries) as total_deliveries,\n count(distinct case when email_sends.deliveries > 0 then email_send_id end) as total_unique_deliveries\n ,\n \n sum(email_sends.drops) as total_drops,\n count(distinct case when email_sends.drops > 0 then email_send_id end) as total_unique_drops\n ,\n \n sum(email_sends.forwards) as total_forwards,\n count(distinct case when email_sends.forwards > 0 then email_send_id end) as total_unique_forwards\n ,\n \n sum(email_sends.opens) as total_opens,\n count(distinct case when email_sends.opens > 0 then email_send_id end) as total_unique_opens\n ,\n \n sum(email_sends.prints) as total_prints,\n count(distinct case when email_sends.prints > 0 then email_send_id end) as total_unique_prints\n ,\n \n sum(email_sends.spam_reports) as total_spam_reports,\n count(distinct case when email_sends.spam_reports > 0 then email_send_id end) as total_unique_spam_reports\n ,\n \n sum(email_sends.unsubscribes) as total_unsubscribes,\n count(distinct case when email_sends.unsubscribes > 0 then email_send_id end) as total_unique_unsubscribes\n \n \n from email_sends\n group by 1, 2\n\n), joined as (\n\n select \n campaigns.*,\n \n coalesce(email_metrics.total_bounces, 0) as total_bounces,\n coalesce(email_metrics.total_unique_bounces, 0) as total_unique_bounces\n ,\n \n coalesce(email_metrics.total_clicks, 0) as total_clicks,\n coalesce(email_metrics.total_unique_clicks, 0) as total_unique_clicks\n ,\n \n coalesce(email_metrics.total_deferrals, 0) as total_deferrals,\n coalesce(email_metrics.total_unique_deferrals, 0) as total_unique_deferrals\n ,\n \n coalesce(email_metrics.total_deliveries, 0) as total_deliveries,\n coalesce(email_metrics.total_unique_deliveries, 0) as total_unique_deliveries\n ,\n \n coalesce(email_metrics.total_drops, 0) as total_drops,\n coalesce(email_metrics.total_unique_drops, 0) as total_unique_drops\n ,\n \n coalesce(email_metrics.total_forwards, 0) as total_forwards,\n coalesce(email_metrics.total_unique_forwards, 0) as total_unique_forwards\n ,\n \n coalesce(email_metrics.total_opens, 0) as total_opens,\n coalesce(email_metrics.total_unique_opens, 0) as total_unique_opens\n ,\n \n coalesce(email_metrics.total_prints, 0) as total_prints,\n coalesce(email_metrics.total_unique_prints, 0) as total_unique_prints\n ,\n \n coalesce(email_metrics.total_spam_reports, 0) as total_spam_reports,\n coalesce(email_metrics.total_unique_spam_reports, 0) as total_unique_spam_reports\n ,\n \n coalesce(email_metrics.total_unsubscribes, 0) as total_unsubscribes,\n coalesce(email_metrics.total_unique_unsubscribes, 0) as total_unique_unsubscribes\n \n \n from campaigns\n left join email_metrics\n on campaigns.email_campaign_id = email_metrics.email_campaign_id\n and campaigns.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__contacts": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__contacts", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__contacts.sql", "original_file_path": "models/marketing/hubspot__contacts.sql", "unique_id": "model.hubspot.hubspot__contacts", "fqn": ["hubspot", "marketing", "hubspot__contacts"], "alias": "hubspot__contacts", "checksum": {"name": "sha256", "checksum": "d60983de19d48e4c0c032181bcf8dfc2896d7589a844d60895ff10cde8cb6a51"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_company": {"name": "contact_company", "description": "The name of the contact's company", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "The email address of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date that the contact was created in your HubSpot account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "job_title": {"name": "job_title", "description": "The contact's job title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_annual_revenue": {"name": "company_annual_revenue", "description": "The contact's annual company revenue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_bounces": {"name": "total_bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "total_clicks": {"name": "total_clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "total_deferrals": {"name": "total_deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "total_deliveries": {"name": "total_deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "total_drops": {"name": "total_drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "total_forwards": {"name": "total_forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "total_opens": {"name": "total_opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "total_prints": {"name": "total_prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "total_spam_reports": {"name": "total_spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "total_unsubscribes": {"name": "total_unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "total_unique_bounces": {"name": "total_unique_bounces", "description": "The total number of unique email sends with a bounce email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_bounces"]}, "total_unique_clicks": {"name": "total_unique_clicks", "description": "The total number of unique email sends with a click email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_clicks"]}, "total_unique_deferrals": {"name": "total_unique_deferrals", "description": "The total number of unique email sends with a deferral email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deferrals"]}, "total_unique_deliveries": {"name": "total_unique_deliveries", "description": "The total number of unique email sends with a delivery email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deliveries"]}, "total_unique_drops": {"name": "total_unique_drops", "description": "The total number of unique email sends with a drop email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_drops"]}, "total_unique_forwards": {"name": "total_unique_forwards", "description": "The total number of unique email sends with a forward email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_forwards"]}, "total_unique_opens": {"name": "total_unique_opens", "description": "The total number of unique email sends with a opens email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_opens"]}, "total_unique_prints": {"name": "total_unique_prints", "description": "The total number of unique email sends with a print email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_prints"]}, "total_unique_spam_reports": {"name": "total_unique_spam_reports", "description": "The total number of unique email sends with a spam report email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_spam_reports"]}, "total_unique_unsubscribes": {"name": "total_unique_unsubscribes", "description": "The total number of unique email sends with a unsubscribe email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_unsubscribes"]}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "merged_object_ids": {"name": "merged_object_ids", "description": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_form_id": {"name": "calculated_first_conversion_form_id", "description": "ID of the form associated with the contact's first conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_date": {"name": "calculated_first_conversion_date", "description": "Timestamp of the contact's first form submission, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_form_name": {"name": "calculated_first_conversion_form_name", "description": "Name of the form submitted during the contact's first conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_form_type": {"name": "calculated_first_conversion_form_type", "description": "Type of form submitted during the contact's first conversion (e.g., regular, pop-up), calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_form_id": {"name": "calculated_most_recent_conversion_form_id", "description": "ID of the form associated with the contact's most recent conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_date": {"name": "calculated_most_recent_conversion_date", "description": "Timestamp of the contact's most recent form submission, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_form_name": {"name": "calculated_most_recent_conversion_form_name", "description": "Name of the form submitted during the contact's most recent conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_form_type": {"name": "calculated_most_recent_conversion_form_type", "description": "Type of form submitted during the contact's most recent conversion (e.g., regular, pop-up), calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_fields_responded_to": {"name": "calculated_first_conversion_fields_responded_to", "description": "Comma-separated list of unique field names submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_total_responses": {"name": "calculated_first_conversion_total_responses", "description": "Number of fields submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_fields_responded_to": {"name": "calculated_most_recent_conversion_fields_responded_to", "description": "Comma-separated list of unique field names submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_total_responses": {"name": "calculated_most_recent_conversion_total_responses", "description": "Number of fields submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_form_submissions": {"name": "total_form_submissions", "description": "Total number of form submissions made by the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_unique_form_submissions": {"name": "total_unique_form_submissions", "description": "Count of distinct forms submitted by the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.2583294, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__contacts\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n{% set emails_enabled = fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled']) %}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled','hubspot_engagement_contact_enabled']) %}\n{% set forms_enabled = fivetran_utils.enabled_vars(['hubspot_contact_form_enabled']) %}\n\n{% set cte_ref = 'contacts' %}\nwith contacts as (\n\n select *\n from {{ ref('int_hubspot__contact_merge_adjust') }} \n\n{% if emails_enabled %}\n\n), email_sends as (\n\n select *\n from {{ ref('hubspot__email_sends') }}\n\n), email_metrics as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select\n recipient_email_address,\n source_relation,\n {% for metric in email_metrics %}\n sum({{ metric }}) as total_{{ metric }},\n count(distinct case when {{ metric }} > 0 then email_send_id end)\n as total_unique_{{ metric }}{{ ',' if not loop.last }}\n {% endfor %}\n from email_sends\n group by 1, 2\n\n), email_joined as (\n\n select \n contacts.*,\n {% for metric in email_metrics %}\n coalesce(email_metrics.total_{{ metric }}, 0) as total_{{ metric }},\n coalesce(email_metrics.total_unique_{{ metric }}, 0)\n as total_unique_{{ metric }}{{ ',' if not loop.last }}\n {% endfor %}\n from contacts\n left join email_metrics\n on contacts.email = email_metrics.recipient_email_address\n and contacts.source_relation = email_metrics.source_relation\n\n{% set cte_ref = 'email_joined' %}\n{% endif %}\n\n{% if engagements_enabled %}\n), engagements as (\n\n select *\n from {{ ref('int_hubspot__engagement_metrics__by_contact') }}\n\n), engagements_joined as (\n\n select \n {{ cte_ref }}.*,\n {% for metric in engagement_metrics() %}\n coalesce(engagements.{{ metric }},0) as {{ metric }}{{ ',' if not loop.last }}\n {% endfor %}\n from {{ cte_ref }}\n left join engagements\n on {{ cte_ref }}.contact_id = engagements.contact_id\n and {{ cte_ref }}.source_relation = engagements.source_relation\n\n{% set cte_ref = 'engagements_joined' %}\n{% endif %}\n\n{% if forms_enabled %}\n), conversions as (\n\n select *\n from {{ ref('int_hubspot__form_metrics__by_contact') }}\n\n), conversions_joined as (\n\n select \n {{ cte_ref }}.*,\n {% set form_metrics = ['form_id', 'date', 'form_name', 'form_type'] %}\n {% if var('hubspot_submission_response_enabled', true) %}\n {% set form_metrics = form_metrics + ['fields_responded_to', 'total_responses'] %}\n {% endif %}\n {% for first_or_last in ['first_conversion', 'most_recent_conversion'] %}\n {% for metric in form_metrics %}\n conversions.{{ first_or_last }}_{{ metric }} as calculated_{{ first_or_last }}_{{ metric }},\n {% endfor %}\n {% endfor %}\n conversions.total_form_submissions,\n conversions.total_unique_form_submissions\n from {{ cte_ref }}\n left join conversions\n on {{ cte_ref }}.contact_id = conversions.contact_id\n and {{ cte_ref }}.source_relation = conversions.source_relation\n\n{% set cte_ref = 'conversions_joined' %}\n{% endif %}\n)\n\nselect *\nfrom {{ cte_ref }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "int_hubspot__engagement_metrics__by_contact", "package": null, "version": null}, {"name": "int_hubspot__form_metrics__by_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__engagement_metrics__by_contact", "model.hubspot.int_hubspot__form_metrics__by_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__contacts.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n), __dbt__cte__int_hubspot__form_metrics__by_contact as (\n\n\nwith form as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\n\n), contact_form_submission as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"\n\n\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n \n string_agg(distinct field_name, ', ')\n\n as fields_responded_to,\n count(*) as total_responses\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\n group by 1, 2\n\n\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n \n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n \n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n \n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n \n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n \n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n \n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n\n), email_sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\n\n), email_metrics as (\n \n select\n recipient_email_address,\n source_relation,\n \n sum(bounces) as total_bounces,\n count(distinct case when bounces > 0 then email_send_id end)\n as total_unique_bounces,\n \n sum(clicks) as total_clicks,\n count(distinct case when clicks > 0 then email_send_id end)\n as total_unique_clicks,\n \n sum(deferrals) as total_deferrals,\n count(distinct case when deferrals > 0 then email_send_id end)\n as total_unique_deferrals,\n \n sum(deliveries) as total_deliveries,\n count(distinct case when deliveries > 0 then email_send_id end)\n as total_unique_deliveries,\n \n sum(drops) as total_drops,\n count(distinct case when drops > 0 then email_send_id end)\n as total_unique_drops,\n \n sum(forwards) as total_forwards,\n count(distinct case when forwards > 0 then email_send_id end)\n as total_unique_forwards,\n \n sum(opens) as total_opens,\n count(distinct case when opens > 0 then email_send_id end)\n as total_unique_opens,\n \n sum(prints) as total_prints,\n count(distinct case when prints > 0 then email_send_id end)\n as total_unique_prints,\n \n sum(spam_reports) as total_spam_reports,\n count(distinct case when spam_reports > 0 then email_send_id end)\n as total_unique_spam_reports,\n \n sum(unsubscribes) as total_unsubscribes,\n count(distinct case when unsubscribes > 0 then email_send_id end)\n as total_unique_unsubscribes\n \n from email_sends\n group by 1, 2\n\n), email_joined as (\n\n select \n contacts.*,\n \n coalesce(email_metrics.total_bounces, 0) as total_bounces,\n coalesce(email_metrics.total_unique_bounces, 0)\n as total_unique_bounces,\n \n coalesce(email_metrics.total_clicks, 0) as total_clicks,\n coalesce(email_metrics.total_unique_clicks, 0)\n as total_unique_clicks,\n \n coalesce(email_metrics.total_deferrals, 0) as total_deferrals,\n coalesce(email_metrics.total_unique_deferrals, 0)\n as total_unique_deferrals,\n \n coalesce(email_metrics.total_deliveries, 0) as total_deliveries,\n coalesce(email_metrics.total_unique_deliveries, 0)\n as total_unique_deliveries,\n \n coalesce(email_metrics.total_drops, 0) as total_drops,\n coalesce(email_metrics.total_unique_drops, 0)\n as total_unique_drops,\n \n coalesce(email_metrics.total_forwards, 0) as total_forwards,\n coalesce(email_metrics.total_unique_forwards, 0)\n as total_unique_forwards,\n \n coalesce(email_metrics.total_opens, 0) as total_opens,\n coalesce(email_metrics.total_unique_opens, 0)\n as total_unique_opens,\n \n coalesce(email_metrics.total_prints, 0) as total_prints,\n coalesce(email_metrics.total_unique_prints, 0)\n as total_unique_prints,\n \n coalesce(email_metrics.total_spam_reports, 0) as total_spam_reports,\n coalesce(email_metrics.total_unique_spam_reports, 0)\n as total_unique_spam_reports,\n \n coalesce(email_metrics.total_unsubscribes, 0) as total_unsubscribes,\n coalesce(email_metrics.total_unique_unsubscribes, 0)\n as total_unique_unsubscribes\n \n from contacts\n left join email_metrics\n on contacts.email = email_metrics.recipient_email_address\n and contacts.source_relation = email_metrics.source_relation\n\n\n\n\n\n), engagements as (\n\n select *\n from __dbt__cte__int_hubspot__engagement_metrics__by_contact\n\n), engagements_joined as (\n\n select \n email_joined.*,\n \n coalesce(engagements.count_engagement_notes,0) as count_engagement_notes,\n \n coalesce(engagements.count_engagement_tasks,0) as count_engagement_tasks,\n \n coalesce(engagements.count_engagement_calls,0) as count_engagement_calls,\n \n coalesce(engagements.count_engagement_meetings,0) as count_engagement_meetings,\n \n coalesce(engagements.count_engagement_emails,0) as count_engagement_emails,\n \n coalesce(engagements.count_engagement_incoming_emails,0) as count_engagement_incoming_emails,\n \n coalesce(engagements.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails\n \n from email_joined\n left join engagements\n on email_joined.contact_id = engagements.contact_id\n and email_joined.source_relation = engagements.source_relation\n\n\n\n\n\n), conversions as (\n\n select *\n from __dbt__cte__int_hubspot__form_metrics__by_contact\n\n), conversions_joined as (\n\n select \n engagements_joined.*,\n \n \n \n \n \n \n conversions.first_conversion_form_id as calculated_first_conversion_form_id,\n \n conversions.first_conversion_date as calculated_first_conversion_date,\n \n conversions.first_conversion_form_name as calculated_first_conversion_form_name,\n \n conversions.first_conversion_form_type as calculated_first_conversion_form_type,\n \n conversions.first_conversion_fields_responded_to as calculated_first_conversion_fields_responded_to,\n \n conversions.first_conversion_total_responses as calculated_first_conversion_total_responses,\n \n \n \n conversions.most_recent_conversion_form_id as calculated_most_recent_conversion_form_id,\n \n conversions.most_recent_conversion_date as calculated_most_recent_conversion_date,\n \n conversions.most_recent_conversion_form_name as calculated_most_recent_conversion_form_name,\n \n conversions.most_recent_conversion_form_type as calculated_most_recent_conversion_form_type,\n \n conversions.most_recent_conversion_fields_responded_to as calculated_most_recent_conversion_fields_responded_to,\n \n conversions.most_recent_conversion_total_responses as calculated_most_recent_conversion_total_responses,\n \n \n conversions.total_form_submissions,\n conversions.total_unique_form_submissions\n from engagements_joined\n left join conversions\n on engagements_joined.contact_id = conversions.contact_id\n and engagements_joined.source_relation = conversions.source_relation\n\n\n\n)\n\nselect *\nfrom conversions_joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n)"}, {"id": "model.hubspot.int_hubspot__form_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__form_metrics__by_contact as (\n\n\nwith form as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\n\n), contact_form_submission as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"\n\n\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n \n string_agg(distinct field_name, ', ')\n\n as fields_responded_to,\n count(*) as total_responses\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\n group by 1, 2\n\n\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n \n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n \n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n \n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n \n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n \n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n \n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__marketing_event_performance": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__marketing_event_performance", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__marketing_event_performance.sql", "original_file_path": "models/marketing/hubspot__marketing_event_performance.sql", "unique_id": "model.hubspot.hubspot__marketing_event_performance", "fqn": ["hubspot", "marketing", "hubspot__marketing_event_performance"], "alias": "hubspot__marketing_event_performance", "checksum": {"name": "sha256", "checksum": "4ef5d6536ca95b79c086b85d122eb0c37c888ac6c15dac2fd077979699f2b774"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a marketing event with aggregated attendance metrics, contact-level participation counts, segment list membership, and optional custom properties (e.g. budget spent).\n", "columns": {"marketing_event_performance_id": {"name": "marketing_event_performance_id", "description": "Surrogate key hashed on `source_relation` and `marketing_event_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_marketing_event_deleted": {"name": "is_marketing_event_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The unique ID of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_name": {"name": "event_name", "description": "The name of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_status": {"name": "event_status", "description": "The current status of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_url": {"name": "event_url", "description": "A URL in the external event application where the marketing event can be managed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_organizer": {"name": "event_organizer", "description": "The name of the organizer of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_description": {"name": "event_description", "description": "A description of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The string ID of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The name of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "external_event_id": {"name": "external_event_id", "description": "The ID that is associated with this marketing event in the external event application.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp when the marketing event starts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp when the marketing event ends.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_duration_minutes": {"name": "event_duration_minutes", "description": "The duration of the event in minutes, calculated from start to end timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_cancelled": {"name": "event_cancelled", "description": "Boolean indicating whether the marketing event was cancelled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_completed": {"name": "event_completed", "description": "Boolean indicating whether the marketing event has been completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "registrants": {"name": "registrants", "description": "Number of registered contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendees": {"name": "attendees", "description": "Number of attended contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellations": {"name": "cancellations", "description": "Number of cancelled contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_shows": {"name": "no_shows", "description": "Number of no-show contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_rate": {"name": "attendance_rate", "description": "Ratio of attendees to registrants. Null when registrants is zero.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_show_rate": {"name": "no_show_rate", "description": "Ratio of no-shows to registrants. Null when registrants is zero.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellation_rate": {"name": "cancellation_rate", "description": "Ratio of cancellations to registrants. Null when registrants is zero.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_contacts": {"name": "total_contacts", "description": "Count of distinct contacts with a record in the participant table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_attended_contacts": {"name": "total_attended_contacts", "description": "Count of distinct contacts with attendance_state = 'ATTENDED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_cancelled_contacts": {"name": "total_cancelled_contacts", "description": "Count of distinct contacts with attendance_state = 'CANCELLED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_empty_contacts": {"name": "total_empty_contacts", "description": "Count of distinct contacts with attendance_state = 'EMPTY'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_no_show_contacts": {"name": "total_no_show_contacts", "description": "Count of distinct contacts with attendance_state = 'NO_SHOW'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_registered_contacts": {"name": "total_registered_contacts", "description": "Count of distinct contacts with attendance_state = 'REGISTERED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "avg_attendance_duration_seconds": {"name": "avg_attendance_duration_seconds", "description": "Average number of seconds the participation lasted, across all participant records.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_lists": {"name": "total_lists", "description": "Count of active (non-deleted) lists associated with the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the marketing event was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp when the marketing event was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.2238295, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__marketing_event_performance\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true)) }}\n\nwith marketing_events as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event') }}\n\n{% if var('hubspot_marketing_event_participant_enabled', true) %}\n\n), participants_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(distinct contact_id) as total_contacts,\n count(distinct case when attendance_state = 'ATTENDED' then contact_id end) as total_attended_contacts,\n count(distinct case when attendance_state = 'CANCELLED' then contact_id end) as total_cancelled_contacts,\n count(distinct case when attendance_state = 'EMPTY' then contact_id end) as total_empty_contacts,\n count(distinct case when attendance_state = 'NO_SHOW' then contact_id end) as total_no_show_contacts,\n count(distinct case when attendance_state = 'REGISTERED' then contact_id end) as total_registered_contacts,\n avg(attendance_duration_seconds) as avg_attendance_duration_seconds\n from {{ ref('stg_hubspot__marketing_event_participant') }}\n group by 1, 2\n\n{% endif %}\n\n{% if var('hubspot_marketing_event_list_enabled', true) %}\n\n), lists_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(marketing_event_list_id) as total_lists\n from {{ ref('stg_hubspot__marketing_event_list') }}\n where deleted_timestamp is null\n group by 1, 2\n\n{% endif %}\n\n{% set custom_property_columns = var('hubspot_marketing_event_custom_properties', []) %}\n\n{% if var('hubspot_marketing_event_custom_property_enabled', true) and custom_property_columns != [] %}\n\n), custom_properties as (\n\n select\n source_relation,\n marketing_event_id\n {% for column in custom_property_columns %}\n , max(case when property_name = '{{ column }}' then property_value end) as property_{{ dbt_utils.slugify(column) | replace(' ', '_') | lower }}\n {% endfor %}\n from {{ ref('stg_hubspot__marketing_event_custom_property') }}\n group by 1, 2\n\n{% endif %}\n\n), joined as (\n\n select\n marketing_events.*,\n\n -- Derived time and rate metrics\n {{ dbt.datediff(\"marketing_events.start_timestamp\", \"marketing_events.end_timestamp\", \"minute\") }} as event_duration_minutes,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.attendees as {{ dbt.type_numeric() }}) / marketing_events.registrants\n end as attendance_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.no_shows as {{ dbt.type_numeric() }}) / marketing_events.registrants\n end as no_show_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.cancellations as {{ dbt.type_numeric() }}) / marketing_events.registrants\n end as cancellation_rate\n\n {% if var('hubspot_marketing_event_participant_enabled', true) %}\n , participants_agg.total_contacts\n , participants_agg.total_attended_contacts\n , participants_agg.total_cancelled_contacts\n , participants_agg.total_empty_contacts\n , participants_agg.total_no_show_contacts\n , participants_agg.total_registered_contacts\n , participants_agg.avg_attendance_duration_seconds\n {% endif %}\n\n {% if var('hubspot_marketing_event_list_enabled', true) %}\n , coalesce(lists_agg.total_lists, 0) as total_lists\n {% endif %}\n\n {% if var('hubspot_marketing_event_custom_property_enabled', true) and custom_property_columns != [] %}\n {% for column in custom_property_columns %}\n , custom_properties.property_{{ dbt_utils.slugify(column) | replace(' ', '_') | lower }}\n {% endfor %}\n {% endif %}\n\n from marketing_events\n\n {% if var('hubspot_marketing_event_participant_enabled', true) %}\n left join participants_agg\n on marketing_events.marketing_event_id = participants_agg.marketing_event_id\n and marketing_events.source_relation = participants_agg.source_relation\n {% endif %}\n\n {% if var('hubspot_marketing_event_list_enabled', true) %}\n left join lists_agg\n on marketing_events.marketing_event_id = lists_agg.marketing_event_id\n and marketing_events.source_relation = lists_agg.source_relation\n {% endif %}\n\n {% if var('hubspot_marketing_event_custom_property_enabled', true) and custom_property_columns != [] %}\n left join custom_properties\n on marketing_events.marketing_event_id = custom_properties.marketing_event_id\n and marketing_events.source_relation = custom_properties.source_relation\n {% endif %}\n\n)\n\nselect\n {{ dbt_utils.generate_surrogate_key(['source_relation', 'marketing_event_id']) }} as marketing_event_performance_id,\n *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_participant", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.type_numeric", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__marketing_event", "model.hubspot.stg_hubspot__marketing_event_participant", "model.hubspot.stg_hubspot__marketing_event_list"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__marketing_event_performance.sql", "compiled": true, "compiled_code": "\n\nwith marketing_events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event\"\n\n\n\n), participants_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(distinct contact_id) as total_contacts,\n count(distinct case when attendance_state = 'ATTENDED' then contact_id end) as total_attended_contacts,\n count(distinct case when attendance_state = 'CANCELLED' then contact_id end) as total_cancelled_contacts,\n count(distinct case when attendance_state = 'EMPTY' then contact_id end) as total_empty_contacts,\n count(distinct case when attendance_state = 'NO_SHOW' then contact_id end) as total_no_show_contacts,\n count(distinct case when attendance_state = 'REGISTERED' then contact_id end) as total_registered_contacts,\n avg(attendance_duration_seconds) as avg_attendance_duration_seconds\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant\"\n group by 1, 2\n\n\n\n\n\n), lists_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(marketing_event_list_id) as total_lists\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list\"\n where deleted_timestamp is null\n group by 1, 2\n\n\n\n\n\n\n\n), joined as (\n\n select\n marketing_events.*,\n\n -- Derived time and rate metrics\n \n (\n (\n ((marketing_events.end_timestamp)::date - (marketing_events.start_timestamp)::date)\n * 24 + date_part('hour', (marketing_events.end_timestamp)::timestamp) - date_part('hour', (marketing_events.start_timestamp)::timestamp))\n * 60 + date_part('minute', (marketing_events.end_timestamp)::timestamp) - date_part('minute', (marketing_events.start_timestamp)::timestamp))\n as event_duration_minutes,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.attendees as numeric(28,6)) / marketing_events.registrants\n end as attendance_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.no_shows as numeric(28,6)) / marketing_events.registrants\n end as no_show_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.cancellations as numeric(28,6)) / marketing_events.registrants\n end as cancellation_rate\n\n \n , participants_agg.total_contacts\n , participants_agg.total_attended_contacts\n , participants_agg.total_cancelled_contacts\n , participants_agg.total_empty_contacts\n , participants_agg.total_no_show_contacts\n , participants_agg.total_registered_contacts\n , participants_agg.avg_attendance_duration_seconds\n \n\n \n , coalesce(lists_agg.total_lists, 0) as total_lists\n \n\n \n\n from marketing_events\n\n \n left join participants_agg\n on marketing_events.marketing_event_id = participants_agg.marketing_event_id\n and marketing_events.source_relation = participants_agg.source_relation\n \n\n \n left join lists_agg\n on marketing_events.marketing_event_id = lists_agg.marketing_event_id\n and marketing_events.source_relation = lists_agg.source_relation\n \n\n \n\n)\n\nselect\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(marketing_event_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as marketing_event_performance_id,\n *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["marketing_event_performance_id"], "time_spine": null}, "model.hubspot.hubspot__email_sends": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_sends", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__email_sends.sql", "original_file_path": "models/marketing/hubspot__email_sends.sql", "unique_id": "model.hubspot.hubspot__email_sends", "fqn": ["hubspot", "marketing", "hubspot__email_sends"], "alias": "hubspot__email_sends", "checksum": {"name": "sha256", "checksum": "8eb8e3c2b795c7ab4020483711e2145413f710594aaa9f3f5721e1673870eccd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SENT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "bounces": {"name": "bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "clicks": {"name": "clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "deferrals": {"name": "deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "deliveries": {"name": "deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "drops": {"name": "drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "forwards": {"name": "forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "opens": {"name": "opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "prints": {"name": "prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "spam_reports": {"name": "spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "unsubscribes": {"name": "unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "was_bounced": {"name": "was_bounced", "description": "Whether the email was bounced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_clicked": {"name": "was_clicked", "description": "Whether the email was clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_deferred": {"name": "was_deferred", "description": "Whether the email was deferred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_delivered": {"name": "was_delivered", "description": "Whether the email was delivered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_forwarded": {"name": "was_forwarded", "description": "Whether the email was forwarded.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_opened": {"name": "was_opened", "description": "Whether the email was opened.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_printed": {"name": "was_printed", "description": "Whether the email was printed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_spam_reported": {"name": "was_spam_reported", "description": "Whether the email was spam reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_unsubscribed": {"name": "was_unsubscribed", "description": "Whether the email was unsubscribed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.2357593, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_sends\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\nwith sends as (\n\n select *\n from {{ ref('hubspot__email_event_sent') }}\n\n), metrics as (\n\n select *\n from {{ ref('int_hubspot__email_event_aggregates') }}\n\n), joined as (\n\n select\n sends.*,\n coalesce(metrics.bounces,0) as bounces,\n coalesce(metrics.clicks,0) as clicks,\n coalesce(metrics.deferrals,0) as deferrals,\n coalesce(metrics.deliveries,0) as deliveries,\n coalesce(metrics.drops,0) as drops,\n coalesce(metrics.forwards,0) as forwards,\n coalesce(metrics.opens,0) as opens,\n coalesce(metrics.prints,0) as prints,\n coalesce(metrics.spam_reports,0) as spam_reports\n from sends\n left join metrics\n on sends.email_send_id = metrics.email_send_id\n and sends.source_relation = metrics.source_relation\n\n), booleans as (\n\n select \n *,\n bounces > 0 as was_bounced,\n clicks > 0 as was_clicked,\n deferrals > 0 as was_deferred,\n deliveries > 0 as was_delivered,\n forwards > 0 as was_forwarded,\n opens > 0 as was_opened,\n prints > 0 as was_printed,\n spam_reports > 0 as was_spam_reported\n from joined\n\n{% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n\n), unsubscribes as (\n\n select *\n from {{ ref('int_hubspot__email_aggregate_status_change') }}\n\n), unsubscribes_joined as (\n\n select\n booleans.*,\n coalesce(unsubscribes.unsubscribes,0) as unsubscribes,\n coalesce(unsubscribes.unsubscribes,0) > 0 as was_unsubscribed\n from booleans\n left join unsubscribes\n on booleans.email_send_id = unsubscribes.email_send_id\n and booleans.email_campaign_id = unsubscribes.email_campaign_id\n and booleans.source_relation = unsubscribes.source_relation\n)\n\nselect *\nfrom unsubscribes_joined\n\n{% else %}\n\n)\n\nselect *\nfrom booleans\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}, {"name": "int_hubspot__email_event_aggregates", "package": null, "version": null}, {"name": "int_hubspot__email_aggregate_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.hubspot.hubspot__email_event_sent", "model.hubspot.int_hubspot__email_event_aggregates", "model.hubspot.int_hubspot__email_aggregate_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__email_sends.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n), __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n), sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n\n), metrics as (\n\n select *\n from __dbt__cte__int_hubspot__email_event_aggregates\n\n), joined as (\n\n select\n sends.*,\n coalesce(metrics.bounces,0) as bounces,\n coalesce(metrics.clicks,0) as clicks,\n coalesce(metrics.deferrals,0) as deferrals,\n coalesce(metrics.deliveries,0) as deliveries,\n coalesce(metrics.drops,0) as drops,\n coalesce(metrics.forwards,0) as forwards,\n coalesce(metrics.opens,0) as opens,\n coalesce(metrics.prints,0) as prints,\n coalesce(metrics.spam_reports,0) as spam_reports\n from sends\n left join metrics\n on sends.email_send_id = metrics.email_send_id\n and sends.source_relation = metrics.source_relation\n\n), booleans as (\n\n select \n *,\n bounces > 0 as was_bounced,\n clicks > 0 as was_clicked,\n deferrals > 0 as was_deferred,\n deliveries > 0 as was_delivered,\n forwards > 0 as was_forwarded,\n opens > 0 as was_opened,\n prints > 0 as was_printed,\n spam_reports > 0 as was_spam_reported\n from joined\n\n\n\n), unsubscribes as (\n\n select *\n from __dbt__cte__int_hubspot__email_aggregate_status_change\n\n), unsubscribes_joined as (\n\n select\n booleans.*,\n coalesce(unsubscribes.unsubscribes,0) as unsubscribes,\n coalesce(unsubscribes.unsubscribes,0) > 0 as was_unsubscribed\n from booleans\n left join unsubscribes\n on booleans.email_send_id = unsubscribes.email_send_id\n and booleans.email_campaign_id = unsubscribes.email_campaign_id\n and booleans.source_relation = unsubscribes.source_relation\n)\n\nselect *\nfrom unsubscribes_joined\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_event_aggregates", "sql": " __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n)"}, {"id": "model.hubspot.int_hubspot__email_aggregate_status_change", "sql": " __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_spam_report": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_spam_report", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_spam_report.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_spam_report.sql", "unique_id": "model.hubspot.hubspot__email_event_spam_report", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_spam_report"], "alias": "hubspot__email_event_spam_report", "checksum": {"name": "sha256", "checksum": "ed9f9df904e5b9765724e61b35b125df849727778439e995e1813fe804c050f6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SPAM_REPORT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_spam_report_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3923335, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_spam_report_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_spam_report')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_spam_report", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_spam_report", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_spam_report.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_status_change": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_status_change", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_status_change.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_status_change.sql", "unique_id": "model.hubspot.hubspot__email_event_status_change", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_status_change"], "alias": "hubspot__email_event_status_change", "checksum": {"name": "sha256", "checksum": "e6f9524a33a03f922d0c7d96b3cb65972193b3d30410766f29c8734b16dfca8e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a STATUS_CHANGE email event in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "change_source": {"name": "change_source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_bounced": {"name": "is_bounced", "description": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requested_by_email": {"name": "requested_by_email", "description": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscription_status": {"name": "subscription_status", "description": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscriptions": {"name": "subscriptions", "description": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3951843, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_status_change')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_status_change", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_status_change", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_status_change.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_dropped": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_dropped", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_dropped.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_dropped.sql", "unique_id": "model.hubspot.hubspot__email_event_dropped", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_dropped"], "alias": "hubspot__email_event_dropped", "checksum": {"name": "sha256", "checksum": "54b0ea5271ce12103953d40e664fe89ec7909fdf3f93d03490a08fe9389522b9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DROPPED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_message": {"name": "drop_message", "description": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_reason": {"name": "drop_reason", "description": "The reason why the email message was dropped. See below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_dropped_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.385657, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_dropped\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_dropped_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_dropped')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_dropped", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_dropped", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_dropped.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_bounce": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_bounce", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_bounce.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_bounce.sql", "unique_id": "model.hubspot.hubspot__email_event_bounce", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_bounce"], "alias": "hubspot__email_event_bounce", "checksum": {"name": "sha256", "checksum": "379f6aa9260e79372b4119fe1d663dc62f96edf9468e9fa3652a09fdb23b3935"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a BOUNCE email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bounce_category": {"name": "bounce_category", "description": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_status": {"name": "returned_status", "description": "The status code returned from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_bounce_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.377185, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_bounce_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_bounce')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_bounce", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_bounce", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_bounce.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_delivered": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_delivered", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_delivered.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_delivered.sql", "unique_id": "model.hubspot.hubspot__email_event_delivered", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_delivered"], "alias": "hubspot__email_event_delivered", "checksum": {"name": "sha256", "checksum": "2d255db81c88e481ee262e006d0575cafff7a23c0aa6c386bf38f9665590cda8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DELIVERED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "smtp_id": {"name": "smtp_id", "description": "An ID attached to the message by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_delivered_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3837104, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_delivered_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_delivered')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_delivered", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_delivered", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_delivered.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_forward": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_forward", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_forward.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_forward.sql", "unique_id": "model.hubspot.hubspot__email_event_forward", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_forward"], "alias": "hubspot__email_event_forward", "checksum": {"name": "sha256", "checksum": "ed715e49b28f3d3826c1a9c56d620ee3707e12c0d4de34b621d1a7f1cfe79d80"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a FORWARD email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_forward_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3869874, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_forward\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_forward')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_forward", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_forward", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_forward.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_deferred": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_deferred", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_deferred.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_deferred.sql", "unique_id": "model.hubspot.hubspot__email_event_deferred", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_deferred"], "alias": "hubspot__email_event_deferred", "checksum": {"name": "sha256", "checksum": "9ade4f4642694e1d3afc657399a0f7baa653a1cd75a5e3dd03bd428eecbeffc4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DEFERRED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "attempt_number": {"name": "attempt_number", "description": "The delivery attempt number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_deferred_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3821476, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_deferred\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_deferred_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_deferred')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_deferred", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_deferred", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_deferred.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_clicks": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_clicks", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_clicks.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_clicks.sql", "unique_id": "model.hubspot.hubspot__email_event_clicks", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_clicks"], "alias": "hubspot__email_event_clicks", "checksum": {"name": "sha256", "checksum": "410922a14cfb1e8ee60916dc12fa961bb31947d2bb9dcda77904668d2e97b925"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CLICK email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "click_url": {"name": "click_url", "description": "The URL within the message that the recipient clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "referer_url": {"name": "referer_url", "description": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_click_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3806868, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_click_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_click')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_click", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_click", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_clicks.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_sent": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_sent", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_sent.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_sent.sql", "unique_id": "model.hubspot.hubspot__email_event_sent", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_sent"], "alias": "hubspot__email_event_sent", "checksum": {"name": "sha256", "checksum": "6be0c3ce1439959c54062e6f66922b75c9fe657c2476903a6b6d7926fedac15b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SENT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3911598, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_sent')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_sent", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_sent", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_sent.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_print": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_print", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_print.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_print.sql", "unique_id": "model.hubspot.hubspot__email_event_print", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_print"], "alias": "hubspot__email_event_print", "checksum": {"name": "sha256", "checksum": "f4af999f850b49da33bd79632a320ed536bb18dae5cd32a765e9e6d4ff62e985"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a PRINT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_print_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3898761, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_print\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_print_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_print')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_print", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_print", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_print.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_opens": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_opens", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_opens.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_opens.sql", "unique_id": "model.hubspot.hubspot__email_event_opens", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_opens"], "alias": "hubspot__email_event_opens", "checksum": {"name": "sha256", "checksum": "afe383df931e84d276863635a88d620d5570b9042e15fec6df035f0e8b873b7a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a OPEN email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "duration_open": {"name": "duration_open", "description": "If provided and nonzero, the approximate number of milliseconds the user had opened the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_open_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.3885672, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_open_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_open')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_open", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_open", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_opens.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__contact_merge_adjust": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__contact_merge_adjust", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__contact_merge_adjust.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__contact_merge_adjust.sql", "unique_id": "model.hubspot.int_hubspot__contact_merge_adjust", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__contact_merge_adjust"], "alias": "int_hubspot__contact_merge_adjust", "checksum": {"name": "sha256", "checksum": "01e622a5c31229019de0b5d88778c877dd9bff7ca97055de95d2b9660d63fbd9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034517.940483, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n\nwith contacts as (\n\n select *\n from {{ ref('stg_hubspot__contact') }}\n), contact_merge_audit as (\n{% if var('hubspot_contact_merge_audit_enabled', false) %}\n select *\n from {{ ref('stg_hubspot__contact_merge_audit') }}\n\n{% else %}\n {{ merge_contacts() }}\n\n{% endif %}\n), contact_merge_removal as (\n select \n contacts.*\n from contacts\n \n left join contact_merge_audit\n on cast(contacts.contact_id as {{ dbt.type_string() }}) = cast(contact_merge_audit.vid_to_merge as {{ dbt.type_string() }})\n and contacts.source_relation = contact_merge_audit.source_relation\n \n where contact_merge_audit.vid_to_merge is null\n)\n\nselect *\nfrom contact_merge_removal", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact", "package": null, "version": null}, {"name": "stg_hubspot__contact_merge_audit", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__contact_merge_audit"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__contact_merge_adjust.sql", "compiled": true, "compiled_code": "\n\nwith contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n), contact_merge_audit as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit\"\n\n\n), contact_merge_removal as (\n select \n contacts.*\n from contacts\n \n left join contact_merge_audit\n on cast(contacts.contact_id as TEXT) = cast(contact_merge_audit.vid_to_merge as TEXT)\n and contacts.source_relation = contact_merge_audit.source_relation\n \n where contact_merge_audit.vid_to_merge is null\n)\n\nselect *\nfrom contact_merge_removal", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__form_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__form_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__form_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__form_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__form_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__form_metrics__by_contact"], "alias": "int_hubspot__form_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "75c8ccf40f316f290bac09fe81c9a841d034f743ddf51715f9e4161cde2f1e16"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034517.950205, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled' ])) }}\n\nwith form as (\n\n select *\n from {{ ref('stg_hubspot__form') }}\n\n), contact_form_submission as (\n\n select *\n from {{ ref('stg_hubspot__contact_form_submission') }}\n\n{% if var('hubspot_submission_response_enabled', true) %}\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n {{ fivetran_utils.string_agg(\"distinct field_name\", \"', '\") }} as fields_responded_to,\n count(*) as total_responses\n from {{ ref('stg_hubspot__submission_response') }}\n group by 1, 2\n\n{% endif %}\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n {% if var('hubspot_submission_response_enabled', true) %}\n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n {% endif %}\n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n {% if var('hubspot_submission_response_enabled', true) %}\n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n {% endif %}\n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n {% if var('hubspot_submission_response_enabled', true) %}\n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n {% endif %}\n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__form", "package": null, "version": null}, {"name": "stg_hubspot__contact_form_submission", "package": null, "version": null}, {"name": "stg_hubspot__submission_response", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.string_agg", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.stg_hubspot__form", "model.hubspot.stg_hubspot__contact_form_submission", "model.hubspot.stg_hubspot__submission_response"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__form_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\nwith form as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\n\n), contact_form_submission as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"\n\n\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n \n string_agg(distinct field_name, ', ')\n\n as fields_responded_to,\n count(*) as total_responses\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\n group by 1, 2\n\n\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n \n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n \n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n \n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n \n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n \n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n \n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__email_aggregate_status_change": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__email_aggregate_status_change", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__email_aggregate_status_change.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__email_aggregate_status_change.sql", "unique_id": "model.hubspot.int_hubspot__email_aggregate_status_change", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__email_aggregate_status_change"], "alias": "int_hubspot__email_aggregate_status_change", "checksum": {"name": "sha256", "checksum": "aefb8f80368646b312022198b4160b7b814e7b49df513250d8be6e32e09c359c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"unique_key": {"name": "unique_key", "description": "Hashed on `source_relation`, `email_send_id`, and `email_campaign_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.4282372, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('hubspot__email_event_status_change') }}\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','email_campaign_id', 'email_send_id']) }} as unique_key\nfrom aggregates", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__email_aggregate_status_change.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["unique_key"], "time_spine": null}, "model.hubspot.int_hubspot__email_metrics__by_contact_list": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__email_metrics__by_contact_list", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__email_metrics__by_contact_list.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__email_metrics__by_contact_list.sql", "unique_id": "model.hubspot.int_hubspot__email_metrics__by_contact_list", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__email_metrics__by_contact_list"], "alias": "int_hubspot__email_metrics__by_contact_list", "checksum": {"name": "sha256", "checksum": "8a1fb101632b1cdc1db53e79faef12ada70b91b82dc94d065ee372d7840067d2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"contact_list_id": {"name": "contact_list_id", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_contact_list_member_enabled', 'hubspot_contact_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.4288752, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__email_metrics__by_contact_list\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_list_member_enabled','hubspot_contact_enabled','hubspot_email_event_sent_enabled']), materialized='table') }}\n\nwith email_sends as (\n\n select *\n from {{ ref('hubspot__email_sends') }}\n\n), contact_list_member as (\n\n select *\n from {{ ref('stg_hubspot__contact_list_member') }}\n\n), joined as (\n\n select\n email_sends.*,\n contact_list_member.contact_list_id\n from email_sends\n left join contact_list_member\n on email_sends.contact_id = contact_list_member.contact_id\n and email_sends.source_relation = contact_list_member.source_relation\n where contact_list_member.contact_list_id is not null\n\n), email_metrics as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select\n contact_list_id,\n source_relation,\n {% for metric in email_metrics %}\n sum({{ metric }}) as total_{{ metric }},\n count(distinct case when {{ metric }} > 0 then email_send_id end) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from joined\n group by 1, 2\n\n)\n\nselect *\nfrom email_metrics", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "stg_hubspot__contact_list_member", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics"], "nodes": ["model.hubspot.hubspot__email_sends", "model.hubspot.stg_hubspot__contact_list_member"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__email_metrics__by_contact_list.sql", "compiled": true, "compiled_code": "\n\nwith email_sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\n\n), contact_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member\"\n\n), joined as (\n\n select\n email_sends.*,\n contact_list_member.contact_list_id\n from email_sends\n left join contact_list_member\n on email_sends.contact_id = contact_list_member.contact_id\n and email_sends.source_relation = contact_list_member.source_relation\n where contact_list_member.contact_list_id is not null\n\n), email_metrics as (\n \n select\n contact_list_id,\n source_relation,\n \n sum(bounces) as total_bounces,\n count(distinct case when bounces > 0 then email_send_id end) as total_unique_bounces\n ,\n \n sum(clicks) as total_clicks,\n count(distinct case when clicks > 0 then email_send_id end) as total_unique_clicks\n ,\n \n sum(deferrals) as total_deferrals,\n count(distinct case when deferrals > 0 then email_send_id end) as total_unique_deferrals\n ,\n \n sum(deliveries) as total_deliveries,\n count(distinct case when deliveries > 0 then email_send_id end) as total_unique_deliveries\n ,\n \n sum(drops) as total_drops,\n count(distinct case when drops > 0 then email_send_id end) as total_unique_drops\n ,\n \n sum(forwards) as total_forwards,\n count(distinct case when forwards > 0 then email_send_id end) as total_unique_forwards\n ,\n \n sum(opens) as total_opens,\n count(distinct case when opens > 0 then email_send_id end) as total_unique_opens\n ,\n \n sum(prints) as total_prints,\n count(distinct case when prints > 0 then email_send_id end) as total_unique_prints\n ,\n \n sum(spam_reports) as total_spam_reports,\n count(distinct case when spam_reports > 0 then email_send_id end) as total_unique_spam_reports\n ,\n \n sum(unsubscribes) as total_unsubscribes,\n count(distinct case when unsubscribes > 0 then email_send_id end) as total_unique_unsubscribes\n \n \n from joined\n group by 1, 2\n\n)\n\nselect *\nfrom email_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__contact_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__contact_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__contact_calendar_spine.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__contact_calendar_spine", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__contact_calendar_spine"], "alias": "int_hubspot__contact_calendar_spine", "checksum": {"name": "sha256", "checksum": "3c52122e9ab62d75f0d0522ab431deb489b699920d117db69e958d9ed2c93e72"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034517.9963143, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__contact_calendar_spine\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__contact') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(created_date as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__contact') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), contact as (\n\n select\n *\n from {{ ref('stg_hubspot__contact') }}\n where not coalesce(is_contact_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n contact.contact_id,\n contact.source_relation\n from calendar\n inner join contact\n on cast(calendar.date_day as date) >= cast(contact.created_date as date)\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','contact_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3871\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), contact as (\n\n select\n *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n where not coalesce(is_contact_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n contact.contact_id,\n contact.source_relation\n from calendar\n inner join contact\n on cast(calendar.date_day as date) >= cast(contact.created_date as date)\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_email_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_email_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__daily_email_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__daily_email_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__daily_email_metrics__by_contact"], "alias": "int_hubspot__daily_email_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "3fbe4e3b8d7ddfe9a206f0ad63a72293f1798e88cf7704be7a2274d1525db516"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.0541635, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled']))\n}}\n\n{# Build a list of (model_ref, event_type) pairs so we can union only what's enabled #}\n{% set email_event_models = [] %}\n{% do email_event_models.append(('hubspot__email_event_sent', 'SENT')) if fivetran_utils.enabled_vars(['hubspot_email_event_sent_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_delivered', 'DELIVERED')) if fivetran_utils.enabled_vars(['hubspot_email_event_delivered_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_opens', 'OPEN')) if fivetran_utils.enabled_vars(['hubspot_email_event_open_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_clicks', 'CLICK')) if fivetran_utils.enabled_vars(['hubspot_email_event_click_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_bounce', 'BOUNCE')) if fivetran_utils.enabled_vars(['hubspot_email_event_bounce_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_spam_report', 'SPAM_REPORT')) if fivetran_utils.enabled_vars(['hubspot_email_event_spam_report_enabled']) %}\n\nwith all_events as (\n\n {% if email_event_models | length > 0 %}\n {% for model, event_type in email_event_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n contact_id,\n created_timestamp,\n '{{ event_type }}' as event_type,\n cast(null as {{ dbt.type_string() }}) as subscription_status\n from {{ ref(model) }}\n where contact_id is not null\n and created_timestamp is not null\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as contact_id,\n cast(null as {{ dbt.type_timestamp() }}) as created_timestamp,\n cast(null as {{ dbt.type_string() }}) as event_type,\n cast(null as {{ dbt.type_string() }}) as subscription_status\n where false\n\n {% endif %}\n\n {% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from {{ ref('hubspot__email_event_status_change') }}\n where contact_id is not null\n and created_timestamp is not null\n {% endif %}\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast({{ dbt.date_trunc('day', 'created_timestamp') }} as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n {% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n {% endif %}\n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}, {"name": "hubspot__email_event_delivered", "package": null, "version": null}, {"name": "hubspot__email_event_opens", "package": null, "version": null}, {"name": "hubspot__email_event_clicks", "package": null, "version": null}, {"name": "hubspot__email_event_bounce", "package": null, "version": null}, {"name": "hubspot__email_event_spam_report", "package": null, "version": null}, {"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.type_string", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__daily_email_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith all_events as (\n\n \n \n \n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SENT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'DELIVERED' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'OPEN' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'CLICK' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'BOUNCE' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SPAM_REPORT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n \n\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast(date_trunc('day', created_timestamp) as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n \n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n \n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_engagement_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__daily_engagement_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__daily_engagement_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__daily_engagement_metrics__by_contact"], "alias": "int_hubspot__daily_engagement_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "828ff2c9001b31e79fa4e5a00e972e737e0f5eb0f24b9410ba29f8a714b6f3d0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.0802727, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled']))\n}}\n\n{# Build a list of (model_ref, enabled_var) pairs so we can union only what's enabled #}\n{% set engagement_staging_models = [] %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_call') if fivetran_utils.enabled_vars(['hubspot_engagement_call_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_email') if fivetran_utils.enabled_vars(['hubspot_engagement_email_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_meeting') if fivetran_utils.enabled_vars(['hubspot_engagement_meeting_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_note') if fivetran_utils.enabled_vars(['hubspot_engagement_note_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_task') if fivetran_utils.enabled_vars(['hubspot_engagement_task_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_communication') if var('hubspot_engagement_communication_enabled', false) %}\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from {{ ref('stg_hubspot__engagement_contact') }}\n\n), all_engagements as (\n\n {% if engagement_staging_models | length > 0 %}\n {% for model in engagement_staging_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from {{ ref(model) }}\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as engagement_id,\n cast(null as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n cast(null as {{ dbt.type_string() }}) as engagement_type\n where false\n\n {% endif %}\n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast({{ dbt.date_trunc('day', 'all_engagements.occurred_timestamp') }} as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_contact", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task", "model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__daily_engagement_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__scd_daily_contact_history.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__scd_daily_contact_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_contact_history", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__scd_daily_contact_history"], "alias": "int_hubspot__scd_daily_contact_history", "checksum": {"name": "sha256", "checksum": "4d4bdee049257ec8d0eab360a0810ee7ee1a38860413ac0608c3605b9c549c77"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.0978794, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_contact_history\"", "raw_code": "{{ config(materialized='table', enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])) }}\n\n{%- set contact_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_contact_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_contact_history') }}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n {% for col in contact_columns if col.name|lower not in ['source_relation','date_day','contact_id','id'] %}\n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes contact property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n {% for col in contact_columns if col.name|lower not in ['source_relation','date_day','contact_id','id'] %}\n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by contact_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_contact_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__scd_daily_contact_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_contact_history\"\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n \n , lifecyclestage as lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum( case when lifecyclestage is null then 0 else 1 end) over (partition by contact_id \n order by date_day rows unbounded preceding) as lifecyclestage_field_partition\n\n \n , hs_predictivecontactscore_v2 as hs_predictivecontactscore_v2\n -- create a batch/partition once a new value is provided\n , sum( case when hs_predictivecontactscore_v2 is null then 0 else 1 end) over (partition by contact_id \n order by date_day rows unbounded preceding) as hs_predictivecontactscore_v2_field_partition\n\n \n , hubspot_owner_id as hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum( case when hubspot_owner_id is null then 0 else 1 end) over (partition by contact_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_field_partition\n\n \n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes contact property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by contact_id, lifecyclestage_field_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hs_predictivecontactscore_v2 ) over (\n partition by contact_id, hs_predictivecontactscore_v2_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_predictivecontactscore_v2\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by contact_id, hubspot_owner_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__engagement_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__engagement_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__engagement_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__engagement_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__engagement_metrics__by_contact"], "alias": "int_hubspot__engagement_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "6fceaf23b2e6806d4ada79099922541bf77103e5c651593a7a88d6820049de83"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"contact_id": {"name": "contact_id", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.4300864, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_contact_enabled'])) }}\n\nwith engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_contacts as (\n\n select *\n from {{ ref('stg_hubspot__engagement_contact') }}\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n {{ engagements_aggregated('engagement_contacts_joined', 'contact_id') }}\n\n)\n\nselect *\nfrom engagement_contacts_agg", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_aggregated"], "nodes": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__engagement_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_contact_history", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__pivot_daily_contact_history"], "alias": "int_hubspot__pivot_daily_contact_history", "checksum": {"name": "sha256", "checksum": "0b4ec5d198c7a969746115fcb611f7bbffff5ab13c2a9bb1856f2942257225af"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.1202404, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_contact_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set contact_columns = (['lifecyclestage', 'hs_predictivecontactscore_v2', 'hubspot_owner_id'] + var('hubspot__contact_property_history_columns', [])) | unique | list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_contact_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n {% for col in contact_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'contact_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_contact_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n , max(case when lower(field_name) = 'lifecyclestage' then new_value end) as lifecyclestage\n , max(case when lower(field_name) = 'hs_predictivecontactscore_v2' then new_value end) as hs_predictivecontactscore_v2\n , max(case when lower(field_name) = 'hubspot_owner_id' then new_value end) as hubspot_owner_id\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__email_event_aggregates": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__email_event_aggregates", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__email_event_aggregates.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__email_event_aggregates.sql", "unique_id": "model.hubspot.int_hubspot__email_event_aggregates", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__email_event_aggregates"], "alias": "int_hubspot__email_event_aggregates", "checksum": {"name": "sha256", "checksum": "4901e0b126c75c1c943bf77cd45f27a5164061c417dd0464f82ab5efbc2132e6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"email_send_id": {"name": "email_send_id", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.429472, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\nwith events as (\n\n select *\n from {{ ref('stg_hubspot__email_event') }}\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.hubspot.stg_hubspot__email_event"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__email_event_aggregates.sql", "compiled": true, "compiled_code": "\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__daily_contact_history.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__daily_contact_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_contact_history", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__daily_contact_history"], "alias": "int_hubspot__daily_contact_history", "checksum": {"name": "sha256", "checksum": "4d77777dac0ecd00d5a16c6ef1b5e0776e0d720235a379ec90a660143022a354"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.1520267, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_contact_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\n{% set contact_columns = (['lifecyclestage', 'hs_predictivecontactscore_v2', 'hubspot_owner_id'] + var('hubspot__contact_property_history_columns', [])) | unique | list %}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__contact_property_history') }}\n\n where lower(field_name) in ({{ \"'\" ~ contact_columns | join(\"', '\") ~ \"'\" }})\n\n {% if is_incremental() %}\n and cast(change_timestamp as date) >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(change_timestamp as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), windows as (\n\n select\n source_relation,\n cast({{ dbt.date_trunc('day', 'change_timestamp') }} as date) as date_day,\n contact_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, contact_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n contact_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','contact_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.stg_hubspot__contact_property_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__daily_contact_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history\"\n\n where lower(field_name) in ('lifecyclestage', 'hs_predictivecontactscore_v2', 'hubspot_owner_id')\n\n \n and cast(change_timestamp as date) >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), windows as (\n\n select\n source_relation,\n cast(date_trunc('day', change_timestamp) as date) as date_day,\n contact_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, contact_id, field_name \n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n contact_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/history/hubspot__contact_history.sql", "original_file_path": "models/marketing/history/hubspot__contact_history.sql", "unique_id": "model.hubspot.hubspot__contact_history", "fqn": ["hubspot", "marketing", "history", "hubspot__contact_history"], "alias": "hubspot__contact_history", "checksum": {"name": "sha256", "checksum": "f77fe3df994ba2858361cc89c4ca907015fc02ec467395f0b74215862173354d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to contact record in Hubspot; the grain of this model is contact_id -> field_name -> valid_to.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "valid_from": {"name": "valid_from", "description": "The timestamp the change was valid from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "valid_to": {"name": "valid_to", "description": "The timestamp the change was valid to. Null if still valid.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "id": {"name": "id", "description": "The ID of the change. Hashed on `source_relation`, `contact_id`, `field_name`, and `valid_from`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.454336, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__contact_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled','hubspot_contact_property_history_enabled'])) }}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__contact_property_history') }}\n\n), windows as (\n\n select\n source_relation,\n contact_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by contact_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n {{ dbt_utils.generate_surrogate_key(['field_name','contact_id','valid_from','source_relation']) }} as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__contact_property_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/hubspot__contact_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history\"\n\n), windows as (\n\n select\n source_relation,\n contact_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by contact_id, field_name order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_from as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["id"], "time_spine": null}, "model.hubspot.hubspot__daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/history/hubspot__daily_contact_history.sql", "original_file_path": "models/marketing/history/hubspot__daily_contact_history.sql", "unique_id": "model.hubspot.hubspot__daily_contact_history", "fqn": ["hubspot", "marketing", "history", "hubspot__daily_contact_history"], "alias": "hubspot__daily_contact_history", "checksum": {"name": "sha256", "checksum": "1cc04b7f1ae5d95c9ee58357da28d6c122dc2d07f5a1a556593d50ae6be1cc00"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "contact_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a contact's day in Hubspot with tracked properties pivoted into columns. By default, tracks the contact's lifecycle stage, likelihood-to-close score, and owner on each day and includes engagement and email event metrics.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "contact_day_id": {"name": "contact_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `contact_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the contact had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "Unique id of a contact in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lifecyclestage": {"name": "lifecyclestage", "description": "The lifecycle stage of the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_predictivecontactscore_v2": {"name": "hs_predictivecontactscore_v2", "description": "HubSpot's predicted likelihood (0\u2013100) that the contact will close as a customer on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_owner_id": {"name": "hubspot_owner_id", "description": "The ID of the contact owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the contact owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the contact owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "Number of note engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "Number of task engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "Number of call engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "Number of meeting engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "Number of outbound email engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "Number of inbound email engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "Number of forwarded email engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_communications": {"name": "count_engagement_communications", "description": "Number of communication engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_emails_sent": {"name": "count_emails_sent", "description": "Number of emails sent to the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_deliveries": {"name": "count_email_deliveries", "description": "Number of emails delivered to the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_opens": {"name": "count_email_opens", "description": "Number of email opens by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_clicks": {"name": "count_email_clicks", "description": "Number of email link clicks by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_bounces": {"name": "count_email_bounces", "description": "Number of email bounces for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_spam_reports": {"name": "count_email_spam_reports", "description": "Number of spam reports by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_unsubscribes": {"name": "count_email_unsubscribes", "description": "Number of email unsubscribes by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "contact_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.4513612, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='contact_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_contact_history')) -%}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled','hubspot_engagement_contact_enabled']) %}\n{% set email_events_enabled = fivetran_utils.enabled_vars(['hubspot_email_event_enabled']) %}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_contact_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no contact fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__contact_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owner as (\n\n select *\n from {{ ref('stg_hubspot__owner') }}\n\n{% endif %}\n\n{% if engagements_enabled %}\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_engagement_metrics__by_contact') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n{% if email_events_enabled %}\n), email_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_email_metrics__by_contact') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.contact_id\n {% if is_incremental() %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n\n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.contact_id = change_data.contact_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n {% if is_incremental() %}\n left join most_recent_data\n on calendar.contact_id = most_recent_data.contact_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by contact_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.contact_id\n\n {% if var('hubspot_owner_enabled', true) %}\n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n {% endif %}\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.{{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else fill_values.{{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n {% if engagements_enabled %}\n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n {% if var('hubspot_engagement_communication_enabled', false) %}\n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n {% endif %}\n {% endif %}\n\n {% if email_events_enabled %}\n , coalesce(email_metrics.count_emails_sent, 0) as count_emails_sent\n , coalesce(email_metrics.count_email_deliveries, 0) as count_email_deliveries\n , coalesce(email_metrics.count_email_opens, 0) as count_email_opens\n , coalesce(email_metrics.count_email_clicks, 0) as count_email_clicks\n , coalesce(email_metrics.count_email_bounces, 0) as count_email_bounces\n , coalesce(email_metrics.count_email_spam_reports, 0) as count_email_spam_reports\n {% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n , coalesce(email_metrics.count_email_unsubscribes, 0) as count_email_unsubscribes\n {% endif %}\n {% endif %}\n\n from fill_values\n\n {% if var('hubspot_owner_enabled', true) %}\n left join owner\n on cast(fill_values.hubspot_owner_id as {{ dbt.type_string() }}) = cast(owner.owner_id as {{ dbt.type_string() }})\n and fill_values.source_relation = owner.source_relation\n {% endif %}\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on fill_values.contact_id = engagement_metrics.contact_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n {% if email_events_enabled %}\n left join email_metrics\n on fill_values.contact_id = email_metrics.contact_id\n and fill_values.date_day = email_metrics.date_day\n and fill_values.source_relation = email_metrics.source_relation\n {% endif %}\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','contact_id','source_relation']) }} as contact_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_contact_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_contact_history", "package": null, "version": null}, {"name": "int_hubspot__contact_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "int_hubspot__daily_engagement_metrics__by_contact", "package": null, "version": null}, {"name": "int_hubspot__daily_email_metrics__by_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.type_string", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__scd_daily_contact_history", "model.hubspot.int_hubspot__contact_calendar_spine", "model.hubspot.stg_hubspot__owner", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_email_metrics__by_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/hubspot__daily_contact_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith __dbt__cte__int_hubspot__daily_engagement_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), __dbt__cte__int_hubspot__daily_email_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith all_events as (\n\n \n \n \n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SENT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'DELIVERED' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'OPEN' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'CLICK' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'BOUNCE' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SPAM_REPORT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n \n\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast(date_trunc('day', created_timestamp) as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n \n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n \n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_contact_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no contact fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n), owner as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_engagement_metrics__by_contact\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n\n), email_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_email_metrics__by_contact\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.contact_id\n \n \n , coalesce(change_data.lifecyclestage, most_recent_data.lifecyclestage) as lifecyclestage\n \n , coalesce(change_data.hs_predictivecontactscore_v2, most_recent_data.hs_predictivecontactscore_v2) as hs_predictivecontactscore_v2\n \n , coalesce(change_data.hubspot_owner_id, most_recent_data.hubspot_owner_id) as hubspot_owner_id\n \n\n \n\n from calendar\n left join change_data\n on calendar.contact_id = change_data.contact_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n \n left join most_recent_data\n on calendar.contact_id = most_recent_data.contact_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n \n , lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum(case when joined.lifecyclestage is null then 0 else 1 end) over (\n partition by contact_id \n order by date_day rows unbounded preceding) as lifecyclestage_partition\n \n , hs_predictivecontactscore_v2\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hs_predictivecontactscore_v2 is null then 0 else 1 end) over (\n partition by contact_id \n order by date_day rows unbounded preceding) as hs_predictivecontactscore_v2_partition\n \n , hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hubspot_owner_id is null then 0 else 1 end) over (\n partition by contact_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_partition\n \n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n \n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by contact_id, lifecyclestage_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n \n -- grab the value that started this batch/partition\n , first_value( hs_predictivecontactscore_v2 ) over (\n partition by contact_id, hs_predictivecontactscore_v2_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_predictivecontactscore_v2\n \n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by contact_id, hubspot_owner_id_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n \n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.contact_id\n\n \n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n \n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.lifecyclestage as TEXT ) = 'is_null' then null else fill_values.lifecyclestage end as lifecyclestage\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hs_predictivecontactscore_v2 as TEXT ) = 'is_null' then null else fill_values.hs_predictivecontactscore_v2 end as hs_predictivecontactscore_v2\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hubspot_owner_id as TEXT ) = 'is_null' then null else fill_values.hubspot_owner_id end as hubspot_owner_id\n \n\n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n \n \n\n \n , coalesce(email_metrics.count_emails_sent, 0) as count_emails_sent\n , coalesce(email_metrics.count_email_deliveries, 0) as count_email_deliveries\n , coalesce(email_metrics.count_email_opens, 0) as count_email_opens\n , coalesce(email_metrics.count_email_clicks, 0) as count_email_clicks\n , coalesce(email_metrics.count_email_bounces, 0) as count_email_bounces\n , coalesce(email_metrics.count_email_spam_reports, 0) as count_email_spam_reports\n \n , coalesce(email_metrics.count_email_unsubscribes, 0) as count_email_unsubscribes\n \n \n\n from fill_values\n\n \n left join owner\n on cast(fill_values.hubspot_owner_id as TEXT) = cast(owner.owner_id as TEXT)\n and fill_values.source_relation = owner.source_relation\n \n\n \n left join engagement_metrics\n on fill_values.contact_id = engagement_metrics.contact_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n \n\n \n left join email_metrics\n on fill_values.contact_id = email_metrics.contact_id\n and fill_values.date_day = email_metrics.date_day\n and fill_values.source_relation = email_metrics.source_relation\n \n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as contact_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__daily_engagement_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}, {"id": "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__daily_email_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith all_events as (\n\n \n \n \n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SENT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'DELIVERED' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'OPEN' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'CLICK' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'BOUNCE' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SPAM_REPORT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n \n\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast(date_trunc('day', created_timestamp) as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n \n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n \n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["contact_day_id"], "time_spine": null}, "model.hubspot.int_hubspot__owners_enhanced": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__owners_enhanced", "resource_type": "model", "package_name": "hubspot", "path": "intermediate/int_hubspot__owners_enhanced.sql", "original_file_path": "models/intermediate/int_hubspot__owners_enhanced.sql", "unique_id": "model.hubspot.int_hubspot__owners_enhanced", "fqn": ["hubspot", "intermediate", "int_hubspot__owners_enhanced"], "alias": "int_hubspot__owners_enhanced", "checksum": {"name": "sha256", "checksum": "0599d2909335e86da0c07d1975c02894ffee0f44fce4d8bee4a9bf666261e84b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_owner_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.221515, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"", "raw_code": "{{ config(enabled=var('hubspot_owner_enabled', true)) }}\n\nwith owners as (\n select\n source_relation,\n owner_id,\n active_user_id as owner_active_user_id,\n email_address as owner_email_address,\n full_name as owner_full_name\n from {{ ref('stg_hubspot__owner') }}\n{% set cte_ref = 'owners' %}\n\n{% if var('hubspot_team_enabled', true) %}\n), owner_teams as (\n select *\n from {{ ref('stg_hubspot__owner_team') }}\n\n), teams as (\n select *\n from {{ ref('stg_hubspot__team') }}\n\n), teams_agg as (\n select\n owner_teams.source_relation,\n owner_teams.owner_id,\n max(case when owner_teams.is_team_primary then owner_teams.team_id end) as owner_primary_team_id,\n max(case when owner_teams.is_team_primary then teams.team_name end) as owner_primary_team_name,\n {{ dbt.listagg(measure=\"cast(teams.team_id as \" ~ dbt.type_string() ~ \")\", delimiter_text=\"','\", order_by_clause=\"order by teams.team_id\") }} as owner_all_team_ids,\n {{ dbt.listagg(measure=\"teams.team_name\", delimiter_text=\"','\", order_by_clause=\"order by teams.team_id\") }} as owner_all_team_names\n from owner_teams\n left join teams\n on owner_teams.team_id = teams.team_id\n and owner_teams.source_relation = teams.source_relation\n group by 1, 2\n\n), teams_joined as (\n select\n owners.*,\n teams_agg.owner_primary_team_id,\n teams_agg.owner_primary_team_name,\n teams_agg.owner_all_team_ids,\n teams_agg.owner_all_team_names\n from owners\n left join teams_agg\n on owners.owner_id = teams_agg.owner_id\n and owners.source_relation = teams_agg.source_relation\n{% set cte_ref = 'teams_joined' %}\n{% endif %}\n\n{% if var('hubspot_role_enabled', true) %}\n), users as (\n select *\n from {{ ref('stg_hubspot__users') }}\n\n), roles as (\n select *\n from {{ ref('stg_hubspot__role') }}\n\n), roles_joined as (\n select\n {{ cte_ref }}.*,\n users.role_id as owner_role_id,\n roles.role_name as owner_role_name\n from {{ cte_ref }}\n left join users\n on {{ cte_ref }}.owner_active_user_id = users.user_id\n and {{ cte_ref }}.source_relation = users.source_relation\n left join roles\n on users.role_id = roles.role_id\n and users.source_relation = roles.source_relation\n\n{% set cte_ref = 'roles_joined' %}\n{% endif %}\n) \n\nselect *\nfrom {{ cte_ref }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "stg_hubspot__owner_team", "package": null, "version": null}, {"name": "stg_hubspot__team", "package": null, "version": null}, {"name": "stg_hubspot__users", "package": null, "version": null}, {"name": "stg_hubspot__role", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.listagg"], "nodes": ["model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__owner_team", "model.hubspot.stg_hubspot__team", "model.hubspot.stg_hubspot__users", "model.hubspot.stg_hubspot__role"]}, "compiled_path": "target/compiled/hubspot/models/intermediate/int_hubspot__owners_enhanced.sql", "compiled": true, "compiled_code": "\n\nwith owners as (\n select\n source_relation,\n owner_id,\n active_user_id as owner_active_user_id,\n email_address as owner_email_address,\n full_name as owner_full_name\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n), owner_teams as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team\"\n\n), teams as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team\"\n\n), teams_agg as (\n select\n owner_teams.source_relation,\n owner_teams.owner_id,\n max(case when owner_teams.is_team_primary then owner_teams.team_id end) as owner_primary_team_id,\n max(case when owner_teams.is_team_primary then teams.team_name end) as owner_primary_team_name,\n \n string_agg(\n cast(teams.team_id as TEXT),\n ','\n order by teams.team_id\n ) as owner_all_team_ids,\n \n string_agg(\n teams.team_name,\n ','\n order by teams.team_id\n ) as owner_all_team_names\n from owner_teams\n left join teams\n on owner_teams.team_id = teams.team_id\n and owner_teams.source_relation = teams.source_relation\n group by 1, 2\n\n), teams_joined as (\n select\n owners.*,\n teams_agg.owner_primary_team_id,\n teams_agg.owner_primary_team_name,\n teams_agg.owner_all_team_ids,\n teams_agg.owner_all_team_names\n from owners\n left join teams_agg\n on owners.owner_id = teams_agg.owner_id\n and owners.source_relation = teams_agg.source_relation\n\n\n\n\n), users as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__users\"\n\n), roles as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__role\"\n\n), roles_joined as (\n select\n teams_joined.*,\n users.role_id as owner_role_id,\n roles.role_name as owner_role_name\n from teams_joined\n left join users\n on teams_joined.owner_active_user_id = users.user_id\n and teams_joined.source_relation = users.source_relation\n left join roles\n on users.role_id = roles.role_id\n and users.source_relation = roles.source_relation\n\n\n\n) \n\nselect *\nfrom roles_joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__conversations": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__conversations", "resource_type": "model", "package_name": "hubspot", "path": "service/hubspot__conversations.sql", "original_file_path": "models/service/hubspot__conversations.sql", "unique_id": "model.hubspot.hubspot__conversations", "fqn": ["hubspot", "service", "hubspot__conversations"], "alias": "hubspot__conversations", "checksum": {"name": "sha256", "checksum": "d5f175c09333af5e12989d2fe28bf7c8b5dc9dbd8b78d8924dea7c3551b060fb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a conversation thread in HubSpot. Enriches each thread with inbox, channel, channel account details, and aggregated message metrics derived from the message history. Optionally joins to ticket and contact data when the respective features are enabled.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "conversation_thread_id": {"name": "conversation_thread_id", "description": "Unique ID of the conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_contact_id": {"name": "associated_contact_id", "description": "ID of the contact associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_ticket_id": {"name": "associated_ticket_id", "description": "ID of the ticket associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_account_id": {"name": "original_channel_account_id", "description": "ID of the channel account through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_id": {"name": "original_channel_id", "description": "ID of the channel through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to_actor_id": {"name": "assigned_to_actor_id", "description": "ID of the actor the thread is currently assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_at": {"name": "closed_at", "description": "Timestamp when the thread was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_at": {"name": "latest_message_at", "description": "Timestamp of the most recent message (sent or received) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_received_at": {"name": "latest_message_received_at", "description": "Timestamp of the most recently received message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_sent_at": {"name": "latest_message_sent_at", "description": "Timestamp of the most recently sent message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_spam": {"name": "is_spam", "description": "Indicates whether the thread has been marked as spam.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the thread (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assignee_name": {"name": "assignee_name", "description": "Name of the actor currently assigned to this conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assignee_email": {"name": "assignee_email", "description": "Email address of the actor currently assigned to this conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_name": {"name": "inbox_name", "description": "Display name of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_type": {"name": "inbox_type", "description": "Type of the inbox (e.g., HELP_DESK, INBOX).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_inbox_active": {"name": "is_inbox_active", "description": "Boolean indicating whether the inbox is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_inbox_deleted": {"name": "is_inbox_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_name": {"name": "channel_name", "description": "Display name of the channel through which the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_channel_deleted": {"name": "is_channel_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_account_name": {"name": "channel_account_name", "description": "Display name of the channel account through which the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_delivery_identifier_type": {"name": "channel_account_delivery_identifier_type", "description": "The type of delivery identifier for the channel account (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_delivery_identifier_value": {"name": "channel_account_delivery_identifier_value", "description": "The value of the delivery identifier for the channel account (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_channel_account_deleted": {"name": "is_channel_account_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "ticket_subject": {"name": "ticket_subject", "description": "Short summary of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_content": {"name": "ticket_content", "description": "Text in the body of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_created_date": {"name": "ticket_created_date", "description": "Date the associated ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_closed_date": {"name": "ticket_closed_date", "description": "Date the associated ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_category": {"name": "ticket_category", "description": "Category of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_id": {"name": "ticket_owner_id", "description": "ID of the owner of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_deleted": {"name": "is_ticket_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "contact_email": {"name": "contact_email", "description": "Email address of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_first_name": {"name": "contact_first_name", "description": "First name of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_last_name": {"name": "contact_last_name", "description": "Last name of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_company": {"name": "contact_company", "description": "Company of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "first_response_time_seconds": {"name": "first_response_time_seconds", "description": "Time taken to respond to the first incoming message in the thread (in seconds). Negative values indicate that the conversation was initiated by an internal agent or bot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "resolution_time_seconds": {"name": "resolution_time_seconds", "description": "Time taken to resolve the thread (in seconds), starting at the first incoming message and ending at thread close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_message_at": {"name": "first_message_at", "description": "Timestamp of the first message (any direction) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_message_received_at": {"name": "first_message_received_at", "description": "Timestamp of the first incoming message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_message_sent_at": {"name": "first_message_sent_at", "description": "Timestamp of the first outgoing message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_message_count": {"name": "total_message_count", "description": "Total number of distinct messages in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "incoming_message_count": {"name": "incoming_message_count", "description": "Number of distinct incoming messages in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "outgoing_message_count": {"name": "outgoing_message_count", "description": "Number of distinct outgoing messages in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "agent_outgoing_message_count": {"name": "agent_outgoing_message_count", "description": "Number of distinct outgoing messages sent by an agent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "bot_outgoing_message_count": {"name": "bot_outgoing_message_count", "description": "Number of distinct outgoing messages sent by a bot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "system_outgoing_message_count": {"name": "system_outgoing_message_count", "description": "Number of distinct outgoing messages sent by a system actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "llm_outgoing_message_count": {"name": "llm_outgoing_message_count", "description": "Number of distinct outgoing messages sent by Hubspot's LLM-powered agent called Breeze.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "integration_outgoing_message_count": {"name": "integration_outgoing_message_count", "description": "Number of distinct outgoing messages sent by an integration actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "comment_count": {"name": "comment_count", "description": "Number of internal comments on the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assignment_count": {"name": "assignment_count", "description": "Number of assignment events on the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_status_change_count": {"name": "thread_status_change_count", "description": "Number of status change events on the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "unique_assignee_count": {"name": "unique_assignee_count", "description": "Number of distinct actors the thread has been assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "involved_agent_count": {"name": "involved_agent_count", "description": "Number of distinct agents who have created any conversation event (message, comment, etc) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "agent_author_count": {"name": "agent_author_count", "description": "Number of distinct agents who sent an outgoing message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "visitor_author_count": {"name": "visitor_author_count", "description": "Number of distinct visitors who sent an incoming message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "visitor_recipient_count": {"name": "visitor_recipient_count", "description": "Number of distinct visitors who received an outgoing message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "has_welcome_message": {"name": "has_welcome_message", "description": "Boolean indicating whether the thread includes a welcome message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_email_address": {"name": "ticket_owner_email_address", "description": "Email address of the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_full_name": {"name": "ticket_owner_full_name", "description": "Full name of the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_primary_team_id": {"name": "ticket_owner_primary_team_id", "description": "ID of the primary team assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_primary_team_name": {"name": "ticket_owner_primary_team_name", "description": "Name of the primary team assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_role_id": {"name": "ticket_owner_role_id", "description": "ID of the role assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_role_name": {"name": "ticket_owner_role_name", "description": "Name of the role assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_active_user_id": {"name": "ticket_owner_active_user_id", "description": "Unique ID of the active HubSpot user who owns the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/service/service.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5038333, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__conversations\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith conversation_thread as (\n select *\n from {{ ref('stg_hubspot__conversation_thread') }}\n),\n\nconversation_message_history as (\n select *\n from {{ ref('stg_hubspot__conversation_message_history') }}\n),\n\nconversation_message_recipient as (\n select *\n from {{ ref('stg_hubspot__conversation_message_recipient') }}\n),\n\nconversation_actor as (\n select *\n from {{ ref('stg_hubspot__conversation_actor') }}\n),\n\nconversation_channel as (\n select *\n from {{ ref('stg_hubspot__conversation_channel') }}\n),\n\nconversation_channel_account as (\n select *\n from {{ ref('stg_hubspot__conversation_channel_account') }}\n),\n\nconversation_inbox as (\n select *\n from {{ ref('stg_hubspot__conversation_inbox') }}\n),\n\n{% if var('hubspot_service_enabled', false) %}\nticket as (\n select *\n from {{ ref('stg_hubspot__ticket') }}\n),\n\n {% if var('hubspot_owner_enabled', true) %}\n owners_enhanced as (\n\n select *\n from {{ ref('int_hubspot__owners_enhanced') }}\n ),\n {% endif%}\n\n{% endif %}\n\n{% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\ncontact as (\n select *\n from {{ ref('stg_hubspot__contact') }}\n),\n{% endif %}\n\nmessage_history_join as (\n\n select\n conversation_message_history.thread_id,\n conversation_message_history.source_relation,\n\n -- Latest message timestamps are already available on the conversation_thread table, so just get first\n min(case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_at,\n min(case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_received_at,\n min(case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_sent_at,\n\n -- Overall message counts\n count(distinct case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) total_message_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) incoming_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) outgoing_message_count,\n\n -- Message counts by sender type\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.message_id end) agent_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'BOT' then conversation_message_history.message_id end) bot_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'SYSTEM' then conversation_message_history.message_id end) system_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'LLM' then conversation_message_history.message_id end) llm_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'INTEGRATION' then conversation_message_history.message_id end) integration_outgoing_message_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) agent_author_count,\n count(distinct case when coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) involved_agent_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'VISITOR' then conversation_message_history.created_by_actor_id end) visitor_author_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and (actor_recipient.type = 'VISITOR' or actor_recipient.actor_id like 'V-%') then actor_recipient.actor_id end) visitor_recipient_count,\n\n -- Other conversation event counts\n count(distinct case when conversation_message_history.type = 'COMMENT' then conversation_message_history.message_id end) comment_count,\n count(distinct case when conversation_message_history.type = 'THREAD_STATUS_CHANGE' then conversation_message_history.message_id end) thread_status_change_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.message_id end) assignment_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.assigned_to_actor_id end) unique_assignee_count,\n\n cast(max(case when conversation_message_history.type = 'WELCOME_MESSAGE' then 1 else 0 end) as {{ dbt.type_boolean() }}) as has_welcome_message\n\n from conversation_message_history \n\n left join conversation_actor actor_sender\n on conversation_message_history.created_by_actor_id = actor_sender.actor_id\n and conversation_message_history.source_relation = actor_sender.source_relation\n\n -- Messages can be sent to multiple recipients\n left join conversation_message_recipient\n on conversation_message_history.message_id = conversation_message_recipient.message_id\n and conversation_message_history.thread_id = conversation_message_recipient.thread_id\n and conversation_message_history.source_relation = conversation_message_recipient.source_relation\n\n left join conversation_actor actor_recipient\n on conversation_message_recipient.actor_id = actor_recipient.actor_id\n and conversation_message_recipient.source_relation = actor_recipient.source_relation\n\n group by 1,2\n\n),\n\nthread_join as (\n\n select\n conversation_thread.*,\n conversation_actor.name as assignee_name,\n conversation_actor.email as assignee_email,\n conversation_inbox.name as inbox_name,\n conversation_inbox.type as inbox_type,\n conversation_inbox.is_active as is_inbox_active,\n conversation_inbox.is_deleted as is_inbox_deleted,\n conversation_channel.name as channel_name,\n conversation_channel.is_deleted as is_channel_deleted,\n conversation_channel_account.name as channel_account_name,\n conversation_channel_account.delivery_identifier_type as channel_account_delivery_identifier_type,\n conversation_channel_account.delivery_identifier_value as channel_account_delivery_identifier_value,\n conversation_channel_account.is_deleted as is_channel_account_deleted,\n {% if var('hubspot_service_enabled', false) %}\n ticket.ticket_subject,\n ticket.ticket_content,\n ticket.created_date as ticket_created_date,\n ticket.closed_date as ticket_closed_date,\n ticket.ticket_category,\n ticket.owner_id as ticket_owner_id,\n ticket.is_ticket_deleted,\n {% if var('hubspot_owner_enabled', true) %}\n owners_enhanced.owner_email_address as ticket_owner_email_address,\n owners_enhanced.owner_full_name as ticket_owner_full_name,\n {% if var('hubspot_team_enabled', true) %}\n owners_enhanced.owner_primary_team_id as ticket_owner_primary_team_id,\n owners_enhanced.owner_primary_team_name as ticket_owner_primary_team_name,\n {% endif %}\n {% if var('hubspot_role_enabled', true) %}\n owners_enhanced.owner_role_id as ticket_owner_role_id,\n owners_enhanced.owner_role_name as ticket_owner_role_name,\n {% endif %}\n owners_enhanced.owner_active_user_id as ticket_owner_active_user_id,\n {% endif %}\n {% endif %}\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n contact.email as contact_email,\n contact.first_name as contact_first_name,\n contact.last_name as contact_last_name,\n contact.contact_company,\n contact.is_contact_deleted,\n {% endif %}\n {{ dbt.datediff('message_history_join.first_message_received_at', 'message_history_join.first_message_sent_at', 'second') }} as first_response_time_seconds,\n {{ dbt.datediff('message_history_join.first_message_received_at', 'conversation_thread.closed_at', 'second') }} as resolution_time_seconds,\n message_history_join.first_message_at,\n message_history_join.first_message_received_at,\n message_history_join.first_message_sent_at,\n message_history_join.total_message_count,\n message_history_join.incoming_message_count,\n message_history_join.outgoing_message_count,\n message_history_join.agent_outgoing_message_count,\n message_history_join.bot_outgoing_message_count,\n message_history_join.system_outgoing_message_count,\n message_history_join.comment_count,\n message_history_join.assignment_count,\n message_history_join.thread_status_change_count,\n message_history_join.unique_assignee_count,\n message_history_join.involved_agent_count,\n message_history_join.agent_author_count,\n message_history_join.visitor_author_count,\n message_history_join.visitor_recipient_count,\n message_history_join.has_welcome_message\n\n from conversation_thread\n left join message_history_join\n on conversation_thread.conversation_thread_id = message_history_join.thread_id\n and conversation_thread.source_relation = message_history_join.source_relation\n left join conversation_channel\n on conversation_thread.original_channel_id = conversation_channel.channel_id\n and conversation_thread.source_relation = conversation_channel.source_relation\n left join conversation_channel_account\n on conversation_thread.original_channel_account_id = conversation_channel_account.channel_account_id\n and conversation_thread.source_relation = conversation_channel_account.source_relation\n left join conversation_inbox\n on conversation_thread.inbox_id = conversation_inbox.inbox_id\n and conversation_thread.source_relation = conversation_inbox.source_relation\n left join conversation_actor\n on conversation_thread.assigned_to_actor_id = conversation_actor.actor_id\n and conversation_thread.source_relation = conversation_actor.source_relation\n {% if var('hubspot_service_enabled', false) %}\n left join ticket\n on conversation_thread.associated_ticket_id = ticket.ticket_id\n and conversation_thread.source_relation = ticket.source_relation\n {% if var('hubspot_owner_enabled', true) %}\n left join owners_enhanced\n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n {% endif %}\n {% endif %}\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n left join contact\n on conversation_thread.associated_contact_id = contact.contact_id\n and conversation_thread.source_relation = contact.source_relation\n {% endif %}\n)\n\nselect *\nfrom thread_join", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_thread", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_history", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_recipient", "package": null, "version": null}, {"name": "stg_hubspot__conversation_actor", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel_account", "package": null, "version": null}, {"name": "stg_hubspot__conversation_inbox", "package": null, "version": null}, {"name": "stg_hubspot__ticket", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_boolean", "macro.dbt.datediff"], "nodes": ["model.hubspot.stg_hubspot__conversation_thread", "model.hubspot.stg_hubspot__conversation_message_history", "model.hubspot.stg_hubspot__conversation_message_recipient", "model.hubspot.stg_hubspot__conversation_actor", "model.hubspot.stg_hubspot__conversation_channel", "model.hubspot.stg_hubspot__conversation_channel_account", "model.hubspot.stg_hubspot__conversation_inbox", "model.hubspot.stg_hubspot__ticket", "model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__contact"]}, "compiled_path": "target/compiled/hubspot/models/service/hubspot__conversations.sql", "compiled": true, "compiled_code": "\n\nwith conversation_thread as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread\"\n),\n\nconversation_message_history as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history\"\n),\n\nconversation_message_recipient as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient\"\n),\n\nconversation_actor as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor\"\n),\n\nconversation_channel as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel\"\n),\n\nconversation_channel_account as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account\"\n),\n\nconversation_inbox as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox\"\n),\n\n\nticket as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\n),\n\n \n owners_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"\n ),\n \n\n\n\n\ncontact as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n),\n\n\nmessage_history_join as (\n\n select\n conversation_message_history.thread_id,\n conversation_message_history.source_relation,\n\n -- Latest message timestamps are already available on the conversation_thread table, so just get first\n min(case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_at,\n min(case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_received_at,\n min(case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_sent_at,\n\n -- Overall message counts\n count(distinct case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) total_message_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) incoming_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) outgoing_message_count,\n\n -- Message counts by sender type\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.message_id end) agent_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'BOT' then conversation_message_history.message_id end) bot_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'SYSTEM' then conversation_message_history.message_id end) system_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'LLM' then conversation_message_history.message_id end) llm_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'INTEGRATION' then conversation_message_history.message_id end) integration_outgoing_message_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) agent_author_count,\n count(distinct case when coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) involved_agent_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'VISITOR' then conversation_message_history.created_by_actor_id end) visitor_author_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and (actor_recipient.type = 'VISITOR' or actor_recipient.actor_id like 'V-%') then actor_recipient.actor_id end) visitor_recipient_count,\n\n -- Other conversation event counts\n count(distinct case when conversation_message_history.type = 'COMMENT' then conversation_message_history.message_id end) comment_count,\n count(distinct case when conversation_message_history.type = 'THREAD_STATUS_CHANGE' then conversation_message_history.message_id end) thread_status_change_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.message_id end) assignment_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.assigned_to_actor_id end) unique_assignee_count,\n\n cast(max(case when conversation_message_history.type = 'WELCOME_MESSAGE' then 1 else 0 end) as boolean) as has_welcome_message\n\n from conversation_message_history \n\n left join conversation_actor actor_sender\n on conversation_message_history.created_by_actor_id = actor_sender.actor_id\n and conversation_message_history.source_relation = actor_sender.source_relation\n\n -- Messages can be sent to multiple recipients\n left join conversation_message_recipient\n on conversation_message_history.message_id = conversation_message_recipient.message_id\n and conversation_message_history.thread_id = conversation_message_recipient.thread_id\n and conversation_message_history.source_relation = conversation_message_recipient.source_relation\n\n left join conversation_actor actor_recipient\n on conversation_message_recipient.actor_id = actor_recipient.actor_id\n and conversation_message_recipient.source_relation = actor_recipient.source_relation\n\n group by 1,2\n\n),\n\nthread_join as (\n\n select\n conversation_thread.*,\n conversation_actor.name as assignee_name,\n conversation_actor.email as assignee_email,\n conversation_inbox.name as inbox_name,\n conversation_inbox.type as inbox_type,\n conversation_inbox.is_active as is_inbox_active,\n conversation_inbox.is_deleted as is_inbox_deleted,\n conversation_channel.name as channel_name,\n conversation_channel.is_deleted as is_channel_deleted,\n conversation_channel_account.name as channel_account_name,\n conversation_channel_account.delivery_identifier_type as channel_account_delivery_identifier_type,\n conversation_channel_account.delivery_identifier_value as channel_account_delivery_identifier_value,\n conversation_channel_account.is_deleted as is_channel_account_deleted,\n \n ticket.ticket_subject,\n ticket.ticket_content,\n ticket.created_date as ticket_created_date,\n ticket.closed_date as ticket_closed_date,\n ticket.ticket_category,\n ticket.owner_id as ticket_owner_id,\n ticket.is_ticket_deleted,\n \n owners_enhanced.owner_email_address as ticket_owner_email_address,\n owners_enhanced.owner_full_name as ticket_owner_full_name,\n \n owners_enhanced.owner_primary_team_id as ticket_owner_primary_team_id,\n owners_enhanced.owner_primary_team_name as ticket_owner_primary_team_name,\n \n \n owners_enhanced.owner_role_id as ticket_owner_role_id,\n owners_enhanced.owner_role_name as ticket_owner_role_name,\n \n owners_enhanced.owner_active_user_id as ticket_owner_active_user_id,\n \n \n \n contact.email as contact_email,\n contact.first_name as contact_first_name,\n contact.last_name as contact_last_name,\n contact.contact_company,\n contact.is_contact_deleted,\n \n \n (\n (\n (\n ((message_history_join.first_message_sent_at)::date - (message_history_join.first_message_received_at)::date)\n * 24 + date_part('hour', (message_history_join.first_message_sent_at)::timestamp) - date_part('hour', (message_history_join.first_message_received_at)::timestamp))\n * 60 + date_part('minute', (message_history_join.first_message_sent_at)::timestamp) - date_part('minute', (message_history_join.first_message_received_at)::timestamp))\n * 60 + floor(date_part('second', (message_history_join.first_message_sent_at)::timestamp)) - floor(date_part('second', (message_history_join.first_message_received_at)::timestamp)))\n as first_response_time_seconds,\n \n (\n (\n (\n ((conversation_thread.closed_at)::date - (message_history_join.first_message_received_at)::date)\n * 24 + date_part('hour', (conversation_thread.closed_at)::timestamp) - date_part('hour', (message_history_join.first_message_received_at)::timestamp))\n * 60 + date_part('minute', (conversation_thread.closed_at)::timestamp) - date_part('minute', (message_history_join.first_message_received_at)::timestamp))\n * 60 + floor(date_part('second', (conversation_thread.closed_at)::timestamp)) - floor(date_part('second', (message_history_join.first_message_received_at)::timestamp)))\n as resolution_time_seconds,\n message_history_join.first_message_at,\n message_history_join.first_message_received_at,\n message_history_join.first_message_sent_at,\n message_history_join.total_message_count,\n message_history_join.incoming_message_count,\n message_history_join.outgoing_message_count,\n message_history_join.agent_outgoing_message_count,\n message_history_join.bot_outgoing_message_count,\n message_history_join.system_outgoing_message_count,\n message_history_join.comment_count,\n message_history_join.assignment_count,\n message_history_join.thread_status_change_count,\n message_history_join.unique_assignee_count,\n message_history_join.involved_agent_count,\n message_history_join.agent_author_count,\n message_history_join.visitor_author_count,\n message_history_join.visitor_recipient_count,\n message_history_join.has_welcome_message\n\n from conversation_thread\n left join message_history_join\n on conversation_thread.conversation_thread_id = message_history_join.thread_id\n and conversation_thread.source_relation = message_history_join.source_relation\n left join conversation_channel\n on conversation_thread.original_channel_id = conversation_channel.channel_id\n and conversation_thread.source_relation = conversation_channel.source_relation\n left join conversation_channel_account\n on conversation_thread.original_channel_account_id = conversation_channel_account.channel_account_id\n and conversation_thread.source_relation = conversation_channel_account.source_relation\n left join conversation_inbox\n on conversation_thread.inbox_id = conversation_inbox.inbox_id\n and conversation_thread.source_relation = conversation_inbox.source_relation\n left join conversation_actor\n on conversation_thread.assigned_to_actor_id = conversation_actor.actor_id\n and conversation_thread.source_relation = conversation_actor.source_relation\n \n left join ticket\n on conversation_thread.associated_ticket_id = ticket.ticket_id\n and conversation_thread.source_relation = ticket.source_relation\n \n left join owners_enhanced\n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n \n \n \n left join contact\n on conversation_thread.associated_contact_id = contact.contact_id\n and conversation_thread.source_relation = contact.source_relation\n \n)\n\nselect *\nfrom thread_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/hubspot__daily_ticket_history.sql", "original_file_path": "models/service/hubspot__daily_ticket_history.sql", "unique_id": "model.hubspot.hubspot__daily_ticket_history", "fqn": ["hubspot", "service", "hubspot__daily_ticket_history"], "alias": "hubspot__daily_ticket_history", "checksum": {"name": "sha256", "checksum": "77358082f300cf8153800d0897ff50fa65f08bb274cb2a1dd9d53afc05e8dc59"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "ticket_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a ticket's day in Hubspot with tracked properties from the `TICKET_PROPERTY_HISTORY` source table pivoted out into columns. Enabled by setting `hubspot_service_enabled` to `True`.\nBy default, tracks the ticket's pipeline, pipeline stage, and state. Additional properties can be tracked by configuring the `hubspot__ticket_property_history_columns` variable.\nThe start of a ticket's history is its creation date, and its end is by default the close date (or the current date if still open). The history of ticket can be extended past its close date by configuring the `ticket_history_extension_days` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "ticket_day_id": {"name": "ticket_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `ticket_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the ticket had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_id": {"name": "ticket_id", "description": "Unique id of a ticket in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline_label": {"name": "hs_pipeline_label", "description": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline_stage_label": {"name": "hs_pipeline_stage_label", "description": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline": {"name": "hs_pipeline", "description": "ID of the ticket pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline_stage": {"name": "hs_pipeline_stage", "description": "ID of the ticket pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/service/service.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "ticket_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.4693632, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='ticket_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_ticket_history')) -%}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_ticket_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__ticket_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n), pipeline as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline') }}\n\n), pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_stage') }}\n\n), joined as (\n\n select \n calendar.source_relation,\n calendar.date_day,\n calendar.ticket_id\n {% if is_incremental() %} \n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %} \n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n \n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %} \n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.ticket_id = change_data.ticket_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n \n {% if is_incremental() %}\n left join most_recent_data\n on calendar.ticket_id = most_recent_data.ticket_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n \n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by ticket_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by ticket_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select \n fill_values.source_relation,\n date_day,\n ticket_id,\n pipeline_stage.ticket_state,\n pipeline.pipeline_label as hs_pipeline_label,\n pipeline_stage.pipeline_stage_label as hs_pipeline_stage_label\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %} \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( {{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else {{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n from fill_values\n\n left join pipeline\n on fill_values.hs_pipeline = pipeline.ticket_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.hs_pipeline_stage = pipeline_stage.ticket_pipeline_stage_id\n and pipeline.ticket_pipeline_id = pipeline_stage.ticket_pipeline_id\n and fill_values.source_relation = pipeline_stage.source_relation\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','ticket_id','source_relation']) }} as ticket_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_ticket_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_ticket_history", "package": null, "version": null}, {"name": "int_hubspot__ticket_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_stage", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt.type_string"], "nodes": ["model.hubspot.int_hubspot__scd_daily_ticket_history", "model.hubspot.int_hubspot__ticket_calendar_spine", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/service/hubspot__daily_ticket_history.sql", "compiled": true, "compiled_code": "\n\nwith change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_ticket_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__ticket_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline\"\n\n), pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage\"\n\n), joined as (\n\n select \n calendar.source_relation,\n calendar.date_day,\n calendar.ticket_id\n \n \n , coalesce(change_data.hs_pipeline, most_recent_data.hs_pipeline) as hs_pipeline\n \n , coalesce(change_data.hs_pipeline_stage, most_recent_data.hs_pipeline_stage) as hs_pipeline_stage\n \n \n \n\n from calendar\n left join change_data\n on calendar.ticket_id = change_data.ticket_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n \n \n left join most_recent_data\n on calendar.ticket_id = most_recent_data.ticket_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n \n \n , hs_pipeline\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hs_pipeline is null then 0 else 1 end) over (\n partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_partition\n \n , hs_pipeline_stage\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hs_pipeline_stage is null then 0 else 1 end) over (\n partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_stage_partition\n \n\n from joined\n\n), fill_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n\n \n -- grab the value that started this batch/partition\n , first_value( hs_pipeline ) over (\n partition by ticket_id, hs_pipeline_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline\n \n -- grab the value that started this batch/partition\n , first_value( hs_pipeline_stage ) over (\n partition by ticket_id, hs_pipeline_stage_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline_stage\n \n\n from set_values\n\n), fix_null_values as (\n\n select \n fill_values.source_relation,\n date_day,\n ticket_id,\n pipeline_stage.ticket_state,\n pipeline.pipeline_label as hs_pipeline_label,\n pipeline_stage.pipeline_stage_label as hs_pipeline_stage_label\n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( hs_pipeline as TEXT ) = 'is_null' then null else hs_pipeline end as hs_pipeline\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( hs_pipeline_stage as TEXT ) = 'is_null' then null else hs_pipeline_stage end as hs_pipeline_stage\n \n\n from fill_values\n\n left join pipeline\n on fill_values.hs_pipeline = pipeline.ticket_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.hs_pipeline_stage = pipeline_stage.ticket_pipeline_stage_id\n and pipeline.ticket_pipeline_id = pipeline_stage.ticket_pipeline_id\n and fill_values.source_relation = pipeline_stage.source_relation\n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as ticket_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["ticket_day_id"], "time_spine": null}, "model.hubspot.hubspot__tickets": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__tickets", "resource_type": "model", "package_name": "hubspot", "path": "service/hubspot__tickets.sql", "original_file_path": "models/service/hubspot__tickets.sql", "unique_id": "model.hubspot.hubspot__tickets", "fqn": ["hubspot", "service", "hubspot__tickets"], "alias": "hubspot__tickets", "checksum": {"name": "sha256", "checksum": "dabb4e4204be0f509deac27d27d1f4adc39dba655d3673a369cd310674e03013"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket in Hubspot. Enabled by setting `hubspot_service_enabled` to `True`.\nCustom columns from `TICKET` can be included by configuring the `hubspot__ticket_pass_through_columns` variable. Custom calculated ticket fields can be added by configuring the `hubspot__ticket_calculated_fields` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "ticket_id": {"name": "ticket_id", "description": "Unique id of a ticket in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_deleted": {"name": "is_ticket_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "closed_date": {"name": "closed_date", "description": "The date the ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_agent_reply_at": {"name": "first_agent_reply_at", "description": "The date for the first agent reply on the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "The ID of the ticket's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_id": {"name": "ticket_pipeline_stage_id", "description": "The ID of the ticket's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_priority": {"name": "ticket_priority", "description": "The priority of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_category": {"name": "ticket_category", "description": "The category of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "Foreign key referencing the ID of the ticket's `OWNER`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_subject": {"name": "ticket_subject", "description": "Short summary of ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_content": {"name": "ticket_content", "description": "Text in body of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_order": {"name": "pipeline_stage_order", "description": "Order of the ticket's current stage within its given pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_pipeline_deleted": {"name": "is_ticket_pipeline_deleted", "description": "Boolean indicating whether the ticket's pipeline is deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_pipeline_stage_deleted": {"name": "is_ticket_pipeline_stage_deleted", "description": "Boolean indicating whether the ticket's pipeline stage is deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the ticket's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "Full name of the ticket's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "Array of `DEAL` ids associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_names": {"name": "deal_names", "description": "Array of `DEAL` names associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "Array of `COMPANY` ids associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_names": {"name": "company_names", "description": "Array of `COMPANY` names associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "Array of `CONTACT` ids associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_emails": {"name": "contact_emails", "description": "Array of `CONTACT` emails associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "owner_active_user_id": {"name": "owner_active_user_id", "description": "Unique ID of the active HubSpot user who owns the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_id": {"name": "owner_primary_team_id", "description": "ID of the primary team assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_name": {"name": "owner_primary_team_name", "description": "Name of the primary team assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_ids": {"name": "owner_all_team_ids", "description": "Comma-separated list of all team IDs associated with the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_names": {"name": "owner_all_team_names", "description": "Comma-separated list of all team names associated with the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_id": {"name": "owner_role_id", "description": "ID of the role assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_name": {"name": "owner_role_name", "description": "Name of the role assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/service/service.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.481239, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__tickets\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith ticket as (\n\n select *\n from {{ ref('stg_hubspot__ticket') }}\n\n), ticket_pipeline as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline') }}\n\n), ticket_pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_stage') }}\n\n{% if var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_ticket_deal_enabled', false) %}\n), ticket_deal as (\n\n select *\n from {{ ref('stg_hubspot__ticket_deal') }}\n\n), deal as (\n\n select *\n from {{ ref('stg_hubspot__deal') }}\n\n), join_deals as (\n \n select\n ticket_deal.source_relation,\n ticket_deal.ticket_id,\n ticket_deal.deal_id,\n deal.deal_name\n\n from ticket_deal\n left join deal \n on ticket_deal.deal_id = deal.deal_id\n and ticket_deal.source_relation = deal.source_relation\n\n), agg_deals as (\n\n select\n source_relation,\n ticket_id,\n {{ fivetran_utils.array_agg(\"case when deal_id is null then '' else cast(deal_id as \" ~ dbt.type_string() ~ \") end\") }} as deal_ids,\n {{ fivetran_utils.array_agg(\"case when deal_name is null then '' else deal_name end\") }} as deal_names\n\n from join_deals\n group by 1,2\n\n{% endif %}\n\n{% if var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) %}\n), ticket_company as (\n\n select *\n from {{ ref('stg_hubspot__ticket_company') }}\n\n), company as (\n\n select *\n from {{ ref('stg_hubspot__company') }}\n\n), join_companies as (\n \n select\n ticket_company.source_relation,\n ticket_company.ticket_id,\n ticket_company.company_id,\n company.company_name\n\n from ticket_company\n left join company \n on ticket_company.company_id = company.company_id\n and ticket_company.source_relation = company.source_relation\n\n), agg_companies as (\n\n select\n source_relation,\n ticket_id,\n {{ fivetran_utils.array_agg(\"case when company_id is null then '' else cast(company_id as \" ~ dbt.type_string() ~ \") end\") }} as company_ids,\n {{ fivetran_utils.array_agg(\"case when company_name is null then '' else company_name end\") }} as company_names\n\n from join_companies\n group by 1,2\n\n{% endif %}\n\n{% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n), ticket_contact as (\n\n select *\n from {{ ref('stg_hubspot__ticket_contact') }}\n\n), contact as (\n\n select *\n from {{ ref('stg_hubspot__contact') }}\n\n), join_contacts as (\n \n select\n ticket_contact.source_relation,\n ticket_contact.ticket_id,\n ticket_contact.contact_id,\n contact.email\n\n from ticket_contact\n left join contact \n on ticket_contact.contact_id = contact.contact_id\n and ticket_contact.source_relation = contact.source_relation\n\n), agg_contacts as (\n\n select\n source_relation,\n ticket_id,\n {{ fivetran_utils.array_agg(\"case when contact_id is null then '' else cast(contact_id as \" ~ dbt.type_string() ~ \") end\") }} as contact_ids,\n {{ fivetran_utils.array_agg(\"case when email is null then '' else email end\") }} as contact_emails\n\n from join_contacts\n group by 1,2\n\n{% endif %}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owners_enhanced as (\n\n select *\n from {{ ref('int_hubspot__owners_enhanced') }}\n\n{% endif%}\n\n{% if var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) %}\n), engagement as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), ticket_engagement as (\n\n select *\n from {{ ref('stg_hubspot__ticket_engagement') }}\n\n), join_engagements as (\n\n select \n engagement.source_relation,\n engagement.engagement_type,\n ticket_engagement.ticket_id\n from engagement\n inner join ticket_engagement\n on cast(engagement.engagement_id as {{ dbt.type_bigint() }}) = cast(ticket_engagement.engagement_id as {{ dbt.type_bigint() }} )\n and engagement.source_relation = ticket_engagement.source_relation\n\n), agg_engagements as (\n\n {{ engagements_aggregated('join_engagements', 'ticket_id') }}\n\n{% endif %}\n\n), final_join as (\n\n select\n ticket.*,\n ticket_pipeline_stage.ticket_state,\n ticket_pipeline_stage.is_closed,\n ticket_pipeline_stage.pipeline_stage_label,\n ticket_pipeline.pipeline_label,\n ticket_pipeline_stage.display_order as pipeline_stage_order,\n ticket_pipeline.is_ticket_pipeline_deleted,\n ticket_pipeline_stage.is_ticket_pipeline_stage_deleted\n\n {% if var('hubspot_owner_enabled', true) %}\n , {{ dbt_utils.star(ref('int_hubspot__owners_enhanced'), except=[\"owner_id\", \"source_relation\"], relation_alias=\"owners_enhanced\") }}\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_ticket_deal_enabled', false) %}\n , agg_deals.deal_ids\n , agg_deals.deal_names\n {% endif %}\n\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n , agg_contacts.contact_ids\n , agg_contacts.contact_emails\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) %}\n , agg_companies.company_ids\n , agg_companies.company_names\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) %}\n {% for metric in engagement_metrics() %}\n , coalesce(agg_engagements.{{ metric }},0) as {{ metric }}\n {% endfor %}\n {% endif %}\n\n from ticket\n\n left join ticket_pipeline \n on cast(ticket.ticket_pipeline_id as {{ dbt.type_string() }}) = cast(ticket_pipeline.ticket_pipeline_id as {{ dbt.type_string() }})\n and ticket.source_relation = ticket_pipeline.source_relation\n \n left join ticket_pipeline_stage \n on cast(ticket.ticket_pipeline_stage_id as {{ dbt.type_string() }}) = cast(ticket_pipeline_stage.ticket_pipeline_stage_id as {{ dbt.type_string() }})\n and cast(ticket_pipeline.ticket_pipeline_id as {{ dbt.type_string() }}) = cast(ticket_pipeline_stage.ticket_pipeline_id as {{ dbt.type_string() }})\n and ticket.source_relation = ticket_pipeline_stage.source_relation\n\n {% if var('hubspot_owner_enabled', true) %}\n left join owners_enhanced \n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_ticket_deal_enabled', false) %}\n left join agg_deals \n on ticket.ticket_id = agg_deals.ticket_id\n and ticket.source_relation = agg_deals.source_relation\n {% endif %}\n\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n left join agg_contacts\n on ticket.ticket_id = agg_contacts.ticket_id \n and ticket.source_relation = agg_contacts.source_relation\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) %}\n left join agg_companies\n on ticket.ticket_id = agg_companies.ticket_id \n and ticket.source_relation = agg_companies.source_relation\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) %}\n left join agg_engagements\n on ticket.ticket_id = agg_engagements.ticket_id\n and ticket.source_relation = agg_engagements.source_relation\n {% endif %}\n)\n\nselect *\nfrom final_join", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_stage", "package": null, "version": null}, {"name": "stg_hubspot__ticket_deal", "package": null, "version": null}, {"name": "stg_hubspot__deal", "package": null, "version": null}, {"name": "stg_hubspot__ticket_company", "package": null, "version": null}, {"name": "stg_hubspot__company", "package": null, "version": null}, {"name": "stg_hubspot__ticket_contact", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__ticket_engagement", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.fivetran_utils.array_agg", "macro.dbt.type_bigint", "macro.hubspot.engagements_aggregated", "macro.dbt_utils.star", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.stg_hubspot__ticket", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage", "model.hubspot.stg_hubspot__ticket_deal", "model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__ticket_company", "model.hubspot.stg_hubspot__company", "model.hubspot.stg_hubspot__ticket_contact", "model.hubspot.stg_hubspot__contact", "model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__ticket_engagement"]}, "compiled_path": "target/compiled/hubspot/models/service/hubspot__tickets.sql", "compiled": true, "compiled_code": "\n\nwith ticket as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\n\n), ticket_pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline\"\n\n), ticket_pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage\"\n\n\n), ticket_deal as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal\"\n\n), deal as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n\n), join_deals as (\n \n select\n ticket_deal.source_relation,\n ticket_deal.ticket_id,\n ticket_deal.deal_id,\n deal.deal_name\n\n from ticket_deal\n left join deal \n on ticket_deal.deal_id = deal.deal_id\n and ticket_deal.source_relation = deal.source_relation\n\n), agg_deals as (\n\n select\n source_relation,\n ticket_id,\n \n array_agg(case when deal_id is null then '' else cast(deal_id as TEXT) end)\n as deal_ids,\n \n array_agg(case when deal_name is null then '' else deal_name end)\n as deal_names\n\n from join_deals\n group by 1,2\n\n\n\n\n), ticket_company as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company\"\n\n), company as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n\n), join_companies as (\n \n select\n ticket_company.source_relation,\n ticket_company.ticket_id,\n ticket_company.company_id,\n company.company_name\n\n from ticket_company\n left join company \n on ticket_company.company_id = company.company_id\n and ticket_company.source_relation = company.source_relation\n\n), agg_companies as (\n\n select\n source_relation,\n ticket_id,\n \n array_agg(case when company_id is null then '' else cast(company_id as TEXT) end)\n as company_ids,\n \n array_agg(case when company_name is null then '' else company_name end)\n as company_names\n\n from join_companies\n group by 1,2\n\n\n\n\n), ticket_contact as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact\"\n\n), contact as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n\n), join_contacts as (\n \n select\n ticket_contact.source_relation,\n ticket_contact.ticket_id,\n ticket_contact.contact_id,\n contact.email\n\n from ticket_contact\n left join contact \n on ticket_contact.contact_id = contact.contact_id\n and ticket_contact.source_relation = contact.source_relation\n\n), agg_contacts as (\n\n select\n source_relation,\n ticket_id,\n \n array_agg(case when contact_id is null then '' else cast(contact_id as TEXT) end)\n as contact_ids,\n \n array_agg(case when email is null then '' else email end)\n as contact_emails\n\n from join_contacts\n group by 1,2\n\n\n\n\n), owners_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"\n\n\n\n\n), engagement as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), ticket_engagement as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement\"\n\n), join_engagements as (\n\n select \n engagement.source_relation,\n engagement.engagement_type,\n ticket_engagement.ticket_id\n from engagement\n inner join ticket_engagement\n on cast(engagement.engagement_id as bigint) = cast(ticket_engagement.engagement_id as bigint )\n and engagement.source_relation = ticket_engagement.source_relation\n\n), agg_engagements as (\n\n \n\n select\n source_relation,\n ticket_id,\n count(case when engagement_type = 'NOTE' then ticket_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then ticket_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then ticket_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then ticket_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then ticket_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then ticket_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then ticket_id end) as count_engagement_forwarded_emails\n from join_engagements\n group by 1,2\n\n\n\n\n\n), final_join as (\n\n select\n ticket.*,\n ticket_pipeline_stage.ticket_state,\n ticket_pipeline_stage.is_closed,\n ticket_pipeline_stage.pipeline_stage_label,\n ticket_pipeline.pipeline_label,\n ticket_pipeline_stage.display_order as pipeline_stage_order,\n ticket_pipeline.is_ticket_pipeline_deleted,\n ticket_pipeline_stage.is_ticket_pipeline_stage_deleted\n\n \n , owners_enhanced.\"owner_active_user_id\",\n owners_enhanced.\"owner_email_address\",\n owners_enhanced.\"owner_full_name\",\n owners_enhanced.\"owner_primary_team_id\",\n owners_enhanced.\"owner_primary_team_name\",\n owners_enhanced.\"owner_all_team_ids\",\n owners_enhanced.\"owner_all_team_names\",\n owners_enhanced.\"owner_role_id\",\n owners_enhanced.\"owner_role_name\"\n \n\n \n , agg_deals.deal_ids\n , agg_deals.deal_names\n \n\n \n , agg_contacts.contact_ids\n , agg_contacts.contact_emails\n \n\n \n , agg_companies.company_ids\n , agg_companies.company_names\n \n\n \n \n , coalesce(agg_engagements.count_engagement_notes,0) as count_engagement_notes\n \n , coalesce(agg_engagements.count_engagement_tasks,0) as count_engagement_tasks\n \n , coalesce(agg_engagements.count_engagement_calls,0) as count_engagement_calls\n \n , coalesce(agg_engagements.count_engagement_meetings,0) as count_engagement_meetings\n \n , coalesce(agg_engagements.count_engagement_emails,0) as count_engagement_emails\n \n , coalesce(agg_engagements.count_engagement_incoming_emails,0) as count_engagement_incoming_emails\n \n , coalesce(agg_engagements.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails\n \n \n\n from ticket\n\n left join ticket_pipeline \n on cast(ticket.ticket_pipeline_id as TEXT) = cast(ticket_pipeline.ticket_pipeline_id as TEXT)\n and ticket.source_relation = ticket_pipeline.source_relation\n \n left join ticket_pipeline_stage \n on cast(ticket.ticket_pipeline_stage_id as TEXT) = cast(ticket_pipeline_stage.ticket_pipeline_stage_id as TEXT)\n and cast(ticket_pipeline.ticket_pipeline_id as TEXT) = cast(ticket_pipeline_stage.ticket_pipeline_id as TEXT)\n and ticket.source_relation = ticket_pipeline_stage.source_relation\n\n \n left join owners_enhanced \n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n \n\n \n left join agg_deals \n on ticket.ticket_id = agg_deals.ticket_id\n and ticket.source_relation = agg_deals.source_relation\n \n\n \n left join agg_contacts\n on ticket.ticket_id = agg_contacts.ticket_id \n and ticket.source_relation = agg_contacts.source_relation\n \n\n \n left join agg_companies\n on ticket.ticket_id = agg_companies.ticket_id \n and ticket.source_relation = agg_companies.source_relation\n \n\n \n left join agg_engagements\n on ticket.ticket_id = agg_engagements.ticket_id\n and ticket.source_relation = agg_engagements.source_relation\n \n)\n\nselect *\nfrom final_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__daily_ticket_history.sql", "original_file_path": "models/service/intermediate/int_hubspot__daily_ticket_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_ticket_history", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__daily_ticket_history"], "alias": "int_hubspot__daily_ticket_history", "checksum": {"name": "sha256", "checksum": "8eb820ba24c7cd780426bf30d0526a73dd2d9c3a64973b71c0f3e165ca20cfa0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.3353648, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_ticket_history\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__ticket_property_history') }}\n\n -- should we include an option pivot out ALL properties? in the same vein as our passthrough-all-columns var\n where lower(field_name) in \n ('hs_pipeline', 'hs_pipeline_stage'\n {% for col in var('hubspot__ticket_property_history_columns', []) %}\n , '{{ col }}'\n {%- endfor -%} )\n\n {% if is_incremental() %}\n and cast(change_timestamp as date) >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(change_timestamp as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), windows as (\n\n select\n source_relation,\n cast({{ dbt.date_trunc('day', 'change_timestamp') }} as date) as date_day,\n ticket_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n -- if it is currently active fivetran_end = 9999-12-31 23:59:59, but the calendar_spine will end at the current_date\n from history\n\n), order_daily_changes as (\n\n select \n *,\n row_number() over (\n partition by date_day, ticket_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n \n select \n source_relation,\n date_day,\n ticket_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','ticket_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.stg_hubspot__ticket_property_history"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__daily_ticket_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history\"\n\n -- should we include an option pivot out ALL properties? in the same vein as our passthrough-all-columns var\n where lower(field_name) in \n ('hs_pipeline', 'hs_pipeline_stage'\n )\n\n \n and cast(change_timestamp as date) >= \n\n\n\n \n\n \n\n cast('2025-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), windows as (\n\n select\n source_relation,\n cast(date_trunc('day', change_timestamp) as date) as date_day,\n ticket_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n -- if it is currently active fivetran_end = 9999-12-31 23:59:59, but the calendar_spine will end at the current_date\n from history\n\n), order_daily_changes as (\n\n select \n *,\n row_number() over (\n partition by date_day, ticket_id, field_name \n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n \n select \n source_relation,\n date_day,\n ticket_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select \n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__ticket_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__ticket_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__ticket_calendar_spine.sql", "original_file_path": "models/service/intermediate/int_hubspot__ticket_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__ticket_calendar_spine", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__ticket_calendar_spine"], "alias": "int_hubspot__ticket_calendar_spine", "checksum": {"name": "sha256", "checksum": "d00338e425ee37e0c09a34cccdbeb3ebb556ed1674272e7461a3fc2792e6b7c2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.3533955, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__ticket_calendar_spine\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__ticket_tmp') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(property_createdate as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__ticket_tmp') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), ticket as (\n\n select \n *,\n cast( {{ dbt.date_trunc('day', \"case when closed_date is null then \" ~ dbt.current_timestamp_backcompat() ~ \" else closed_date end\") }} as date) as open_until\n from {{ ref('stg_hubspot__ticket') }}\n where not coalesce(is_ticket_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n ticket.ticket_id,\n ticket.source_relation\n from calendar\n inner join ticket\n on cast(calendar.date_day as date) >= cast(ticket.created_date as date)\n -- use this variable to extend the ticket's history past its close date (for reporting/data viz purposes :-)\n and cast(calendar.date_day as date) <= {{ dbt.dateadd('day', var('ticket_history_extension_days', 0), 'ticket.open_until') }}\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','ticket_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt.current_timestamp_backcompat", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__ticket_tmp", "model.hubspot.stg_hubspot__ticket"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_tmp\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3871\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), ticket as (\n\n select \n *,\n cast( date_trunc('day', case when closed_date is null then \n current_timestamp::timestamp\n else closed_date end) as date) as open_until\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\n where not coalesce(is_ticket_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n ticket.ticket_id,\n ticket.source_relation\n from calendar\n inner join ticket\n on cast(calendar.date_day as date) >= cast(ticket.created_date as date)\n -- use this variable to extend the ticket's history past its close date (for reporting/data viz purposes :-)\n and cast(calendar.date_day as date) <= \n\n ticket.open_until + ((interval '1 day') * (0))\n\n\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__scd_daily_ticket_history.sql", "original_file_path": "models/service/intermediate/int_hubspot__scd_daily_ticket_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_ticket_history", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__scd_daily_ticket_history"], "alias": "int_hubspot__scd_daily_ticket_history", "checksum": {"name": "sha256", "checksum": "19641b86d8e6beffe49706620f6683c471eef1c669e706ed7d3553a075d80fc1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.4434764, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_ticket_history\"", "raw_code": "{{ config(materialized='table', enabled=var('hubspot_service_enabled', False)) }}\n\n{%- set ticket_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_ticket_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_ticket_history') }}\n\n), set_values as (\n\n select \n source_relation,\n date_day, \n ticket_id,\n id\n\n {% for col in ticket_columns if col.name|lower not in ['source_relation','date_day','ticket_id','id'] %} \n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by ticket_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes ticket property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n source_relation,\n date_day, \n ticket_id,\n id\n \n {% for col in ticket_columns if col.name|lower not in ['source_relation','date_day','ticket_id','id'] %} \n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by ticket_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_ticket_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__scd_daily_ticket_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_ticket_history\"\n\n), set_values as (\n\n select \n source_relation,\n date_day, \n ticket_id,\n id\n\n \n , hs_pipeline as hs_pipeline\n -- create a batch/partition once a new value is provided\n , sum( case when hs_pipeline is null then 0 else 1 end) over (partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_field_partition\n\n \n , hs_pipeline_stage as hs_pipeline_stage\n -- create a batch/partition once a new value is provided\n , sum( case when hs_pipeline_stage is null then 0 else 1 end) over (partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_stage_field_partition\n\n \n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes ticket property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n source_relation,\n date_day, \n ticket_id,\n id\n \n \n\n -- grab the value that started this batch/partition\n , first_value( hs_pipeline ) over (\n partition by ticket_id, hs_pipeline_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hs_pipeline_stage ) over (\n partition by ticket_id, hs_pipeline_stage_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline_stage\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__pivot_daily_ticket_history.sql", "original_file_path": "models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_ticket_history", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__pivot_daily_ticket_history"], "alias": "int_hubspot__pivot_daily_ticket_history", "checksum": {"name": "sha256", "checksum": "efd8908df989ab589dc052ca0c89f0288202bae7ce7caa7cadae605f81e8d9dd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.4560177, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_ticket_history\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set ticket_columns = (['hs_pipeline', 'hs_pipeline_stage'] + var('hubspot__ticket_property_history_columns', []))|unique|list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_ticket_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select \n source_relation,\n date_day, \n ticket_id\n\n -- should we remove the `hs_` prefix? could introduce some duplicates if people already have something like `hs_owner` and `owner`\n {% for col in ticket_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'ticket_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_ticket_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2025-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select \n source_relation,\n date_day, \n ticket_id\n\n -- should we remove the `hs_` prefix? could introduce some duplicates if people already have something like `hs_owner` and `owner`\n , max(case when lower(field_name) = 'hs_pipeline' then new_value end) as hs_pipeline\n , max(case when lower(field_name) = 'hs_pipeline_stage' then new_value end) as hs_pipeline_stage\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select \n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__deal_stages": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__deal_stages", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__deal_stages.sql", "original_file_path": "models/sales/hubspot__deal_stages.sql", "unique_id": "model.hubspot.hubspot__deal_stages", "fqn": ["hubspot", "sales", "hubspot__deal_stages"], "alias": "hubspot__deal_stages", "checksum": {"name": "sha256", "checksum": "0fe129583c73b1b0c29cad153bf9434f35cd0ab0161e2290dac492ae72f0f2f3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents when a deal stage changes in Hubspot, enriched with metrics about deal activities", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "deal_stage_id": {"name": "deal_stage_id", "description": "The unique deal stage identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deal_pipeline_deleted": {"name": "is_deal_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_pipeline_stage_deleted": {"name": "is_deal_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_deleted": {"name": "is_deal_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "date_stage_entered": {"name": "date_stage_entered", "description": "The timestamp the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_stage_exited": {"name": "date_stage_exited", "description": "The Fivetran calculated exit time of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_stage_active": {"name": "is_stage_active", "description": "Boolean indicating whether the deal stage active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_deal_ids": {"name": "merged_deal_ids", "description": "A list of deals that had previously been merged into this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_id": {"name": "pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The label of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_pipeline_active": {"name": "is_pipeline_active", "description": "Boolean indicating if the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_pipeline_stage_active": {"name": "is_pipeline_stage_active", "description": "Boolean indicating if the pipeline stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The label of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The relevant source of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_id": {"name": "source_id", "description": "Reference to the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_pipeline_stage_closed": {"name": "is_pipeline_stage_closed", "description": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal, refer to the pipeline_stage_label column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_display_order": {"name": "pipeline_stage_display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_display_order": {"name": "pipeline_display_order", "description": "Used to determine the order in which the pipelines appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_probability": {"name": "pipeline_stage_probability", "description": "The probability that the deal will close. Used for the deal forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_name": {"name": "deal_name", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_created_at": {"name": "deal_pipeline_stage_created_at", "description": "A timestamp representing when the deal_pipeline_stage was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_updated_at": {"name": "deal_pipeline_stage_updated_at", "description": "A timestamp representing when the deal_pipeline_stage was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5314379, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__deal_stages\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith deals_enhanced as (\n\n select *\n from {{ ref('int_hubspot__deals_enhanced') }}\n\n), deal_stage as (\n\n select *\n from {{ ref('stg_hubspot__deal_stage') }}\n\n), pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage') }}\n\n), pipeline as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline') }}\n\n), final as (\n\n select\n deal_stage.source_relation,\n deal_stage.deal_id || '-' || row_number() over(partition by deal_stage.deal_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot', alias='deal_stage') }} order by deal_stage.date_entered asc) as deal_stage_id,\n deals_enhanced.deal_id,\n deals_enhanced.deal_name,\n\n {% if var('hubspot_merged_deal_enabled', false) %}\n deals_enhanced.merged_deal_ids,\n {% endif %}\n \n deal_stage._fivetran_start as date_stage_entered,\n deal_stage._fivetran_end as date_stage_exited,\n deal_stage._fivetran_active as is_stage_active,\n deal_stage.deal_stage_name as pipeline_stage_id,\n pipeline_stage.pipeline_stage_label,\n pipeline_stage.deal_pipeline_id as pipeline_id,\n pipeline.pipeline_label,\n deal_stage.source,\n deal_stage.source_id,\n pipeline_stage.is_active as is_pipeline_stage_active,\n pipeline.is_active as is_pipeline_active,\n pipeline_stage.is_closed as is_pipeline_stage_closed,\n pipeline_stage.display_order as pipeline_stage_display_order,\n pipeline.display_order as pipeline_display_order,\n pipeline_stage.probability as pipeline_stage_probability,\n coalesce(pipeline.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n coalesce(pipeline_stage.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n coalesce(deals_enhanced.is_deal_deleted, false) as is_deal_deleted,\n pipeline_stage.deal_pipeline_stage_created_at,\n pipeline_stage.deal_pipeline_stage_updated_at\n\n from deal_stage\n\n left join pipeline_stage\n on deal_stage.deal_stage_name = pipeline_stage.deal_pipeline_stage_id\n and deal_stage.source_relation = pipeline_stage.source_relation\n\n left join pipeline\n on pipeline_stage.deal_pipeline_id = pipeline.deal_pipeline_id\n and pipeline_stage.source_relation = pipeline.source_relation\n\n left join deals_enhanced\n on deal_stage.deal_id = deals_enhanced.deal_id\n and deal_stage.source_relation = deals_enhanced.source_relation\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__deals_enhanced", "package": null, "version": null}, {"name": "stg_hubspot__deal_stage", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.stg_hubspot__deal_stage", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__deal_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__deal_stages.sql", "compiled": true, "compiled_code": "\n\nwith deals_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__deals_enhanced\"\n\n), deal_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage\"\n\n), pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\n\n), pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\n\n), final as (\n\n select\n deal_stage.source_relation,\n deal_stage.deal_id || '-' || row_number() over(partition by deal_stage.deal_id order by deal_stage.date_entered asc) as deal_stage_id,\n deals_enhanced.deal_id,\n deals_enhanced.deal_name,\n\n \n deals_enhanced.merged_deal_ids,\n \n \n deal_stage._fivetran_start as date_stage_entered,\n deal_stage._fivetran_end as date_stage_exited,\n deal_stage._fivetran_active as is_stage_active,\n deal_stage.deal_stage_name as pipeline_stage_id,\n pipeline_stage.pipeline_stage_label,\n pipeline_stage.deal_pipeline_id as pipeline_id,\n pipeline.pipeline_label,\n deal_stage.source,\n deal_stage.source_id,\n pipeline_stage.is_active as is_pipeline_stage_active,\n pipeline.is_active as is_pipeline_active,\n pipeline_stage.is_closed as is_pipeline_stage_closed,\n pipeline_stage.display_order as pipeline_stage_display_order,\n pipeline.display_order as pipeline_display_order,\n pipeline_stage.probability as pipeline_stage_probability,\n coalesce(pipeline.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n coalesce(pipeline_stage.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n coalesce(deals_enhanced.is_deal_deleted, false) as is_deal_deleted,\n pipeline_stage.deal_pipeline_stage_created_at,\n pipeline_stage.deal_pipeline_stage_updated_at\n\n from deal_stage\n\n left join pipeline_stage\n on deal_stage.deal_stage_name = pipeline_stage.deal_pipeline_stage_id\n and deal_stage.source_relation = pipeline_stage.source_relation\n\n left join pipeline\n on pipeline_stage.deal_pipeline_id = pipeline.deal_pipeline_id\n and pipeline_stage.source_relation = pipeline.source_relation\n\n left join deals_enhanced\n on deal_stage.deal_id = deals_enhanced.deal_id\n and deal_stage.source_relation = deals_enhanced.source_relation\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__companies": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__companies", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__companies.sql", "original_file_path": "models/sales/hubspot__companies.sql", "unique_id": "model.hubspot.hubspot__companies", "fqn": ["hubspot", "sales", "hubspot__companies"], "alias": "hubspot__companies", "checksum": {"name": "sha256", "checksum": "7ce02e86808a79399cbfd0ce792de3bc3507f00ee6bafd9ec149e576602059e3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "is_company_deleted": {"name": "is_company_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.533176, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__companies\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}\n\nwith companies as (\n\n select *\n from {{ ref('stg_hubspot__company') }}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_enabled','hubspot_engagement_company_enabled']) %}\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_companies as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n inner join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), engagement_companies_agg as (\n\n {{ engagements_aggregated('engagement_companies_joined', 'company_id') }}\n\n), joined as (\n\n select \n companies.*,\n {% for metric in engagement_metrics() %}\n coalesce(engagement_companies_agg.{{ metric }},0) as {{ metric }} {% if not loop.last %},{% endif %}\n {% endfor %}\n from companies\n left join engagement_companies_agg\n on companies.company_id = engagement_companies_agg.company_id\n and companies.source_relation = engagement_companies_agg.source_relation\n\n)\n\nselect *\nfrom joined\n\n{% else %}\n\n)\n\nselect *\nfrom companies\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_aggregated", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.stg_hubspot__company", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__companies.sql", "compiled": true, "compiled_code": "\n\nwith companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n\n\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n inner join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), engagement_companies_agg as (\n\n \n\n select\n source_relation,\n company_id,\n count(case when engagement_type = 'NOTE' then company_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_id end) as count_engagement_forwarded_emails\n from engagement_companies_joined\n group by 1,2\n\n\n\n), joined as (\n\n select \n companies.*,\n \n coalesce(engagement_companies_agg.count_engagement_notes,0) as count_engagement_notes ,\n \n coalesce(engagement_companies_agg.count_engagement_tasks,0) as count_engagement_tasks ,\n \n coalesce(engagement_companies_agg.count_engagement_calls,0) as count_engagement_calls ,\n \n coalesce(engagement_companies_agg.count_engagement_meetings,0) as count_engagement_meetings ,\n \n coalesce(engagement_companies_agg.count_engagement_emails,0) as count_engagement_emails ,\n \n coalesce(engagement_companies_agg.count_engagement_incoming_emails,0) as count_engagement_incoming_emails ,\n \n coalesce(engagement_companies_agg.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails \n \n from companies\n left join engagement_companies_agg\n on companies.company_id = engagement_companies_agg.company_id\n and companies.source_relation = engagement_companies_agg.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__company_lists": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__company_lists", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__company_lists.sql", "original_file_path": "models/sales/hubspot__company_lists.sql", "unique_id": "model.hubspot.hubspot__company_lists", "fqn": ["hubspot", "sales", "hubspot__company_lists"], "alias": "hubspot__company_lists", "checksum": {"name": "sha256", "checksum": "e8c3fc1b77fbdfa893e9fd2d0a95707dbff248be5b7a2de3fc9e46207500316a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company list in Hubspot, enriched with engagement and ticket metrics aggregated across member companies.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_list_id": {"name": "company_list_id", "description": "The ID of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_name": {"name": "company_list_name", "description": "The name of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_company_list_deleted": {"name": "is_company_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "total_companies": {"name": "total_companies", "description": "The total number of companies that are members of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5182073, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__company_lists\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])) }}\n\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_company_list_member_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled']) %}\n\nwith company_lists as (\n\n select *\n from {{ ref('stg_hubspot__company_list') }}\n\n{% if engagements_enabled %}\n\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__engagement_metrics__by_company_list') }}\n\n{% endif %}\n\n{% if var('hubspot_company_list_member_enabled', true) %}\n\n), company_list_member as (\n\n select *\n from {{ ref('stg_hubspot__company_list_member') }}\n where not coalesce(is_company_list_member_deleted, false)\n\n),\n\ncompany_list_members_aggregated as (\n \n select \n source_relation,\n company_list_id,\n count(distinct company_id) as total_companies\n\n from company_list_member\n group by 1,2\n\n{% endif %}\n\n), joined as (\n\n select\n company_lists.*\n\n {% if var('hubspot_company_list_member_enabled', true) %}\n , company_list_members_aggregated.total_companies\n {% endif %}\n\n {% if engagements_enabled %}\n {% for metric in engagement_metrics() %}\n , coalesce(engagement_metrics.{{ metric }}, 0) as {{ metric }}\n {% endfor %}\n {% endif %}\n\n from company_lists\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on company_lists.company_list_id = engagement_metrics.company_list_id\n and company_lists.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n {% if var('hubspot_company_list_member_enabled', true) %}\n left join company_list_members_aggregated\n on company_lists.company_list_id = company_list_members_aggregated.company_list_id\n and company_lists.source_relation = company_list_members_aggregated.source_relation\n {% endif %}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list", "package": null, "version": null}, {"name": "int_hubspot__engagement_metrics__by_company_list", "package": null, "version": null}, {"name": "stg_hubspot__company_list_member", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.stg_hubspot__company_list", "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "model.hubspot.stg_hubspot__company_list_member"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__company_lists.sql", "compiled": true, "compiled_code": "\n\n\n\nwith __dbt__cte__int_hubspot__engagement_metrics__by_company_list as (\n\n\nwith company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n \n\n select\n source_relation,\n company_list_id,\n count(case when engagement_type = 'NOTE' then company_list_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_list_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_list_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_list_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_list_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_list_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_list_id end) as count_engagement_forwarded_emails\n from company_list_engagements\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_metrics\n), company_lists as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list\"\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__engagement_metrics__by_company_list\n\n\n\n\n\n), company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n),\n\ncompany_list_members_aggregated as (\n \n select \n source_relation,\n company_list_id,\n count(distinct company_id) as total_companies\n\n from company_list_member\n group by 1,2\n\n\n\n), joined as (\n\n select\n company_lists.*\n\n \n , company_list_members_aggregated.total_companies\n \n\n \n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n \n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n \n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n \n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n \n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n \n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n \n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n \n\n from company_lists\n\n \n left join engagement_metrics\n on company_lists.company_list_id = engagement_metrics.company_list_id\n and company_lists.source_relation = engagement_metrics.source_relation\n \n\n \n left join company_list_members_aggregated\n on company_lists.company_list_id = company_list_members_aggregated.company_list_id\n and company_lists.source_relation = company_list_members_aggregated.source_relation\n \n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "sql": " __dbt__cte__int_hubspot__engagement_metrics__by_company_list as (\n\n\nwith company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n \n\n select\n source_relation,\n company_list_id,\n count(case when engagement_type = 'NOTE' then company_list_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_list_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_list_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_list_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_list_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_list_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_list_id end) as count_engagement_forwarded_emails\n from company_list_engagements\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__deals": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__deals", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__deals.sql", "original_file_path": "models/sales/hubspot__deals.sql", "unique_id": "model.hubspot.hubspot__deals", "fqn": ["hubspot", "sales", "hubspot__deals"], "alias": "hubspot__deals", "checksum": {"name": "sha256", "checksum": "4c47108051345c5c9d4b887e2edce77e942ba8091fc5fe71125254d119752709"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "description": {"name": "description", "description": "A brief description of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount": {"name": "amount", "description": "The total value of the deal in the deal's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_date": {"name": "closed_date", "description": "The day the deal is expected to close, or was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the deal was created. This property is set automatically by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_name": {"name": "deal_name", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_deal_ids": {"name": "merged_deal_ids", "description": "A list of deals that had previously been merged into this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deal_deleted": {"name": "is_deal_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_pipeline_deleted": {"name": "is_deal_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_pipeline_stage_deleted": {"name": "is_deal_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "is_pipeline_active": {"name": "is_pipeline_active", "description": "Boolean indicating if the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The label of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The label of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_created_at": {"name": "deal_pipeline_created_at", "description": "A timestamp representing when the deal_pipeline was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_updated_at": {"name": "deal_pipeline_updated_at", "description": "A timestamp representing when the deal_pipeline was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_active_user_id": {"name": "owner_active_user_id", "description": "Unique ID of the active HubSpot user who owns the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_id": {"name": "owner_primary_team_id", "description": "ID of the primary team assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_name": {"name": "owner_primary_team_name", "description": "Name of the primary team assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_ids": {"name": "owner_all_team_ids", "description": "Comma-separated list of all team IDs associated with the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_names": {"name": "owner_all_team_names", "description": "Comma-separated list of all team names associated with the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_id": {"name": "owner_role_id", "description": "ID of the role assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_name": {"name": "owner_role_name", "description": "Name of the role assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.524993, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__deals\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith deals_enhanced as (\n\n select *\n from {{ ref('int_hubspot__deals_enhanced') }}\n{% set cte_ref = 'deals_enhanced' %}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_enabled','hubspot_engagement_deal_enabled']) %}\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_deals as (\n\n select *\n from {{ ref('stg_hubspot__engagement_deal') }}\n\n), engagement_deal_joined as (\n\n select\n engagements.engagement_type,\n engagement_deals.deal_id,\n engagement_deals.source_relation\n from engagements\n inner join engagement_deals\n on cast(engagements.engagement_id as {{ dbt.type_bigint() }}) = cast(engagement_deals.engagement_id as {{ dbt.type_bigint() }} )\n and engagements.source_relation = engagement_deals.source_relation\n\n), engagement_deal_agg as (\n\n {{ engagements_aggregated('engagement_deal_joined', 'deal_id') }}\n\n), engagements_joined as (\n\n select \n deals_enhanced.*,\n {% for metric in engagement_metrics() %}\n coalesce(engagement_deal_agg.{{ metric }},0) as {{ metric }} {% if not loop.last %},{% endif %}\n {% endfor %}\n from deals_enhanced\n left join engagement_deal_agg\n on cast(deals_enhanced.deal_id as {{ dbt.type_bigint() }}) = cast(engagement_deal_agg.deal_id as {{ dbt.type_bigint() }} )\n and deals_enhanced.source_relation = engagement_deal_agg.source_relation\n{% set cte_ref = 'engagements_joined' %}\n\n{% endif %}\n)\n\nselect *\nfrom {{ cte_ref }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__deals_enhanced", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.type_bigint", "macro.hubspot.engagements_aggregated", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_deal"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__deals.sql", "compiled": true, "compiled_code": "\n\nwith deals_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__deals_enhanced\"\n\n\n\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), engagement_deal_joined as (\n\n select\n engagements.engagement_type,\n engagement_deals.deal_id,\n engagement_deals.source_relation\n from engagements\n inner join engagement_deals\n on cast(engagements.engagement_id as bigint) = cast(engagement_deals.engagement_id as bigint )\n and engagements.source_relation = engagement_deals.source_relation\n\n), engagement_deal_agg as (\n\n \n\n select\n source_relation,\n deal_id,\n count(case when engagement_type = 'NOTE' then deal_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then deal_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then deal_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then deal_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then deal_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then deal_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then deal_id end) as count_engagement_forwarded_emails\n from engagement_deal_joined\n group by 1,2\n\n\n\n), engagements_joined as (\n\n select \n deals_enhanced.*,\n \n coalesce(engagement_deal_agg.count_engagement_notes,0) as count_engagement_notes ,\n \n coalesce(engagement_deal_agg.count_engagement_tasks,0) as count_engagement_tasks ,\n \n coalesce(engagement_deal_agg.count_engagement_calls,0) as count_engagement_calls ,\n \n coalesce(engagement_deal_agg.count_engagement_meetings,0) as count_engagement_meetings ,\n \n coalesce(engagement_deal_agg.count_engagement_emails,0) as count_engagement_emails ,\n \n coalesce(engagement_deal_agg.count_engagement_incoming_emails,0) as count_engagement_incoming_emails ,\n \n coalesce(engagement_deal_agg.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails \n \n from deals_enhanced\n left join engagement_deal_agg\n on cast(deals_enhanced.deal_id as bigint) = cast(engagement_deal_agg.deal_id as bigint )\n and deals_enhanced.source_relation = engagement_deal_agg.source_relation\n\n\n\n)\n\nselect *\nfrom engagements_joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagements": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagements", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__engagements.sql", "original_file_path": "models/sales/hubspot__engagements.sql", "unique_id": "model.hubspot.hubspot__engagements", "fqn": ["hubspot", "sales", "hubspot__engagements"], "alias": "hubspot__engagements", "checksum": {"name": "sha256", "checksum": "e2fc27227c16388e598be38a38c05a21bd239007f27c0164dc542487ac1ac540"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an engagement", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5348046, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagements\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}\n\nwith engagements as (\n\n select *\n from {{ ref('stg_hubspot__engagement') }}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %}\n\n), contacts as (\n\n select *\n from {{ ref('stg_hubspot__engagement_contact') }}\n\n), contacts_agg as (\n\n select\n source_relation,\n engagement_id,\n {{ fivetran_utils.array_agg('contact_id') }} as contact_ids\n from contacts\n group by 1, 2\n\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %}\n\n), deals as (\n\n select *\n from {{ ref('stg_hubspot__engagement_deal') }}\n \n), deals_agg as (\n\n select\n source_relation,\n engagement_id,\n {{ fivetran_utils.array_agg('deal_id') }} as deal_ids\n from deals\n group by 1, 2\n\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %}\n\n), companies as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), companies_agg as (\n\n select\n source_relation,\n engagement_id,\n {{ fivetran_utils.array_agg('company_id') }} as company_ids\n from companies\n group by 1, 2\n\n{% endif %}\n\n), joined as (\n\n select \n {% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %} contacts_agg.contact_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %} deals_agg.deal_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %} companies_agg.company_ids, {% endif %}\n engagements.*\n from engagements\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %}\n left join contacts_agg\n on engagements.engagement_id = contacts_agg.engagement_id\n and engagements.source_relation = contacts_agg.source_relation\n {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %}\n left join deals_agg\n on engagements.engagement_id = deals_agg.engagement_id\n and engagements.source_relation = deals_agg.source_relation\n {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %}\n left join companies_agg\n on engagements.engagement_id = companies_agg.engagement_id\n and engagements.source_relation = companies_agg.source_relation\n {% endif %}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement", "package": null, "version": null}, {"name": "stg_hubspot__engagement_contact", "package": null, "version": null}, {"name": "stg_hubspot__engagement_deal", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.array_agg"], "nodes": ["model.hubspot.stg_hubspot__engagement", "model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_deal", "model.hubspot.stg_hubspot__engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__engagements.sql", "compiled": true, "compiled_code": "\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement\"\n\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), contacts_agg as (\n\n select\n source_relation,\n engagement_id,\n \n array_agg(contact_id)\n as contact_ids\n from contacts\n group by 1, 2\n\n\n\n\n\n), deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n \n), deals_agg as (\n\n select\n source_relation,\n engagement_id,\n \n array_agg(deal_id)\n as deal_ids\n from deals\n group by 1, 2\n\n\n\n\n\n), companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), companies_agg as (\n\n select\n source_relation,\n engagement_id,\n \n array_agg(company_id)\n as company_ids\n from companies\n group by 1, 2\n\n\n\n), joined as (\n\n select \n contacts_agg.contact_ids, \n deals_agg.deal_ids, \n companies_agg.company_ids, \n engagements.*\n from engagements\n \n left join contacts_agg\n on engagements.engagement_id = contacts_agg.engagement_id\n and engagements.source_relation = contacts_agg.source_relation\n \n \n left join deals_agg\n on engagements.engagement_id = deals_agg.engagement_id\n and engagements.source_relation = deals_agg.source_relation\n \n \n left join companies_agg\n on engagements.engagement_id = companies_agg.engagement_id\n and engagements.source_relation = companies_agg.source_relation\n \n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_meetings": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_meetings", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_meetings.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_meetings.sql", "unique_id": "model.hubspot.hubspot__engagement_meetings", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_meetings"], "alias": "hubspot__engagement_meetings", "checksum": {"name": "sha256", "checksum": "1aa0ddd71eae7245f73e13595c5bf6947700a1c324462a7fa998fbd3edba6744"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a MEETING engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_meeting_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5541453, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_meetings\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_meeting_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_meeting')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_meetings.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_type\",\n base.\"engagement_id\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"created_from_link_id\",\n base.\"end_time\",\n base.\"pre_meeting_prospect_reminders\",\n base.\"source\",\n base.\"source_id\",\n base.\"start_time\",\n base.\"web_conference_meeting_id\",\n base.\"meeting_outcome\",\n base.\"body\",\n base.\"external_url\",\n base.\"title\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_calls": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_calls", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_calls.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_calls.sql", "unique_id": "model.hubspot.hubspot__engagement_calls", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_calls"], "alias": "hubspot__engagement_calls", "checksum": {"name": "sha256", "checksum": "5946613ae53a245b132423c9ef176b4c805d07f5416cde4035d2583d84b3b738"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CALL engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_call_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5509536, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_calls\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_call_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_call')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_calls.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_id\",\n base.\"engagement_type\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_notes": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_notes", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_notes.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_notes.sql", "unique_id": "model.hubspot.hubspot__engagement_notes", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_notes"], "alias": "hubspot__engagement_notes", "checksum": {"name": "sha256", "checksum": "1c5fb36cfcb9761f676330d9dbadc0a876e76c47f79b5cc7a517ea5f124f626f"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a NOTE engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "note": {"name": "note", "description": "The body of the note. The body has a limit of 65536 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_note_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5555332, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_notes\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_note_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_note')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_note", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_notes.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"note\",\n base.\"engagement_type\",\n base.\"engagement_id\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"body_preview\",\n base.\"lastmodifieddate\",\n base.\"note_body\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_communication": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_communication", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_communication.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_communication.sql", "unique_id": "model.hubspot.hubspot__engagement_communication", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_communication"], "alias": "hubspot__engagement_communication", "checksum": {"name": "sha256", "checksum": "e3fc70ec179bb880f2b0f8c04d00d7860a7e3ffe4d69302fbe76562b0c5462e4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a COMMUNICATION engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5519965, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_communication\"", "raw_code": "{{ config(enabled=var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false)) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_communication')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_communication", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_communication.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_id\",\n base.\"engagement_type\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_emails": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_emails", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_emails.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_emails.sql", "unique_id": "model.hubspot.hubspot__engagement_emails", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_emails"], "alias": "hubspot__engagement_emails", "checksum": {"name": "sha256", "checksum": "44310a032c8530c6ba1ee1a9964efdc1add187084fe4e22cc8741acf338b79ca"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an EMAIL engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_email_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.553113, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_emails\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_email_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_email')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_email", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_emails.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_type\",\n base.\"engagement_id\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"all_owner_ids\",\n base.\"all_team_ids\",\n base.\"email_subject\",\n base.\"email_text\",\n base.\"lastmodifieddate\",\n base.\"modified_by\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_tasks": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_tasks", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_tasks.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_tasks.sql", "unique_id": "model.hubspot.hubspot__engagement_tasks", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_tasks"], "alias": "hubspot__engagement_tasks", "checksum": {"name": "sha256", "checksum": "e77e050e665e98e53123a24af83f3c19a4923835c5c4c10557e972492588cb2d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a TASK engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_task_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5566423, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_tasks\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_task_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_task')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_task", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_tasks.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_id\",\n base.\"engagement_type\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"task_type\",\n base.\"object_id\",\n base.\"engagement_source\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_deal_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_deal_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_deal_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_deal_history"], "alias": "int_hubspot__daily_deal_history", "checksum": {"name": "sha256", "checksum": "99c502787764856d430e794a8fd8610233caebf0bedb0ac7ee767fa17546f2c1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.5858011, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_deal_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\n-- pipeline_stage_id is added manually\n{% set deal_columns = (['deal_pipeline_id', 'amount', 'amount_in_home_currency'] + var('hubspot__deal_property_history_columns', [])) %}\n{% do deal_columns.append('owner_id') if var('hubspot_owner_enabled', true) %}\n{% do deal_columns.append('hubspot_team_id') if var('hubspot_team_enabled', true) %}\n{% set deal_columns = deal_columns | unique | list %}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith deal_history as (\n\n select\n source_relation,\n deal_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n cast({{ dbt.date_trunc('day', 'valid_from') }} as date) as date_day,\n valid_from,\n valid_to\n\n from {{ ref('hubspot__deal_history') }}\n\n where lower(field_name) in ({{ \"'\" ~ deal_columns | join(\"', '\") ~ \"'\" }})\n\n {% if is_incremental() %}\n and cast(valid_from as date) >= {{ lookback_date }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(valid_from as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n{# Deal stages are not stored in deal_property_history #}\n), deal_stages as (\n\n select\n source_relation,\n deal_id,\n 'pipeline_stage_id' as field_name,\n deal_stage_name as new_value,\n source as change_source,\n source_id as change_source_id,\n cast({{ dbt.date_trunc('day', 'date_entered') }} as date) as date_day,\n _fivetran_start as valid_from,\n _fivetran_end as valid_to\n\n from {{ ref('stg_hubspot__deal_stage') }}\n\n {% if is_incremental() %}\n where cast(date_entered as date) >= {{ lookback_date }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n where cast(date_entered as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), combined as (\n\n select * from deal_history\n union all\n select * from deal_stages\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, deal_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from combined\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n deal_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','deal_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}, {"name": "stg_hubspot__deal_stage", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.hubspot__deal_history", "model.hubspot.stg_hubspot__deal_stage"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_deal_history.sql", "compiled": true, "compiled_code": "\n\n-- pipeline_stage_id is added manually\n\n\n\n\n\n\nwith deal_history as (\n\n select\n source_relation,\n deal_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n cast(date_trunc('day', valid_from) as date) as date_day,\n valid_from,\n valid_to\n\n from \"postgres\".\"public_hubspot\".\"hubspot__deal_history\"\n\n where lower(field_name) in ('deal_pipeline_id', 'amount', 'amount_in_home_currency', 'owner_id', 'hubspot_team_id')\n\n \n and cast(valid_from as date) >= \n\n\n\n \n\n \n\n cast('2021-01-12' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n), deal_stages as (\n\n select\n source_relation,\n deal_id,\n 'pipeline_stage_id' as field_name,\n deal_stage_name as new_value,\n source as change_source,\n source_id as change_source_id,\n cast(date_trunc('day', date_entered) as date) as date_day,\n _fivetran_start as valid_from,\n _fivetran_end as valid_to\n\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage\"\n\n \n where cast(date_entered as date) >= \n\n\n\n \n\n \n\n cast('2021-01-12' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), combined as (\n\n select * from deal_history\n union all\n select * from deal_stages\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, deal_id, field_name \n order by valid_from desc\n ) as row_num\n from combined\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n deal_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_engagement_metrics__by_deal", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_engagement_metrics__by_deal.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_deal.sql", "unique_id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_engagement_metrics__by_deal"], "alias": "int_hubspot__daily_engagement_metrics__by_deal", "checksum": {"name": "sha256", "checksum": "37c21582f1354e0df67eed89317d2f979954d9e4a197b1c61ea428cd1866db16"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.6104271, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled']))\n}}\n\n{# Build a list of (model_ref, enabled_var) pairs so we can union only what's enabled #}\n{% set engagement_staging_models = [] %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_call') if fivetran_utils.enabled_vars(['hubspot_engagement_call_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_email') if fivetran_utils.enabled_vars(['hubspot_engagement_email_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_meeting') if fivetran_utils.enabled_vars(['hubspot_engagement_meeting_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_note') if fivetran_utils.enabled_vars(['hubspot_engagement_note_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_task') if fivetran_utils.enabled_vars(['hubspot_engagement_task_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_communication') if var('hubspot_engagement_communication_enabled', false) %}\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from {{ ref('stg_hubspot__engagement_deal') }}\n\n), all_engagements as (\n\n {% if engagement_staging_models | length > 0 %}\n {% for model in engagement_staging_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from {{ ref(model) }}\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as engagement_id,\n cast(null as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n cast(null as {{ dbt.type_string() }}) as engagement_type\n where false\n\n {% endif %}\n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast({{ dbt.date_trunc('day', 'all_engagements.occurred_timestamp') }} as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_deal", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.stg_hubspot__engagement_deal", "model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task", "model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_deal.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__scd_daily_company_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__scd_daily_company_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_company_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__scd_daily_company_history"], "alias": "int_hubspot__scd_daily_company_history", "checksum": {"name": "sha256", "checksum": "0210e1ff0bd0312b57f96ec386fedc00023e658e31a9f3a6730054401b30edc0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.6276307, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_company_history\"", "raw_code": "{{ config(materialized='table', enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])) }}\n\n{%- set company_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_company_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_company_history') }}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id,\n id\n\n {% for col in company_columns if col.name|lower not in ['source_relation','date_day','company_id','id'] %}\n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by company_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes company property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n company_id,\n id\n\n {% for col in company_columns if col.name|lower not in ['source_relation','date_day','company_id','id'] %}\n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by company_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_company_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__scd_daily_company_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_company_history\"\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id,\n id\n\n \n , hubspot_owner_id as hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum( case when hubspot_owner_id is null then 0 else 1 end) over (partition by company_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_field_partition\n\n \n , lifecyclestage as lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum( case when lifecyclestage is null then 0 else 1 end) over (partition by company_id \n order by date_day rows unbounded preceding) as lifecyclestage_field_partition\n\n \n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes company property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n company_id,\n id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by company_id, hubspot_owner_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by company_id, lifecyclestage_field_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__deals_enhanced": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__deals_enhanced", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__deals_enhanced.sql", "original_file_path": "models/sales/intermediate/int_hubspot__deals_enhanced.sql", "unique_id": "model.hubspot.int_hubspot__deals_enhanced", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__deals_enhanced"], "alias": "int_hubspot__deals_enhanced", "checksum": {"name": "sha256", "checksum": "4b35bfa030eb70cf096ff9019996ed30ad6dc331ca6cee45e476964cd9384876"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.640873, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__deals_enhanced\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n{% set merged_deal_enabled = var('hubspot_merged_deal_enabled', false) %}\n{% set owner_enabled = var('hubspot_owner_enabled', true) %}\n\nwith deals as (\n\n select *\n from {{ ref('stg_hubspot__deal') }}\n\n{% if merged_deal_enabled %}\n), merged_deals as (\n\n select *\n from {{ ref('stg_hubspot__merged_deal') }}\n\n), aggregate_merged_deals as (\n\n select\n source_relation,\n deal_id,\n {{ fivetran_utils.array_agg(\"merged_deal_id\") }} as merged_deal_ids\n from merged_deals\n group by 1, 2\n{% endif %}\n\n), pipelines as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline') }}\n\n), pipeline_stages as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage') }}\n\n{% if owner_enabled %}\n), owners_enhanced as (\n\n select *\n from {{ ref('int_hubspot__owners_enhanced') }}\n{% endif %}\n\n), deal_fields_joined as (\n\n select \n deals.*,\n\n {{ 'aggregate_merged_deals.merged_deal_ids,' if merged_deal_enabled }}\n\n coalesce(pipelines.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n pipelines.pipeline_label,\n pipelines.is_active as is_pipeline_active,\n coalesce(pipeline_stages.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n pipelines.deal_pipeline_created_at,\n pipelines.deal_pipeline_updated_at,\n pipeline_stages.pipeline_stage_label\n\n {{ \",\" ~ dbt_utils.star(ref('int_hubspot__owners_enhanced'), except=[\"owner_id\", \"source_relation\"], relation_alias=\"owners_enhanced\") if owner_enabled }}\n\n from deals \n left join pipelines\n on deals.deal_pipeline_id = pipelines.deal_pipeline_id\n and deals.source_relation = pipelines.source_relation\n left join pipeline_stages\n on deals.deal_pipeline_stage_id = pipeline_stages.deal_pipeline_stage_id\n and deals.source_relation = pipeline_stages.source_relation\n\n {% if owner_enabled %}\n left join owners_enhanced\n on deals.owner_id = owners_enhanced.owner_id\n and deals.source_relation = owners_enhanced.source_relation\n {% endif %}\n\n {% if merged_deal_enabled %}\n left join aggregate_merged_deals\n on deals.deal_id = aggregate_merged_deals.deal_id\n and deals.source_relation = aggregate_merged_deals.source_relation\n\n left join merged_deals\n on deals.deal_id = merged_deals.merged_deal_id\n and deals.source_relation = merged_deals.source_relation\n where merged_deals.merged_deal_id is null\n {% endif %}\n) \n\nselect *\nfrom deal_fields_joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal", "package": null, "version": null}, {"name": "stg_hubspot__merged_deal", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.array_agg", "macro.dbt_utils.star"], "nodes": ["model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__merged_deal", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.int_hubspot__owners_enhanced"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__deals_enhanced.sql", "compiled": true, "compiled_code": "\n\n\n\nwith deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n\n\n), merged_deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"\n\n), aggregate_merged_deals as (\n\n select\n source_relation,\n deal_id,\n \n array_agg(merged_deal_id)\n as merged_deal_ids\n from merged_deals\n group by 1, 2\n\n\n), pipelines as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\n\n), pipeline_stages as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\n\n\n), owners_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"\n\n\n), deal_fields_joined as (\n\n select \n deals.*,\n\n aggregate_merged_deals.merged_deal_ids,\n\n coalesce(pipelines.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n pipelines.pipeline_label,\n pipelines.is_active as is_pipeline_active,\n coalesce(pipeline_stages.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n pipelines.deal_pipeline_created_at,\n pipelines.deal_pipeline_updated_at,\n pipeline_stages.pipeline_stage_label\n\n ,owners_enhanced.\"owner_active_user_id\",\n owners_enhanced.\"owner_email_address\",\n owners_enhanced.\"owner_full_name\",\n owners_enhanced.\"owner_primary_team_id\",\n owners_enhanced.\"owner_primary_team_name\",\n owners_enhanced.\"owner_all_team_ids\",\n owners_enhanced.\"owner_all_team_names\",\n owners_enhanced.\"owner_role_id\",\n owners_enhanced.\"owner_role_name\"\n\n from deals \n left join pipelines\n on deals.deal_pipeline_id = pipelines.deal_pipeline_id\n and deals.source_relation = pipelines.source_relation\n left join pipeline_stages\n on deals.deal_pipeline_stage_id = pipeline_stages.deal_pipeline_stage_id\n and deals.source_relation = pipeline_stages.source_relation\n\n \n left join owners_enhanced\n on deals.owner_id = owners_enhanced.owner_id\n and deals.source_relation = owners_enhanced.source_relation\n \n\n \n left join aggregate_merged_deals\n on deals.deal_id = aggregate_merged_deals.deal_id\n and deals.source_relation = aggregate_merged_deals.source_relation\n\n left join merged_deals\n on deals.deal_id = merged_deals.merged_deal_id\n and deals.source_relation = merged_deals.source_relation\n where merged_deals.merged_deal_id is null\n \n) \n\nselect *\nfrom deal_fields_joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_engagement_metrics__by_company": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_engagement_metrics__by_company", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_engagement_metrics__by_company.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_company.sql", "unique_id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_engagement_metrics__by_company"], "alias": "int_hubspot__daily_engagement_metrics__by_company", "checksum": {"name": "sha256", "checksum": "3d318890dd58aa739e0d815601cc3a1d73c89aabdcc859bc5cd5c091b3d3e1c2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.654648, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled']))\n}}\n\n{# Build a list of (model_ref, enabled_var) pairs so we can union only what's enabled #}\n{% set engagement_staging_models = [] %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_call') if fivetran_utils.enabled_vars(['hubspot_engagement_call_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_email') if fivetran_utils.enabled_vars(['hubspot_engagement_email_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_meeting') if fivetran_utils.enabled_vars(['hubspot_engagement_meeting_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_note') if fivetran_utils.enabled_vars(['hubspot_engagement_note_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_task') if fivetran_utils.enabled_vars(['hubspot_engagement_task_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_communication') if var('hubspot_engagement_communication_enabled', false) %}\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), all_engagements as (\n\n {% if engagement_staging_models | length > 0 %}\n {% for model in engagement_staging_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from {{ ref(model) }}\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as engagement_id,\n cast(null as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n cast(null as {{ dbt.type_string() }}) as engagement_type\n where false\n\n {% endif %}\n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast({{ dbt.date_trunc('day', 'all_engagements.occurred_timestamp') }} as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_company", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.stg_hubspot__engagement_company", "model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task", "model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_company.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__scd_daily_deal_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__scd_daily_deal_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_deal_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__scd_daily_deal_history"], "alias": "int_hubspot__scd_daily_deal_history", "checksum": {"name": "sha256", "checksum": "110109e5d84eab672778516355624da7b320e5c8dfaa288e3996b2b04ad98451"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.6719668, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_deal_history\"", "raw_code": "{{ config(materialized='table', enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\n{%- set deal_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_deal_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_deal_history') }}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n {% for col in deal_columns if col.name|lower not in ['source_relation','date_day','deal_id','id'] %}\n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by deal_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes deal property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n {% for col in deal_columns if col.name|lower not in ['source_relation','date_day','deal_id','id'] %}\n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by deal_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_deal_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__scd_daily_deal_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_deal_history\"\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n \n , deal_pipeline_id as deal_pipeline_id\n -- create a batch/partition once a new value is provided\n , sum( case when deal_pipeline_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as deal_pipeline_id_field_partition\n\n \n , pipeline_stage_id as pipeline_stage_id\n -- create a batch/partition once a new value is provided\n , sum( case when pipeline_stage_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as pipeline_stage_id_field_partition\n\n \n , amount as amount\n -- create a batch/partition once a new value is provided\n , sum( case when amount is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as amount_field_partition\n\n \n , amount_in_home_currency as amount_in_home_currency\n -- create a batch/partition once a new value is provided\n , sum( case when amount_in_home_currency is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as amount_in_home_currency_field_partition\n\n \n , owner_id as owner_id\n -- create a batch/partition once a new value is provided\n , sum( case when owner_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as owner_id_field_partition\n\n \n , hubspot_team_id as hubspot_team_id\n -- create a batch/partition once a new value is provided\n , sum( case when hubspot_team_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as hubspot_team_id_field_partition\n\n \n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes deal property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( deal_pipeline_id ) over (\n partition by deal_id, deal_pipeline_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as deal_pipeline_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( pipeline_stage_id ) over (\n partition by deal_id, pipeline_stage_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as pipeline_stage_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( amount ) over (\n partition by deal_id, amount_field_partition \n order by date_day asc rows between unbounded preceding and current row) as amount\n\n \n\n -- grab the value that started this batch/partition\n , first_value( amount_in_home_currency ) over (\n partition by deal_id, amount_in_home_currency_field_partition \n order by date_day asc rows between unbounded preceding and current row) as amount_in_home_currency\n\n \n\n -- grab the value that started this batch/partition\n , first_value( owner_id ) over (\n partition by deal_id, owner_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as owner_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hubspot_team_id ) over (\n partition by deal_id, hubspot_team_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_team_id\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__pivot_daily_deal_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_deal_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__pivot_daily_deal_history"], "alias": "int_hubspot__pivot_daily_deal_history", "checksum": {"name": "sha256", "checksum": "3d648ecaaf06a2f8ef5ba0b9b8caa47e30827e33470e6814674e276be015a8eb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.6851954, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_deal_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set deal_columns = (['deal_pipeline_id', 'pipeline_stage_id', 'amount', 'amount_in_home_currency'] + var('hubspot__deal_property_history_columns', [])) %}\n{% do deal_columns.append('owner_id') if var('hubspot_owner_enabled', true) %}\n{% do deal_columns.append('hubspot_team_id') if var('hubspot_team_enabled', true) %}\n{% set deal_columns = deal_columns | unique | list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_deal_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n {% for col in deal_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'deal_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_deal_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2021-01-12' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n , max(case when lower(field_name) = 'deal_pipeline_id' then new_value end) as deal_pipeline_id\n , max(case when lower(field_name) = 'pipeline_stage_id' then new_value end) as pipeline_stage_id\n , max(case when lower(field_name) = 'amount' then new_value end) as amount\n , max(case when lower(field_name) = 'amount_in_home_currency' then new_value end) as amount_in_home_currency\n , max(case when lower(field_name) = 'owner_id' then new_value end) as owner_id\n , max(case when lower(field_name) = 'hubspot_team_id' then new_value end) as hubspot_team_id\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__company_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__company_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__company_calendar_spine.sql", "original_file_path": "models/sales/intermediate/int_hubspot__company_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__company_calendar_spine", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__company_calendar_spine"], "alias": "int_hubspot__company_calendar_spine", "checksum": {"name": "sha256", "checksum": "2c227c945377693db78f548782a95758b54df2ff71e200d3e751b64511b87c65"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.7054775, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__company_calendar_spine\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__company') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(created_date as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__company') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), company as (\n\n select\n *\n from {{ ref('stg_hubspot__company') }}\n where not coalesce(is_company_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n company.company_id,\n company.source_relation\n from calendar\n inner join company\n on cast(calendar.date_day as date) >= cast(company.created_date as date)\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','company_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company", "package": null, "version": null}, {"name": "stg_hubspot__company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__company"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__company_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3871\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), company as (\n\n select\n *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n where not coalesce(is_company_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n company.company_id,\n company.source_relation\n from calendar\n inner join company\n on cast(calendar.date_day as date) >= cast(company.created_date as date)\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_company_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_company_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_company_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_company_history"], "alias": "int_hubspot__daily_company_history", "checksum": {"name": "sha256", "checksum": "891ecd507d3bdc1cce4dffb83467538a22861321460d1528a6fd06bb4e7c21b9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.728448, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_company_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\n{% set company_columns = (['hubspot_owner_id', 'lifecyclestage'] + var('hubspot__company_property_history_columns', [])) | unique | list %}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__company_property_history') }}\n\n where lower(field_name) in ({{ \"'\" ~ company_columns | join(\"', '\") ~ \"'\" }})\n\n {% if is_incremental() %}\n and cast(change_timestamp as date) >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(change_timestamp as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), windows as (\n\n select\n source_relation,\n cast({{ dbt.date_trunc('day', 'change_timestamp') }} as date) as date_day,\n company_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, company_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n company_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','company_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.stg_hubspot__company_property_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_company_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history\"\n\n where lower(field_name) in ('hubspot_owner_id', 'lifecyclestage')\n\n \n and cast(change_timestamp as date) >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), windows as (\n\n select\n source_relation,\n cast(date_trunc('day', change_timestamp) as date) as date_day,\n company_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, company_id, field_name \n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n company_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__engagement_metrics__by_company_list": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__engagement_metrics__by_company_list", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__engagement_metrics__by_company_list.sql", "original_file_path": "models/sales/intermediate/int_hubspot__engagement_metrics__by_company_list.sql", "unique_id": "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__engagement_metrics__by_company_list"], "alias": "int_hubspot__engagement_metrics__by_company_list", "checksum": {"name": "sha256", "checksum": "6e567b60e778e7484766beb907276a0d2cfe727d899e7087b0e8f3ac176a7353"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.7477984, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'hubspot_sales_enabled',\n 'hubspot_company_list_member_enabled',\n 'hubspot_engagement_enabled',\n 'hubspot_engagement_company_enabled'\n])) }}\n\nwith company_list_member as (\n\n select *\n from {{ ref('stg_hubspot__company_list_member') }}\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_companies as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n {{ engagements_aggregated('company_list_engagements', 'company_list_id') }}\n\n)\n\nselect *\nfrom engagement_metrics", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list_member", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_aggregated"], "nodes": ["model.hubspot.stg_hubspot__company_list_member", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__engagement_metrics__by_company_list.sql", "compiled": true, "compiled_code": "\n\nwith company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n \n\n select\n source_relation,\n company_list_id,\n count(case when engagement_type = 'NOTE' then company_list_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_list_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_list_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_list_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_list_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_list_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_list_id end) as count_engagement_forwarded_emails\n from company_list_engagements\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__deal_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__deal_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__deal_calendar_spine.sql", "original_file_path": "models/sales/intermediate/int_hubspot__deal_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__deal_calendar_spine", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__deal_calendar_spine"], "alias": "int_hubspot__deal_calendar_spine", "checksum": {"name": "sha256", "checksum": "3e10808ce86fe4a06008768cb8a883bb4a0ced651f51b1b43677e05d55d8b9f5"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.7561216, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__deal_calendar_spine\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__deal') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(created_date as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__deal') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), deal as (\n\n select\n *,\n cast( {{ dbt.date_trunc('day', \"case when closed_date is null then \" ~ dbt.current_timestamp_backcompat() ~ \" else closed_date end\") }} as date) as open_until\n from {{ ref('stg_hubspot__deal') }}\n where not coalesce(is_deal_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n deal.deal_id,\n deal.source_relation\n from calendar\n inner join deal\n on cast(calendar.date_day as date) >= cast(deal.created_date as date)\n and cast(calendar.date_day as date) <= {{ dbt.dateadd('day', var('deal_history_extension_days', 30), 'deal.open_until') }}\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','deal_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal", "package": null, "version": null}, {"name": "stg_hubspot__deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt.current_timestamp_backcompat", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__deal"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__deal_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3871\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), deal as (\n\n select\n *,\n cast( date_trunc('day', case when closed_date is null then \n current_timestamp::timestamp\n else closed_date end) as date) as open_until\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n where not coalesce(is_deal_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n deal.deal_id,\n deal.source_relation\n from calendar\n inner join deal\n on cast(calendar.date_day as date) >= cast(deal.created_date as date)\n and cast(calendar.date_day as date) <= \n\n deal.open_until + ((interval '1 day') * (30))\n\n\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__pivot_daily_company_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_company_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__pivot_daily_company_history"], "alias": "int_hubspot__pivot_daily_company_history", "checksum": {"name": "sha256", "checksum": "c7a2ae961c2b322c453b2182a107b4c8787aed957c7ef54167781e1f08c2713c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034518.7811258, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_company_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set company_columns = (['hubspot_owner_id', 'lifecyclestage'] + var('hubspot__company_property_history_columns', [])) | unique | list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_company_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n company_id\n\n {% for col in company_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'company_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_company_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n company_id\n\n , max(case when lower(field_name) = 'hubspot_owner_id' then new_value end) as hubspot_owner_id\n , max(case when lower(field_name) = 'lifecyclestage' then new_value end) as lifecyclestage\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__deal_history.sql", "original_file_path": "models/sales/history/hubspot__deal_history.sql", "unique_id": "model.hubspot.hubspot__deal_history", "fqn": ["hubspot", "sales", "history", "hubspot__deal_history"], "alias": "hubspot__deal_history", "checksum": {"name": "sha256", "checksum": "ef17ec6d99b5127bb235c5f6d4844cf618f5fda04f6f32c818f40b03ebca42ef"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to deal record in Hubspot; the grain of this model is deal_id -> field_name -> valid_to.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "valid_from": {"name": "valid_from", "description": "The timestamp the change was valid from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "valid_to": {"name": "valid_to", "description": "The timestamp the change was valid to. Null if still valid.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "id": {"name": "id", "description": "The ID of the change. Hashed on `source_relation`, `field_name`, `deal_id`, and `valid_from`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5815427, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__deal_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__deal_property_history') }}\n\n), windows as (\n\n select\n source_relation,\n deal_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by deal_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n {{ dbt_utils.generate_surrogate_key(['field_name','deal_id','valid_from','source_relation']) }} as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__deal_property_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__deal_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history\"\n\n), windows as (\n\n select\n source_relation,\n deal_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by deal_id, field_name order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_from as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["id"], "time_spine": null}, "model.hubspot.hubspot__daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__daily_company_history.sql", "original_file_path": "models/sales/history/hubspot__daily_company_history.sql", "unique_id": "model.hubspot.hubspot__daily_company_history", "fqn": ["hubspot", "sales", "history", "hubspot__daily_company_history"], "alias": "hubspot__daily_company_history", "checksum": {"name": "sha256", "checksum": "3a5ff851ed81f92a6b4381a7cdcc9ba422ab69984a47124d896da0ce06e1c6e4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "company_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a company's day in Hubspot with tracked properties pivoted into columns. By default, tracks the company's owner and lifecycle stage on each day.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_day_id": {"name": "company_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `company_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the company had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "Unique id of a company in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_owner_id": {"name": "hubspot_owner_id", "description": "The ID of the company owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lifecyclestage": {"name": "lifecyclestage", "description": "The lifecycle stage of the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the company owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the company owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The number of notes logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The number of tasks logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The number of calls logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The number of meetings logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The number of emails logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The number of incoming emails logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The number of forwarded emails logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_communications": {"name": "count_engagement_communications", "description": "The number of communication engagements logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "company_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5793483, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='company_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_company_history')) -%}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled']) %}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_company_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no company fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__company_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owner as (\n\n select *\n from {{ ref('stg_hubspot__owner') }}\n\n{% endif %}\n\n{% if engagements_enabled %}\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_engagement_metrics__by_company') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.company_id\n {% if is_incremental() %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n\n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.company_id = change_data.company_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n {% if is_incremental() %}\n left join most_recent_data\n on calendar.company_id = most_recent_data.company_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by company_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by company_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.company_id\n\n {% if var('hubspot_owner_enabled', true) %}\n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n {% endif %}\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.{{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else fill_values.{{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n {% if engagements_enabled %}\n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n {% if var('hubspot_engagement_communication_enabled', false) %}\n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n {% endif %}\n {% endif %}\n\n from fill_values\n\n {% if var('hubspot_owner_enabled', true) %}\n left join owner\n on cast(fill_values.hubspot_owner_id as {{ dbt.type_string() }}) = cast(owner.owner_id as {{ dbt.type_string() }})\n and fill_values.source_relation = owner.source_relation\n {% endif %}\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on fill_values.company_id = engagement_metrics.company_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','company_id','source_relation']) }} as company_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_company_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_company_history", "package": null, "version": null}, {"name": "int_hubspot__company_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "int_hubspot__daily_engagement_metrics__by_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.type_string", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__scd_daily_company_history", "model.hubspot.int_hubspot__company_calendar_spine", "model.hubspot.stg_hubspot__owner", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__daily_company_history.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_hubspot__daily_engagement_metrics__by_company as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_company_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no company fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__company_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n), owner as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_engagement_metrics__by_company\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.company_id\n \n \n , coalesce(change_data.hubspot_owner_id, most_recent_data.hubspot_owner_id) as hubspot_owner_id\n \n , coalesce(change_data.lifecyclestage, most_recent_data.lifecyclestage) as lifecyclestage\n \n\n \n\n from calendar\n left join change_data\n on calendar.company_id = change_data.company_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n \n left join most_recent_data\n on calendar.company_id = most_recent_data.company_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n \n , hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hubspot_owner_id is null then 0 else 1 end) over (\n partition by company_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_partition\n \n , lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum(case when joined.lifecyclestage is null then 0 else 1 end) over (\n partition by company_id \n order by date_day rows unbounded preceding) as lifecyclestage_partition\n \n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n \n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by company_id, hubspot_owner_id_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n \n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by company_id, lifecyclestage_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n \n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.company_id\n\n \n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n \n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hubspot_owner_id as TEXT ) = 'is_null' then null else fill_values.hubspot_owner_id end as hubspot_owner_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.lifecyclestage as TEXT ) = 'is_null' then null else fill_values.lifecyclestage end as lifecyclestage\n \n\n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n \n \n\n from fill_values\n\n \n left join owner\n on cast(fill_values.hubspot_owner_id as TEXT) = cast(owner.owner_id as TEXT)\n and fill_values.source_relation = owner.source_relation\n \n\n \n left join engagement_metrics\n on fill_values.company_id = engagement_metrics.company_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n \n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as company_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "sql": " __dbt__cte__int_hubspot__daily_engagement_metrics__by_company as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["company_day_id"], "time_spine": null}, "model.hubspot.hubspot__daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__daily_deal_history.sql", "original_file_path": "models/sales/history/hubspot__daily_deal_history.sql", "unique_id": "model.hubspot.hubspot__daily_deal_history", "fqn": ["hubspot", "sales", "history", "hubspot__daily_deal_history"], "alias": "hubspot__daily_deal_history", "checksum": {"name": "sha256", "checksum": "0cdfa503bca67dab93e4447c8d86bf2ffbb63edf7fed3ef017922e497cda52f2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "deal_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a deal's day in Hubspot with tracked properties pivoted into columns. By default, tracks the deal's pipeline, pipeline stage, amount, team, and owner on each day.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "deal_day_id": {"name": "deal_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `deal_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the deal had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "Unique id of a deal in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deal_closed": {"name": "is_deal_closed", "description": "Boolean indicating whether the deal's pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount": {"name": "amount", "description": "The amount of the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the deal pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the deal's stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "ID of the deal pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_id": {"name": "pipeline_stage_id", "description": "ID of the deal pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount_in_home_currency": {"name": "amount_in_home_currency", "description": "The amount of the deal in the account's home currency on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the deal owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the deal owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_team_name": {"name": "hubspot_team_name", "description": "The name of the Hubspot team associated with the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_team_id": {"name": "hubspot_team_id", "description": "The ID of the Hubspot team associated with the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "Number of notes logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "Number of tasks logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "Number of calls logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "Number of meetings logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "Number of outbound emails logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "Number of inbound emails logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "Number of forwarded emails logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_communications": {"name": "count_engagement_communications", "description": "Number of communications (LinkedIn, WhatsApp, SMS) logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "deal_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5776625, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='deal_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_deal_history')) -%}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled']) %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_deal_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no deal fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__deal_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n), pipeline as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline') }}\n\n), pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage') }}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owner as (\n\n select *\n from {{ ref('stg_hubspot__owner') }}\n\n{% endif %}\n\n{% if var('hubspot_team_enabled', true) %}\n), team as (\n\n select *\n from {{ ref('stg_hubspot__team') }}\n\n{% endif %}\n\n{% if engagements_enabled %}\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_engagement_metrics__by_deal') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.deal_id\n {% if is_incremental() %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n\n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.deal_id = change_data.deal_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n {% if is_incremental() %}\n left join most_recent_data\n on calendar.deal_id = most_recent_data.deal_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by deal_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by deal_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.deal_id,\n pipeline_stage.is_closed as is_deal_closed,\n pipeline.pipeline_label as pipeline_label,\n pipeline_stage.pipeline_stage_label as pipeline_stage_label\n \n {% if var('hubspot_owner_enabled', true) %}\n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n {% endif %}\n\n {% if var('hubspot_team_enabled', true) %}\n , team.team_name as hubspot_team_name\n {% endif %}\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.{{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else fill_values.{{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n {% if engagements_enabled %}\n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n {% if var('hubspot_engagement_communication_enabled', false) %}\n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n {% endif %}\n {% endif %}\n\n from fill_values\n\n left join pipeline\n on fill_values.deal_pipeline_id = pipeline.deal_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.pipeline_stage_id = pipeline_stage.deal_pipeline_stage_id\n and fill_values.source_relation = pipeline_stage.source_relation\n \n {% if var('hubspot_owner_enabled', true) %}\n left join owner\n on cast(fill_values.owner_id as {{ dbt.type_string() }}) = cast(owner.owner_id as {{ dbt.type_string() }})\n and fill_values.source_relation = owner.source_relation\n {% endif %}\n\n {% if var('hubspot_team_enabled', true) %}\n left join team\n on cast(fill_values.hubspot_team_id as {{ dbt.type_string() }}) = cast(team.team_id as {{ dbt.type_string() }})\n and fill_values.source_relation = team.source_relation\n {% endif %}\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on fill_values.deal_id = engagement_metrics.deal_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','deal_id','source_relation']) }} as deal_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_deal_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_deal_history", "package": null, "version": null}, {"name": "int_hubspot__deal_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}, {"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "stg_hubspot__team", "package": null, "version": null}, {"name": "int_hubspot__daily_engagement_metrics__by_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.type_string", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__scd_daily_deal_history", "model.hubspot.int_hubspot__deal_calendar_spine", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__team", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__daily_deal_history.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_hubspot__daily_engagement_metrics__by_deal as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_deal_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no deal fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__deal_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\n\n), pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\n\n\n), owner as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n\n), team as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team\"\n\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_engagement_metrics__by_deal\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-06' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.deal_id\n \n \n , coalesce(change_data.deal_pipeline_id, most_recent_data.deal_pipeline_id) as deal_pipeline_id\n \n , coalesce(change_data.pipeline_stage_id, most_recent_data.pipeline_stage_id) as pipeline_stage_id\n \n , coalesce(change_data.amount, most_recent_data.amount) as amount\n \n , coalesce(change_data.amount_in_home_currency, most_recent_data.amount_in_home_currency) as amount_in_home_currency\n \n , coalesce(change_data.owner_id, most_recent_data.owner_id) as owner_id\n \n , coalesce(change_data.hubspot_team_id, most_recent_data.hubspot_team_id) as hubspot_team_id\n \n\n \n\n from calendar\n left join change_data\n on calendar.deal_id = change_data.deal_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n \n left join most_recent_data\n on calendar.deal_id = most_recent_data.deal_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n \n , deal_pipeline_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.deal_pipeline_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as deal_pipeline_id_partition\n \n , pipeline_stage_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.pipeline_stage_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as pipeline_stage_id_partition\n \n , amount\n -- create a batch/partition once a new value is provided\n , sum(case when joined.amount is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as amount_partition\n \n , amount_in_home_currency\n -- create a batch/partition once a new value is provided\n , sum(case when joined.amount_in_home_currency is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as amount_in_home_currency_partition\n \n , owner_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.owner_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as owner_id_partition\n \n , hubspot_team_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hubspot_team_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as hubspot_team_id_partition\n \n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n \n -- grab the value that started this batch/partition\n , first_value( deal_pipeline_id ) over (\n partition by deal_id, deal_pipeline_id_partition \n order by date_day asc rows between unbounded preceding and current row) as deal_pipeline_id\n \n -- grab the value that started this batch/partition\n , first_value( pipeline_stage_id ) over (\n partition by deal_id, pipeline_stage_id_partition \n order by date_day asc rows between unbounded preceding and current row) as pipeline_stage_id\n \n -- grab the value that started this batch/partition\n , first_value( amount ) over (\n partition by deal_id, amount_partition \n order by date_day asc rows between unbounded preceding and current row) as amount\n \n -- grab the value that started this batch/partition\n , first_value( amount_in_home_currency ) over (\n partition by deal_id, amount_in_home_currency_partition \n order by date_day asc rows between unbounded preceding and current row) as amount_in_home_currency\n \n -- grab the value that started this batch/partition\n , first_value( owner_id ) over (\n partition by deal_id, owner_id_partition \n order by date_day asc rows between unbounded preceding and current row) as owner_id\n \n -- grab the value that started this batch/partition\n , first_value( hubspot_team_id ) over (\n partition by deal_id, hubspot_team_id_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_team_id\n \n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.deal_id,\n pipeline_stage.is_closed as is_deal_closed,\n pipeline.pipeline_label as pipeline_label,\n pipeline_stage.pipeline_stage_label as pipeline_stage_label\n \n \n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n \n\n \n , team.team_name as hubspot_team_name\n \n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.deal_pipeline_id as TEXT ) = 'is_null' then null else fill_values.deal_pipeline_id end as deal_pipeline_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.pipeline_stage_id as TEXT ) = 'is_null' then null else fill_values.pipeline_stage_id end as pipeline_stage_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.amount as TEXT ) = 'is_null' then null else fill_values.amount end as amount\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.amount_in_home_currency as TEXT ) = 'is_null' then null else fill_values.amount_in_home_currency end as amount_in_home_currency\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.owner_id as TEXT ) = 'is_null' then null else fill_values.owner_id end as owner_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hubspot_team_id as TEXT ) = 'is_null' then null else fill_values.hubspot_team_id end as hubspot_team_id\n \n\n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n \n \n\n from fill_values\n\n left join pipeline\n on fill_values.deal_pipeline_id = pipeline.deal_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.pipeline_stage_id = pipeline_stage.deal_pipeline_stage_id\n and fill_values.source_relation = pipeline_stage.source_relation\n \n \n left join owner\n on cast(fill_values.owner_id as TEXT) = cast(owner.owner_id as TEXT)\n and fill_values.source_relation = owner.source_relation\n \n\n \n left join team\n on cast(fill_values.hubspot_team_id as TEXT) = cast(team.team_id as TEXT)\n and fill_values.source_relation = team.source_relation\n \n\n \n left join engagement_metrics\n on fill_values.deal_id = engagement_metrics.deal_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n \n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as deal_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "sql": " __dbt__cte__int_hubspot__daily_engagement_metrics__by_deal as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["deal_day_id"], "time_spine": null}, "model.hubspot.hubspot__company_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__company_history.sql", "original_file_path": "models/sales/history/hubspot__company_history.sql", "unique_id": "model.hubspot.hubspot__company_history", "fqn": ["hubspot", "sales", "history", "hubspot__company_history"], "alias": "hubspot__company_history", "checksum": {"name": "sha256", "checksum": "ea0904e41c60d530145fd51c6691675ae221e252e035226e46229c5b3d767608"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to company record in Hubspot; the grain of this model is company_id -> field_name -> valid_to.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "valid_from": {"name": "valid_from", "description": "The timestamp the change was valid from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "valid_to": {"name": "valid_to", "description": "The timestamp the change was valid to. Null if still valid.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "id": {"name": "id", "description": "The ID of the change. Hashed on `source_relation`, `field_name`, `company_id`, and `valid_from`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.5804183, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__company_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled','hubspot_company_property_history_enabled'])) }}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__company_property_history') }}\n\n), windows as (\n\n select\n source_relation,\n company_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by company_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select\n windows.*,\n {{ dbt_utils.generate_surrogate_key(['field_name','company_id','valid_from','source_relation']) }} as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__company_property_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__company_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history\"\n\n), windows as (\n\n select\n source_relation,\n company_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by company_id, field_name order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select\n windows.*,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_from as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["id"], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_pipeline.sql", "original_file_path": "models/staging/stg_hubspot__ticket_pipeline.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_pipeline"], "alias": "stg_hubspot__ticket_pipeline", "checksum": {"name": "sha256", "checksum": "985df2ffeedd5a02236306fcdffe12d4faf2587a47908176561b05619800f99a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket pipeline.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_ticket_pipeline_deleted": {"name": "is_ticket_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "Reference to the object type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "Reference to the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_created_at": {"name": "ticket_pipeline_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_updated_at": {"name": "ticket_pipeline_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.223687, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_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_hubspot__ticket_pipeline_tmp')),\n staging_columns=get_ticket_pipeline_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(pipeline_id as {{ dbt.type_string() }}) as ticket_pipeline_id,\n _fivetran_deleted as is_ticket_pipeline_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n object_type_id,\n created_at as ticket_pipeline_created_at,\n updated_at as ticket_pipeline_updated_at\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_pipeline_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_pipeline_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__ticket_pipeline_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_pipeline.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n display_order as display_order,\n label as label,\n object_type_id as object_type_id,\n pipeline_id as pipeline_id,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(pipeline_id as TEXT) as ticket_pipeline_id,\n _fivetran_deleted as is_ticket_pipeline_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n object_type_id,\n created_at as ticket_pipeline_created_at,\n updated_at as ticket_pipeline_updated_at\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__owner.sql", "original_file_path": "models/staging/stg_hubspot__owner.sql", "unique_id": "model.hubspot.stg_hubspot__owner", "fqn": ["hubspot", "staging", "stg_hubspot__owner"], "alias": "stg_hubspot__owner", "checksum": {"name": "sha256", "checksum": "c088422e9dc69517a97a618f70371a51a209061a57b7e656b6b832b5a7abd03e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an owner/user in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "owner_id": {"name": "owner_id", "description": "The ID of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active_user_id": {"name": "active_user_id", "description": "ID of the active user account associated with the owner. Null if owner is not an active user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp for when the owner was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_address": {"name": "email_address", "description": "The email address of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "full_name": {"name": "full_name", "description": "Full name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "owner_type": {"name": "owner_type", "description": "The type of owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp for when the owner was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__owner.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_owner_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.269894, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"", "raw_code": "{{ config(enabled=var('hubspot_owner_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__owner_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__owner_tmp')),\n staging_columns=get_owner_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n owner_id,\n active_user_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n email as email_address,\n first_name,\n last_name,\n portal_id,\n type as owner_type,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_timestamp,\n trim( {{ dbt.concat(['first_name', \"' '\", 'last_name']) }} ) as full_name\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner_tmp", "package": null, "version": null}, {"name": "stg_hubspot__owner_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_owner_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.concat"], "nodes": ["model.hubspot.stg_hubspot__owner_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__owner.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n active_user_id as active_user_id,\n created_at as created_at,\n email as email,\n first_name as first_name,\n last_name as last_name,\n owner_id as owner_id,\n portal_id as portal_id,\n type as type,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n owner_id,\n active_user_id,\n cast(created_at as timestamp) as created_timestamp,\n email as email_address,\n first_name,\n last_name,\n portal_id,\n type as owner_type,\n cast(updated_at as timestamp) as updated_timestamp,\n trim( first_name || ' ' || last_name ) as full_name\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_communication": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_communication.sql", "original_file_path": "models/staging/stg_hubspot__engagement_communication.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_communication", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_communication"], "alias": "stg_hubspot__engagement_communication", "checksum": {"name": "sha256", "checksum": "77a4704116845625234bc68ceb5ac6e881707e3ed960194a2ad8529b1ba08cd1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a communication and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "engagement_id": {"name": "engagement_id", "description": "ID of the engagement associated with the communication.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6895204, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"", "raw_code": "{{ config(enabled=var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_communication_tmp') }}\n\n), macro as (\n\n select \n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_communication_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_communication_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_communication_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_communication_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_engagement_communication_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_communication_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_communication.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication_tmp\"\n\n), macro as (\n\n select \n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n engagement_id as engagement_id,\n type as engagement_type,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n cast(null as integer) as owner_id,\n cast(null as integer) as team_id\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_dropped": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_dropped.sql", "original_file_path": "models/staging/stg_hubspot__email_event_dropped.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_dropped", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_dropped"], "alias": "stg_hubspot__email_event_dropped", "checksum": {"name": "sha256", "checksum": "b0a8635b4b62a78829eccd6193beb24eed13e289efc570f4c4544729a768f942"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DROPPED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_message": {"name": "drop_message", "description": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_reason": {"name": "drop_reason", "description": "The reason why the email message was dropped. See below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_dropped_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6229029, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_dropped_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_dropped_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_dropped_tmp')),\n staging_columns=get_email_event_dropped_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n drop_message,\n drop_reason,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_dropped_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_dropped_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_dropped_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_dropped_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_dropped_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_dropped.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n bcc as bcc,\n cc as cc,\n drop_message as drop_message,\n drop_reason as drop_reason,\n id as id,\n reply_to as reply_to,\n subject as subject,\n \n \"from\" as from_email\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n drop_message,\n drop_reason,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_dropped_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_company.sql", "original_file_path": "models/staging/stg_hubspot__engagement_company.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_company", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_company"], "alias": "stg_hubspot__engagement_company", "checksum": {"name": "sha256", "checksum": "d61ff68e4e26d51ad63f67488a3de32bca04ebfd08df73e38de2aaaad95437cd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a company and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6907678, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_company_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company_tmp') }}\n\n), macro as (\n\n select \n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_company_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_company_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_company_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_company_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company_tmp\"\n\n), macro as (\n\n select \n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n company_id as company_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n \n \n\n \n \n , \"engagement_type\"\n , \"type_id\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_click": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_click.sql", "original_file_path": "models/staging/stg_hubspot__email_event_click.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_click", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_click"], "alias": "stg_hubspot__email_event_click", "checksum": {"name": "sha256", "checksum": "2e7c2223e61c84871af323ce9401701cb237c9affdb8db16c9e3fe402a71e94d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CLICK email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "click_url": {"name": "click_url", "description": "The URL within the message that the recipient clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "referer_url": {"name": "referer_url", "description": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_click_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6201167, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_click_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_click_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_click_tmp')),\n staging_columns=get_email_event_click_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n referer as referer_url,\n url as click_url,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_click_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_click_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_click_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_click_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_click.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n id as id,\n ip_address as ip_address,\n location as location,\n referer as referer,\n url as url,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n referer as referer_url,\n url as click_url,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_delivered": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_delivered.sql", "original_file_path": "models/staging/stg_hubspot__email_event_delivered.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_delivered", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_delivered"], "alias": "stg_hubspot__email_event_delivered", "checksum": {"name": "sha256", "checksum": "ec08b5a3a6db2b244ea6fbfaa4ddcdb944b4f4b755b19082ce67169d15333e47"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DELIVERED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "smtp_id": {"name": "smtp_id", "description": "An ID attached to the message by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_delivered_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.62177, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_delivered_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_delivered_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_delivered_tmp')),\n staging_columns=get_email_event_delivered_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as event_id,\n response as returned_response,\n smtp_id\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_delivered_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_delivered_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_delivered_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_delivered_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_delivered.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n response as response,\n smtp_id as smtp_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as event_id,\n response as returned_response,\n smtp_id\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__merged_deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__merged_deal.sql", "original_file_path": "models/staging/stg_hubspot__merged_deal.sql", "unique_id": "model.hubspot.stg_hubspot__merged_deal", "fqn": ["hubspot", "staging", "stg_hubspot__merged_deal"], "alias": "stg_hubspot__merged_deal", "checksum": {"name": "sha256", "checksum": "802fd9a3593572cde1b70000654b30b224d0db8d8ab950a5028cc8fa093bd0ef"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal that has been merged along with the related deal it's been merged into.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "merged_deal_id": {"name": "merged_deal_id", "description": "ID of deal that has been merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal the record has been merged INTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.239313, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_hubspot__merged_deal_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__merged_deal_tmp')),\n staging_columns=get_merged_deal_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n \n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n deal_id,\n merged_deal_id\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__merged_deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__merged_deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_merged_deal_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__merged_deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__merged_deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n deal_id as deal_id,\n merged_deal_id as merged_deal_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n \n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n deal_id,\n merged_deal_id\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__users": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__users", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__users.sql", "original_file_path": "models/staging/stg_hubspot__users.sql", "unique_id": "model.hubspot.stg_hubspot__users", "fqn": ["hubspot", "staging", "stg_hubspot__users"], "alias": "stg_hubspot__users", "checksum": {"name": "sha256", "checksum": "fafc0dad48f3b9cf46b64782015bb2b6ab4dac633dd815ef6c9e98d9dc3b46ff"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing information about HubSpot users.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "primary_team_id": {"name": "primary_team_id", "description": "ID of the user's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "role_id": {"name": "role_id", "description": "ID of the role assigned to the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "First name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "Last name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2589722, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__users\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__users_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__users_tmp')),\n staging_columns=get_users_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n id as user_id,\n primary_team_id,\n role_id,\n email,\n first_name,\n last_name,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__users_tmp", "package": null, "version": null}, {"name": "stg_hubspot__users_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_users_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__users_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__users.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__users_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as id,\n primary_team_id as primary_team_id,\n role_id as role_id,\n email as email,\n first_name as first_name,\n last_name as last_name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as user_id,\n primary_team_id,\n role_id,\n email,\n first_name,\n last_name,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_property_history.sql", "original_file_path": "models/staging/stg_hubspot__ticket_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_property_history"], "alias": "stg_hubspot__ticket_property_history", "checksum": {"name": "sha256", "checksum": "f1f3edc0158c77f15d7ca1bf45ef243f40bf5472ffb4efdaf7ec68d1b1cc0a2b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to ticket record in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2190924, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_property_history_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_property_history_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_property_history_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_property_history_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_property_history_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n ticket_id as ticket_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n timestamp_instant as change_timestamp,\n value as new_value\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_contact.sql", "original_file_path": "models/staging/stg_hubspot__ticket_contact.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_contact", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_contact"], "alias": "stg_hubspot__ticket_contact", "checksum": {"name": "sha256", "checksum": "cfbd6d8d4faac35687de4617a29f6e8fd55317664869da22093e75fd2de7970d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and a contact.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.216387, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_contact_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_contact_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_contact_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_contact_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_contact_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n contact_id as contact_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__role": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__role", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__role.sql", "original_file_path": "models/staging/stg_hubspot__role.sql", "unique_id": "model.hubspot.stg_hubspot__role", "fqn": ["hubspot", "staging", "stg_hubspot__role"], "alias": "stg_hubspot__role", "checksum": {"name": "sha256", "checksum": "2cafaac60a557b2411f76e348c018f76a99502c1343425dd72413c767c4a8a5b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing role information for HubSpot users.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "role_id": {"name": "role_id", "description": "Unique ID of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "role_name": {"name": "role_name", "description": "Name of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requires_billing_write": {"name": "requires_billing_write", "description": "Indicates whether the role requires billing write access.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2558827, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__role\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__role_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__role_tmp')),\n staging_columns=get_role_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n id as role_id,\n name as role_name,\n requires_billing_write,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__role_tmp", "package": null, "version": null}, {"name": "stg_hubspot__role_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_role_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__role_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__role.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__role_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as id,\n name as name,\n requires_billing_write as requires_billing_write\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as role_id,\n name as role_name,\n requires_billing_write,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_property_history.sql", "original_file_path": "models/staging/stg_hubspot__deal_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__deal_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__deal_property_history"], "alias": "stg_hubspot__deal_property_history", "checksum": {"name": "sha256", "checksum": "b3cb2b2e833cfcb1c8d8b97b8d2ae7049010a931937db32b999225ea19cc3a5f"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents the details of your deal properties.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the deal property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2384768, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_property_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_property_history_tmp')),\n staging_columns=get_deal_property_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n deal_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as {{ dbt.type_timestamp() }}) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_deal_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_property_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n deal_id as deal_id,\n name as name,\n source as source,\n source_id as source_id,\n timestamp as change_timestamp,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n deal_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as timestamp) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_deal_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company_list.sql", "original_file_path": "models/staging/stg_hubspot__company_list.sql", "unique_id": "model.hubspot.stg_hubspot__company_list", "fqn": ["hubspot", "staging", "stg_hubspot__company_list"], "alias": "stg_hubspot__company_list", "checksum": {"name": "sha256", "checksum": "da61590003830d5b6362c4d3430149a827401637dd57a93a202adbc118b401dc"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company list in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_list_id": {"name": "company_list_id", "description": "The ID of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_name": {"name": "company_list_name", "description": "The name of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_company_list_deleted": {"name": "is_company_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.7182558, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_list_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_tmp')),\n staging_columns=get_company_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_tmp')),\n staging_columns=get_company_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__company_list_tmp',get_company_list_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_company_list_columns()) %}\n {{\n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_tmp')),\n prefix='property_', exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n company_list_id,\n company_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_company_list_deleted,\n cast(updated_timestamp as {{ dbt.type_timestamp() }}) as updated_timestamp,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(created_timestamp as {{ dbt.type_timestamp() }}) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__company_list_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__company_list_pass_through_columns') }}\n\n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__company_list_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_list_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_list_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__company_list_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company_list.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as is_company_list_deleted,\n _fivetran_synced as _fivetran_synced,\n created_at as created_timestamp,\n id as company_list_id,\n name as company_list_name,\n updated_at as updated_timestamp,\n created_by_id as created_by_id,\n filters_updated_at as filters_updated_at,\n list_version as list_version,\n object_type_id as object_type_id,\n processing_status as processing_status,\n processing_type as processing_type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n company_list_id,\n company_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_company_list_deleted,\n cast(updated_timestamp as timestamp) as updated_timestamp,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(created_timestamp as timestamp) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__company_list_pass_through_columns variable into the staging model\n \n\n\n\n\n\n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__team.sql", "original_file_path": "models/staging/stg_hubspot__team.sql", "unique_id": "model.hubspot.stg_hubspot__team", "fqn": ["hubspot", "staging", "stg_hubspot__team"], "alias": "stg_hubspot__team", "checksum": {"name": "sha256", "checksum": "68500ef68ac05d5e84e03646a9a1d902759afd66cc020db81098a46da27a9099"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing HubSpot team details.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "team_id": {"name": "team_id", "description": "Unique ID of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_name": {"name": "team_name", "description": "Name of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2570171, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__team_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__team_tmp')),\n staging_columns=get_team_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n id as team_id,\n name as team_name,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__team_tmp", "package": null, "version": null}, {"name": "stg_hubspot__team_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_team_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__team_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as id,\n name as name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as team_id,\n name as team_name,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property_option": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property_option", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__property_option.sql", "original_file_path": "models/staging/stg_hubspot__property_option.sql", "unique_id": "model.hubspot.stg_hubspot__property_option", "fqn": ["hubspot", "staging", "stg_hubspot__property_option"], "alias": "stg_hubspot__property_option", "checksum": {"name": "sha256", "checksum": "408f91b58a765e41b01242b6c620ab39b4093e72085d358bd5de358ce23fc6c3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an option for the related property.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "property_option_label": {"name": "property_option_label", "description": "The label of the option displayed inside the HubSpot app. Part of the composite primary key with `hubspot_object` and `property_option_name`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_id": {"name": "property_id", "description": "(DEPRECATED IN OCTOBER 2025) The ID of the related property. Use `hubspot_object` to join with the `PROPERTY` table instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Order of options displayed in Hubspot, starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hidden": {"name": "hidden", "description": "Boolean if the option will be displayed in HubSpot", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_option_value": {"name": "property_option_value", "description": "The internal value of the option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this option's property is related to other objects, the object will be listed here. Part of the primary key with `property_option_name` and `property_option_label`. Use `hubspot_object` to join with the `PROPERTY` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_option_name": {"name": "property_option_name", "description": "The internal name of the property option. Part of the primary key with `hubspot_object` and `property_option_label`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__property.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2309523, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property_option\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__property_option_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__property_option_tmp')),\n staging_columns=get_property_option_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n label as property_option_label,\n property_id,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n name as property_option_name,\n _fivetran_synced,\n display_order,\n hidden,\n value as property_option_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__property_option_tmp", "package": null, "version": null}, {"name": "stg_hubspot__property_option_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_property_option_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__property_option_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__property_option.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__property_option_tmp\"\n\n), macro as (\n\n select\n \n label as label,\n property_id as property_id,\n _fivetran_synced as _fivetran_synced,\n display_order as display_order,\n hidden as hidden,\n value as value,\n hubspot_object as hubspot_object,\n name as name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n label as property_option_label,\n property_id,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n name as property_option_name,\n _fivetran_synced,\n display_order,\n hidden,\n value as property_option_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_contact.sql", "original_file_path": "models/staging/stg_hubspot__deal_contact.sql", "unique_id": "model.hubspot.stg_hubspot__deal_contact", "fqn": ["hubspot", "staging", "stg_hubspot__deal_contact"], "alias": "stg_hubspot__deal_contact", "checksum": {"name": "sha256", "checksum": "fcc71b5d346daac85c2a885974fc0c0ef35ff9f89031c0ec15ac10cef92d1f58"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a deal and contact.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2373612, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_contact\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_contact_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_contact_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_contact_tmp')),\n staging_columns=get_deal_contact_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n contact_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_contact_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_contact_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n deal_id as deal_id,\n contact_id as contact_id,\n type_id as type_id,\n category as category\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n contact_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company.sql", "original_file_path": "models/staging/stg_hubspot__company.sql", "unique_id": "model.hubspot.stg_hubspot__company", "fqn": ["hubspot", "staging", "stg_hubspot__company"], "alias": "stg_hubspot__company", "checksum": {"name": "sha256", "checksum": "f05b02466adb98103af01cc197f92ffd1ba68c0bf32e9035cdc406487a376ebd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_company_deleted": {"name": "is_company_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_name": {"name": "company_name", "description": "The name of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A short statement about the company's mission and goals.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the company was added to your account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "industry": {"name": "industry", "description": "The type of business the company performs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "street_address": {"name": "street_address", "description": "The street address of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "street_address_2": {"name": "street_address_2", "description": "Additional address information for the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "city": {"name": "city", "description": "The city where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "state": {"name": "state", "description": "The state where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_annual_revenue": {"name": "company_annual_revenue", "description": "The actual or estimated annual revenue of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.723996, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')),\n staging_columns=get_company_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')),\n staging_columns=get_company_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__company_tmp',get_company_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_company_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')), \n prefix='property_', exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_company_columns.sql macro\n source_relation,\n company_id,\n coalesce(is_company_deleted, _fivetran_deleted) as is_company_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n company_name,\n description,\n created_date,\n industry,\n street_address,\n street_address_2,\n city,\n state,\n country,\n company_annual_revenue\n \n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__company_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__company_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__company_calculated_fields') }}\n \n from macro\n\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__company_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as company_id,\n is_deleted as is_company_deleted,\n property_name as company_name,\n property_description as description,\n property_createdate as created_date,\n property_industry as industry,\n property_address as street_address,\n property_address_2 as street_address_2,\n property_city as city,\n property_state as state,\n property_country as country,\n property_annualrevenue as company_annual_revenue\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_company_columns.sql macro\n source_relation,\n company_id,\n coalesce(is_company_deleted, _fivetran_deleted) as is_company_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n company_name,\n description,\n created_date,\n industry,\n street_address,\n street_address_2,\n city,\n state,\n country,\n company_annual_revenue\n \n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__company_calculated_fields variable.\n \n\n\n \n from macro\n\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket.sql", "original_file_path": "models/staging/stg_hubspot__ticket.sql", "unique_id": "model.hubspot.stg_hubspot__ticket", "fqn": ["hubspot", "staging", "stg_hubspot__ticket"], "alias": "stg_hubspot__ticket", "checksum": {"name": "sha256", "checksum": "1e991cb1e92b5bc6d5a62611a6c0237e7c251ff36d0536a6bfb76145b83eedca"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "ID of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_deleted": {"name": "is_ticket_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "closed_date": {"name": "closed_date", "description": "The date the ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_agent_reply_at": {"name": "first_agent_reply_at", "description": "the date for the first agent reply on the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "The ID of the ticket's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_id": {"name": "ticket_pipeline_stage_id", "description": "The ID of the ticket's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_priority": {"name": "ticket_priority", "description": "The priority of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_category": {"name": "ticket_category", "description": "The category of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_subject": {"name": "ticket_subject", "description": "Short summary of ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_content": {"name": "ticket_content", "description": "Text in body of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.220289, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__ticket_tmp')),\n staging_columns=get_ticket_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__ticket_tmp')),\n staging_columns=get_ticket_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__ticket_tmp',get_ticket_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__ticket_tmp')), \n prefix='property_', exclude=exclude_cols) \n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_ticket_columns.sql macro\n source_relation,\n ticket_id,\n coalesce(_fivetran_ticket_deleted, is_ticket_deleted) as is_ticket_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(closed_date as {{ dbt.type_timestamp() }}) as closed_date,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n first_agent_reply_at,\n cast(ticket_pipeline_id as {{ dbt.type_string() }}) as ticket_pipeline_id,\n cast(ticket_pipeline_stage_id as {{ dbt.type_string() }}) as ticket_pipeline_stage_id,\n ticket_category,\n ticket_priority,\n owner_id,\n ticket_subject,\n ticket_content\n\n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__ticket_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__ticket_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__ticket_calculated_fields') }}\n \n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__ticket_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__ticket_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as ticket_id,\n cast(null as boolean) as _fivetran_ticket_deleted,\n is_deleted as is_ticket_deleted,\n property_closed_date as closed_date,\n property_createdate as created_date,\n property_first_agent_reply_date as first_agent_reply_at,\n property_hs_pipeline as ticket_pipeline_id,\n property_hs_pipeline_stage as ticket_pipeline_stage_id,\n property_hs_ticket_category as ticket_category,\n property_hs_ticket_priority as ticket_priority,\n property_hubspot_owner_id as owner_id,\n property_subject as ticket_subject,\n property_content as ticket_content\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_ticket_columns.sql macro\n source_relation,\n ticket_id,\n coalesce(_fivetran_ticket_deleted, is_ticket_deleted) as is_ticket_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(closed_date as timestamp) as closed_date,\n cast(created_date as timestamp) as created_date,\n first_agent_reply_at,\n cast(ticket_pipeline_id as TEXT) as ticket_pipeline_id,\n cast(ticket_pipeline_stage_id as TEXT) as ticket_pipeline_stage_id,\n ticket_category,\n ticket_priority,\n owner_id,\n ticket_subject,\n ticket_content\n\n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__ticket_calculated_fields variable.\n \n\n\n \n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_list.sql", "original_file_path": "models/staging/stg_hubspot__contact_list.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list", "fqn": ["hubspot", "staging", "stg_hubspot__contact_list"], "alias": "stg_hubspot__contact_list", "checksum": {"name": "sha256", "checksum": "c6b22460d519ca6bff3a8fbf2a86009fe2c8da9a208987c95c8b2b6a4615c3f1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact list in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_list_deleted": {"name": "is_contact_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_name": {"name": "contact_list_name", "description": "The name of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6745028, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_list_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_tmp')),\n staging_columns=get_contact_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_tmp')),\n staging_columns=get_contact_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__contact_list_tmp',get_contact_list_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_contact_list_columns()) %}\n {{\n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_tmp')),\n prefix='property_', exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n contact_list_id,\n contact_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_contact_list_deleted,\n cast(updated_timestamp as {{ dbt.type_timestamp() }}) as updated_timestamp,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(created_timestamp as {{ dbt.type_timestamp() }}) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__contact_list_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__contact_list_pass_through_columns') }}\n\n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__contact_list_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_list_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_list_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__contact_list_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_list.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as is_contact_list_deleted,\n _fivetran_synced as _fivetran_synced,\n created_at as created_timestamp,\n id as contact_list_id,\n name as contact_list_name,\n updated_at as updated_timestamp,\n created_by_id as created_by_id,\n filters_updated_at as filters_updated_at,\n list_version as list_version,\n object_type_id as object_type_id,\n processing_status as processing_status,\n processing_type as processing_type,\n cast(null as boolean) as deleteable,\n cast(null as boolean) as dynamic,\n cast(null as integer) as portal_id,\n cast(null as TEXT) as metadata_error,\n cast(null as timestamp) as metadata_last_processing_state_change_at,\n cast(null as timestamp) as metadata_last_size_change_at,\n cast(null as TEXT) as metadata_processing,\n cast(null as integer) as metadata_size\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n contact_list_id,\n contact_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_contact_list_deleted,\n cast(updated_timestamp as timestamp) as updated_timestamp,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(created_timestamp as timestamp) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__contact_list_pass_through_columns variable into the staging model\n \n\n\n\n\n\n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_spam_report": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_spam_report.sql", "original_file_path": "models/staging/stg_hubspot__email_event_spam_report.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_spam_report"], "alias": "stg_hubspot__email_event_spam_report", "checksum": {"name": "sha256", "checksum": "3d014034096442b201bfda55682dc3d8f2f9423aa687fe6d3b09da777142b225"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SPAM_REPORT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_spam_report_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6274376, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_spam_report_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_spam_report_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_spam_report_tmp')),\n staging_columns=get_email_event_spam_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as event_id,\n ip_address,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_spam_report_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_spam_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_spam_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_spam_report_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_spam_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n ip_address as ip_address,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as event_id,\n ip_address,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_meeting": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_meeting.sql", "original_file_path": "models/staging/stg_hubspot__engagement_meeting.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_meeting", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_meeting"], "alias": "stg_hubspot__engagement_meeting", "checksum": {"name": "sha256", "checksum": "f5e29b639b861a01fe7ab64ac1b36f89356510cbe8b33b26ba269001a5d3806d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a MEETING engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the meeting's time of creation and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the meeting's time of occurrence and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the meeting. This field determines the user listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the meeting. This field determines the team listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_meeting_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6943254, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_meeting_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_meeting_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_meeting_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_meeting_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_meeting_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_meeting_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_meeting_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_meeting_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_meeting.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n cast(null as TEXT) as engagement_type,\n engagement_id as engagement_id,\n cast(null as timestamp) as created_timestamp,\n cast(null as timestamp) as occurred_timestamp,\n cast(null as integer) as owner_id,\n cast(null as integer) as team_id\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n , \"created_from_link_id\"\n , \"end_time\"\n , \"pre_meeting_prospect_reminders\"\n , \"source\"\n , \"source_id\"\n , \"start_time\"\n , \"web_conference_meeting_id\"\n , \"meeting_outcome\"\n , \"body\"\n , \"external_url\"\n , \"title\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_form_submission": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_form_submission.sql", "original_file_path": "models/staging/stg_hubspot__contact_form_submission.sql", "unique_id": "model.hubspot.stg_hubspot__contact_form_submission", "fqn": ["hubspot", "staging", "stg_hubspot__contact_form_submission"], "alias": "stg_hubspot__contact_form_submission", "checksum": {"name": "sha256", "checksum": "c9199d6b943e94e22cc3d2d9804c030f98ddce33e2e3beb361672182e8a9a7df"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing contact form submission information.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "conversion_id": {"name": "conversion_id", "description": "A Unique ID for the specific form conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The GUID of the form that the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_id": {"name": "page_id", "description": "The ID of the related page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL that the form was submitted on, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A Unix timestamp in milliseconds of the time the submission occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "title": {"name": "title", "description": "The title of the page that the form was submitted on. This will default to the name of the form if no title is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6718023, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_form_submission_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_form_submission_tmp')),\n staging_columns=get_contact_form_submission_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(timestamp as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n form_id,\n contact_id,\n conversion_id,\n page_id,\n page_url,\n portal_id,\n title,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_form_submission_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_form_submission_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_form_submission_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_form_submission_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_form_submission.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n timestamp as timestamp,\n form_id as form_id,\n contact_id as contact_id,\n conversion_id as conversion_id,\n page_id as page_id,\n page_url as page_url,\n portal_id as portal_id,\n title as title\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(timestamp as timestamp) as occurred_timestamp,\n form_id,\n contact_id,\n conversion_id,\n page_id,\n page_url,\n portal_id,\n title,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_stage": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_stage.sql", "original_file_path": "models/staging/stg_hubspot__deal_stage.sql", "unique_id": "model.hubspot.stg_hubspot__deal_stage", "fqn": ["hubspot", "staging", "stg_hubspot__deal_stage"], "alias": "stg_hubspot__deal_stage", "checksum": {"name": "sha256", "checksum": "fd5ee4f05ea44437be92ed99e4277b791a68c394db013b65e5e771d04ace1e69"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal stage.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "date_entered": {"name": "date_entered", "description": "The timestamp the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "Reference to the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The relevant source of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_id": {"name": "source_id", "description": "Reference to the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_stage_name": {"name": "deal_stage_name", "description": "The value of the deal stage. Typically the name of the stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2357924, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_hubspot__deal_stage_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_hubspot__deal_stage_tmp')),\n staging_columns=get_deal_stage_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(date_entered as {{ dbt.type_timestamp() }}) as date_entered,\n deal_id,\n source,\n source_id,\n value as deal_stage_name,\n _fivetran_active,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_stage_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_stage_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_stage_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_stage_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_stage.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_active as _fivetran_active,\n _fivetran_end as _fivetran_end,\n _fivetran_start as _fivetran_start,\n _fivetran_synced as _fivetran_synced,\n date_entered as date_entered,\n deal_id as deal_id,\n source as source,\n source_id as source_id,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(date_entered as timestamp) as date_entered,\n deal_id,\n source,\n source_id,\n value as deal_stage_name,\n _fivetran_active,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n cast(_fivetran_start as timestamp) as _fivetran_start\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event.sql", "original_file_path": "models/staging/stg_hubspot__email_event.sql", "unique_id": "model.hubspot.stg_hubspot__email_event", "fqn": ["hubspot", "staging", "stg_hubspot__email_event"], "alias": "stg_hubspot__email_event", "checksum": {"name": "sha256", "checksum": "38132b1d66ef4d903ec73d74e1a2b151a2d4bd9edc5270ba54b5628780ea31a1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an email event in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The ID of the app that sent the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_by_event_id": {"name": "caused_by_event_id", "description": "The event ID which uniquely identifies the event which directly caused this event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_timestamp": {"name": "caused_timestamp", "description": "The timestamp of the event that caused this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_filtered_event": {"name": "is_filtered_event", "description": "A boolean representing whether the event has been filtered out of reporting based on customer reports settings or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_by_event_id": {"name": "obsoleted_by_event_id", "description": "The event ID which uniquely identifies the follow-on event which makes this current event obsolete. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_timestamp": {"name": "obsoleted_timestamp", "description": "The timestamp of the event that made the current event obsolete.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_by_event_id": {"name": "sent_by_event_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_timestamp": {"name": "sent_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6319537, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_tmp')),\n staging_columns=get_email_event_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n app_id,\n cast(caused_by_created as {{ dbt.type_timestamp() }}) as caused_timestamp,\n caused_by_id as caused_by_event_id,\n cast(created as {{ dbt.type_timestamp() }}) as created_timestamp,\n email_campaign_id,\n filtered_event as is_filtered_event,\n id as event_id,\n cast(obsoleted_by_created as {{ dbt.type_timestamp() }}) as obsoleted_timestamp,\n obsoleted_by_id as obsoleted_by_event_id,\n portal_id,\n recipient as recipient_email_address,\n cast(sent_by_created as {{ dbt.type_timestamp() }}) as sent_timestamp,\n sent_by_id as sent_by_event_id,\n type as event_type\n from macro\n \n)\n\nselect *\nfrom fields\n{% if not var('hubspot_using_all_email_events',true) -%}\nwhere not coalesce(is_filtered_event, false)\n{%- endif -%}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n app_id as app_id,\n caused_by_created as caused_by_created,\n caused_by_id as caused_by_id,\n created as created,\n email_campaign_id as email_campaign_id,\n filtered_event as filtered_event,\n id as id,\n obsoleted_by_created as obsoleted_by_created,\n obsoleted_by_id as obsoleted_by_id,\n portal_id as portal_id,\n recipient as recipient,\n sent_by_created as sent_by_created,\n sent_by_id as sent_by_id,\n type as type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n app_id,\n cast(caused_by_created as timestamp) as caused_timestamp,\n caused_by_id as caused_by_event_id,\n cast(created as timestamp) as created_timestamp,\n email_campaign_id,\n filtered_event as is_filtered_event,\n id as event_id,\n cast(obsoleted_by_created as timestamp) as obsoleted_timestamp,\n obsoleted_by_id as obsoleted_by_event_id,\n portal_id,\n recipient as recipient_email_address,\n cast(sent_by_created as timestamp) as sent_timestamp,\n sent_by_id as sent_by_event_id,\n type as event_type\n from macro\n \n)\n\nselect *\nfrom fields\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_channel.sql", "original_file_path": "models/staging/stg_hubspot__conversation_channel.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_channel"], "alias": "stg_hubspot__conversation_channel", "checksum": {"name": "sha256", "checksum": "c7d8bd1799731623daff656e60c0d15573036fb29b9a2e01c90046d63242dcb7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a channel through which users can contact your team, such as email, Chat, Facebook Messenger, or WhatsApp.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_id": {"name": "channel_id", "description": "Unique ID of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1877127, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_channel_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_channel_tmp')),\n staging_columns=get_conversation_channel_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_id,\n name\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_channel_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_channel.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n name as name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_id,\n name\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_deal.sql", "original_file_path": "models/staging/stg_hubspot__engagement_deal.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_deal", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_deal"], "alias": "stg_hubspot__engagement_deal", "checksum": {"name": "sha256", "checksum": "401a567d0bdf6143147cbc21950b9dcd59a7d298cd799935ea36fe3acdbe217a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a deal and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6923764, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_deal_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_deal_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_deal_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_deal_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_deal_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n deal_id as deal_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n \n \n\n \n \n , \"engagement_type\"\n , \"type_id\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list_member": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company_list_member.sql", "original_file_path": "models/staging/stg_hubspot__company_list_member.sql", "unique_id": "model.hubspot.stg_hubspot__company_list_member", "fqn": ["hubspot", "staging", "stg_hubspot__company_list_member"], "alias": "stg_hubspot__company_list_member", "checksum": {"name": "sha256", "checksum": "47622c5716b396584adccc9af57ec3b6b69afcb0b7762c99c551433413bc5d89"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a company and a company list.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_company_list_member_deleted": {"name": "is_company_list_member_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "added_timestamp": {"name": "added_timestamp", "description": "The timestamp a company was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_id": {"name": "company_list_id", "description": "The ID of the related company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.7194102, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_list_member_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_member_tmp')),\n staging_columns=get_company_list_member_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_company_list_member_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(added_at as {{ dbt.type_timestamp() }}) as added_timestamp,\n company_id,\n company_list_id\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list_member_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_list_member_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_list_member_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__company_list_member_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company_list_member.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n added_at as added_at,\n company_id as company_id,\n company_list_id as company_list_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_company_list_member_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(added_at as timestamp) as added_timestamp,\n company_id,\n company_list_id\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_bounce": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_bounce.sql", "original_file_path": "models/staging/stg_hubspot__email_event_bounce.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_bounce", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_bounce"], "alias": "stg_hubspot__email_event_bounce", "checksum": {"name": "sha256", "checksum": "60643cf2bd6b839005f8ba96c755d55999a4275fb2f899bf638623c27a43d546"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a BOUNCE email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bounce_category": {"name": "bounce_category", "description": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_status": {"name": "returned_status", "description": "The status code returned from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_bounce_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.619109, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_bounce_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_bounce_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_bounce_tmp')),\n staging_columns=get_email_event_bounce_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n \n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n category as bounce_category,\n id as event_id,\n response as returned_response,\n status as returned_status\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_bounce_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_bounce_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_bounce_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_bounce_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_bounce.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n category as category,\n id as id,\n response as response,\n status as status\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n \n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n category as bounce_category,\n id as event_id,\n response as returned_response,\n status as returned_status\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_task": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_task.sql", "original_file_path": "models/staging/stg_hubspot__engagement_task.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_task", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_task"], "alias": "stg_hubspot__engagement_task", "checksum": {"name": "sha256", "checksum": "b335e692e4e0805f0540aedf0c68221bcfb12ec8ad0b04852a8b6b76bbcdbb53"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a TASK engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the task's time of creation and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the task's time of occurrence and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the task. This field determines the user listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the task. This field determines the team listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_task_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6964111, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_task_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_task_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_task_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_task_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_task_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_task_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_task_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_task_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_task.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n engagement_id as engagement_id,\n type as engagement_type,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n property_hubspot_owner_id as owner_id,\n property_hubspot_team_id as team_id\n \n \n \n \n , \"property_hs_task_type\" as task_type\n \n \n \n\n \n \n , \"property_hs_object_id\" as object_id\n , \"property_hs_engagement_source\" as engagement_source\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_list": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event_list.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event_list.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_list", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event_list"], "alias": "stg_hubspot__marketing_event_list", "checksum": {"name": "sha256", "checksum": "49ec1949fdc27234ceef92756ed8b742b16c3d32d899504df57716ef5a913a81"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a list associated with a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_list_id": {"name": "marketing_event_list_id", "description": "The unique ID of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_list_name": {"name": "marketing_event_list_name", "description": "The name of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The ID of the user who created the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_by_id": {"name": "updated_by_id", "description": "The ID of the user who last updated the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp when the list filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "The current processing status of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deleted_timestamp": {"name": "deleted_timestamp", "description": "The timestamp when the list was deleted, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "The version number of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the object type stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "size": {"name": "size", "description": "The number of records in the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp when the list was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_list_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1722658, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_list_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_list_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_list_tmp')),\n staging_columns=get_marketing_event_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as marketing_event_list_id,\n marketing_event_id,\n name as marketing_event_list_name,\n created_by_id,\n updated_by_id,\n cast(filters_updated_at as {{ dbt.type_timestamp() }}) as filters_updated_at,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n processing_status,\n cast(deleted_at as {{ dbt.type_timestamp() }}) as deleted_timestamp,\n list_version,\n object_type_id,\n size,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_list_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_list_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_list_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_list_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event_list.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n marketing_event_id as marketing_event_id,\n name as name,\n created_by_id as created_by_id,\n updated_by_id as updated_by_id,\n filters_updated_at as filters_updated_at,\n created_at as created_at,\n processing_status as processing_status,\n deleted_at as deleted_at,\n list_version as list_version,\n object_type_id as object_type_id,\n size as size,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as marketing_event_list_id,\n marketing_event_id,\n name as marketing_event_list_name,\n created_by_id,\n updated_by_id,\n cast(filters_updated_at as timestamp) as filters_updated_at,\n cast(created_at as timestamp) as created_timestamp,\n processing_status,\n cast(deleted_at as timestamp) as deleted_timestamp,\n list_version,\n object_type_id,\n size,\n cast(updated_at as timestamp) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_email": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_email.sql", "original_file_path": "models/staging/stg_hubspot__engagement_email.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_email", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_email"], "alias": "stg_hubspot__engagement_email", "checksum": {"name": "sha256", "checksum": "3f287f52193121322ccab5a73924861bb49154479b4fb759adff01da7f8919c7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an EMAIL engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the email's time of occurrence and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the email. This field determines the team listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_email_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6933568, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_email_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_email_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_email_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_email_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_email_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_email_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_email_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_email_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_email.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n type as engagement_type,\n engagement_id as engagement_id,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n property_hubspot_owner_id as owner_id,\n property_hubspot_team_id as team_id\n \n \n \n \n \n \n \n \n \n \n\n \n \n , \"property_hs_all_owner_ids\" as all_owner_ids\n , \"property_hs_all_team_ids\" as all_team_ids\n , \"property_hs_email_subject\" as email_subject\n , \"property_hs_email_text\" as email_text\n , \"property_hs_lastmodifieddate\" as lastmodifieddate\n , \"property_hs_modified_by\" as modified_by\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__form": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__form", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__form.sql", "original_file_path": "models/staging/stg_hubspot__form.sql", "unique_id": "model.hubspot.stg_hubspot__form", "fqn": ["hubspot", "staging", "stg_hubspot__form"], "alias": "stg_hubspot__form", "checksum": {"name": "sha256", "checksum": "5d0909ad12528249d2aab9ed1d31a1fbef0d89f5cdfe0c5360bc3b46a6f2fd7d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a form created in HubSpot, including metadata about its configuration and behavior.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "form_id": {"name": "form_id", "description": "Unique identifier for the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "action": {"name": "action", "description": "The form action type or endpoint triggered upon submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the form was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "css_class": {"name": "css_class", "description": "CSS class applied to the form for styling purposes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "follow_up_id": {"name": "follow_up_id", "description": "ID of the follow-up action or workflow triggered by the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_type": {"name": "form_type", "description": "Category of the form, such as regular, pop-up, or embedded form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lead_nurturing_campaign_id": {"name": "lead_nurturing_campaign_id", "description": "ID of the associated lead nurturing campaign, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "method": {"name": "method", "description": "HTTP method used for form submission (typically POST).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_name": {"name": "form_name", "description": "Name of the form as defined in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "notify_recipients": {"name": "notify_recipients", "description": "List of email addresses that receive notifications on form submissions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "redirect": {"name": "redirect", "description": "URL users are redirected to after submitting the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submit_text": {"name": "submit_text", "description": "Text displayed on the form's submit button.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the form was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__form.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.609683, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__form\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__form_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__form_tmp')),\n staging_columns=get_form_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n guid as form_id,\n action,\n created_at,\n css_class,\n follow_up_id,\n form_type,\n lead_nurturing_campaign_id,\n method,\n name as form_name,\n notify_recipients,\n portal_id,\n redirect,\n submit_text,\n updated_at,\n _fivetran_deleted as is_deleted\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__form_tmp", "package": null, "version": null}, {"name": "stg_hubspot__form_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_form_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__form_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__form.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form_tmp\"\n\n), macro as (\n\n select\n \n cast(null as timestamp) as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n guid as guid,\n action as action,\n created_at as created_at,\n css_class as css_class,\n follow_up_id as follow_up_id,\n form_type as form_type,\n lead_nurturing_campaign_id as lead_nurturing_campaign_id,\n method as method,\n name as name,\n notify_recipients as notify_recipients,\n portal_id as portal_id,\n redirect as redirect,\n submit_text as submit_text,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n guid as form_id,\n action,\n created_at,\n css_class,\n follow_up_id,\n form_type,\n lead_nurturing_campaign_id,\n method,\n name as form_name,\n notify_recipients,\n portal_id,\n redirect,\n submit_text,\n updated_at,\n _fivetran_deleted as is_deleted\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_deal.sql", "original_file_path": "models/staging/stg_hubspot__ticket_deal.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_deal", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_deal"], "alias": "stg_hubspot__ticket_deal", "checksum": {"name": "sha256", "checksum": "4d3e491fa754fe383205a951c196c4979e5c36bb62da465c2f63dbad9081b27d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and a deal.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False) and var('hubspot_ticket_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.217154, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal\"", "raw_code": "{{ config(enabled=(var('hubspot_service_enabled', false) and var('hubspot_ticket_deal_enabled', false))) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_deal_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_deal_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_deal_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_deal_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_deal_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n deal_id as deal_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_property_history.sql", "original_file_path": "models/staging/stg_hubspot__contact_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__contact_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__contact_property_history"], "alias": "stg_hubspot__contact_property_history", "checksum": {"name": "sha256", "checksum": "a134690f7d4276cfad5b3b3efbd375e63be66aa66584dc2fb81625794d370e3e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to contact record in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the contact property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the contact property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the contact property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6767938, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_property_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_property_history_tmp')),\n staging_columns=get_contact_property_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n contact_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as {{ dbt.type_timestamp() }}) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_contact_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_property_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n contact_id as contact_id,\n name as name,\n source as source,\n source_id as source_id,\n timestamp as change_timestamp,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n contact_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as timestamp) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_contact_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_forward": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_forward.sql", "original_file_path": "models/staging/stg_hubspot__email_event_forward.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_forward", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_forward"], "alias": "stg_hubspot__email_event_forward", "checksum": {"name": "sha256", "checksum": "068623f08b182078581d27cfaf9610d52534d9eefa530299b5886777569fa5e8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a FORWARD email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_forward_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6238067, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_forward_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_forward_tmp')),\n staging_columns=get_email_event_forward_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_forward_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_forward_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_forward_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_forward_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_forward.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n id as id,\n ip_address as ip_address,\n location as location,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_thread": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_thread.sql", "original_file_path": "models/staging/stg_hubspot__conversation_thread.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_thread", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_thread"], "alias": "stg_hubspot__conversation_thread", "checksum": {"name": "sha256", "checksum": "a9f6532bfcea8ef1199449d11a6a0e3db1572d6ae8886e1a2624a219ccae245d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a conversation thread in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "conversation_thread_id": {"name": "conversation_thread_id", "description": "Unique ID of the conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_contact_id": {"name": "associated_contact_id", "description": "ID of the contact associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_ticket_id": {"name": "associated_ticket_id", "description": "ID of the ticket associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_account_id": {"name": "original_channel_account_id", "description": "ID of the channel account through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_id": {"name": "original_channel_id", "description": "ID of the channel through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to_actor_id": {"name": "assigned_to_actor_id", "description": "ID of the agent the thread is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_at": {"name": "closed_at", "description": "Timestamp when the thread was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_received_at": {"name": "latest_message_received_at", "description": "Timestamp of the most recently received message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_sent_at": {"name": "latest_message_sent_at", "description": "Timestamp of the most recently sent message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_at": {"name": "latest_message_at", "description": "Timestamp of the most recent message (sent or received) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_spam": {"name": "is_spam", "description": "Indicates whether the thread has been marked as spam.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the thread (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1905541, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_thread_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_thread_tmp')),\n staging_columns=get_conversation_thread_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as conversation_thread_id,\n inbox_id,\n cast(associated_contact_id as {{ dbt.type_int() }}) as associated_contact_id,\n cast(associated_ticket_id as {{ dbt.type_int() }}) as associated_ticket_id,\n original_channel_account_id,\n original_channel_id,\n assigned_to as assigned_to_actor_id,\n cast(closed_at as {{ dbt.type_timestamp() }}) as closed_at,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n cast(latest_message_timestamp as {{ dbt.type_timestamp() }}) as latest_message_at,\n cast(latest_message_received_timestamp as {{ dbt.type_timestamp() }}) as latest_message_received_at,\n cast(latest_message_sent_timestamp as {{ dbt.type_timestamp() }}) as latest_message_sent_at,\n spam as is_spam,\n status\n from macro\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_thread_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_thread_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_thread_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_int"], "nodes": ["model.hubspot.stg_hubspot__conversation_thread_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_thread.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n inbox_id as inbox_id,\n associated_contact_id as associated_contact_id,\n associated_ticket_id as associated_ticket_id,\n original_channel_account_id as original_channel_account_id,\n original_channel_id as original_channel_id,\n assigned_to as assigned_to,\n closed_at as closed_at,\n created_at as created_at,\n latest_message_received_timestamp as latest_message_received_timestamp,\n latest_message_sent_timestamp as latest_message_sent_timestamp,\n latest_message_timestamp as latest_message_timestamp,\n spam as spam,\n status as status\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as conversation_thread_id,\n inbox_id,\n cast(associated_contact_id as integer) as associated_contact_id,\n cast(associated_ticket_id as integer) as associated_ticket_id,\n original_channel_account_id,\n original_channel_id,\n assigned_to as assigned_to_actor_id,\n cast(closed_at as timestamp) as closed_at,\n cast(created_at as timestamp) as created_at,\n cast(latest_message_timestamp as timestamp) as latest_message_at,\n cast(latest_message_received_timestamp as timestamp) as latest_message_received_at,\n cast(latest_message_sent_timestamp as timestamp) as latest_message_sent_at,\n spam as is_spam,\n status\n from macro\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_deferred": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_deferred.sql", "original_file_path": "models/staging/stg_hubspot__email_event_deferred.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_deferred", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_deferred"], "alias": "stg_hubspot__email_event_deferred", "checksum": {"name": "sha256", "checksum": "44e81c43507f2486c24fa878f6d8dd5989ab4e2559fe24abacf0e8cc54144b50"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DEFERRED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "attempt_number": {"name": "attempt_number", "description": "The delivery attempt number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_deferred_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6209495, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_deferred_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_deferred_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_deferred_tmp')),\n staging_columns=get_email_event_deferred_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n attempt as attempt_number,\n id as event_id,\n response as returned_response\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_deferred_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_deferred_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_deferred_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_deferred_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_deferred.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n attempt as attempt,\n id as id,\n response as response\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n attempt as attempt_number,\n id as event_id,\n response as returned_response\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_open": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_open.sql", "original_file_path": "models/staging/stg_hubspot__email_event_open.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_open", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_open"], "alias": "stg_hubspot__email_event_open", "checksum": {"name": "sha256", "checksum": "1d8e9a8556efc17693cf26c1640466da05a595e23f69aa5c5d9d46f1982d99fd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a OPEN email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "duration_open": {"name": "duration_open", "description": "If provided and nonzero, the approximate number of milliseconds the user had opened the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_open_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6247516, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_open_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_open_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_open_tmp')),\n staging_columns=get_email_event_open_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n duration as duration_open,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_open_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_open_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_open_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_open_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_open.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n duration as duration,\n id as id,\n ip_address as ip_address,\n location as location,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n duration as duration_open,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_recipient": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_message_recipient.sql", "original_file_path": "models/staging/stg_hubspot__conversation_message_recipient.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_recipient", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_message_recipient"], "alias": "stg_hubspot__conversation_message_recipient", "checksum": {"name": "sha256", "checksum": "4c007c217fe0cce078e429f0b8164e07a31ea1a53e561217666922fe8f843d75"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a recipient associated with a conversation message.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique ID generated by Fivetran for this recipient record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "actor_id": {"name": "actor_id", "description": "ID of the actor (user or contact) who received the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "message_id": {"name": "message_id", "description": "ID of the message this recipient is associated with.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_field": {"name": "recipient_field", "description": "The role of this recipient in the message (e.g., TO, CC, BCC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for the recipient (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1948717, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_message_recipient_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_message_recipient_tmp')),\n staging_columns=get_conversation_message_recipient_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_id,\n actor_id,\n message_id,\n thread_id,\n name,\n recipient_field,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_recipient_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_recipient_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_message_recipient_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_recipient_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_message_recipient.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_id as _fivetran_id,\n actor_id as actor_id,\n message_id as message_id,\n thread_id as thread_id,\n name as name,\n recipient_field as recipient_field,\n delivery_identifier_type as delivery_identifier_type,\n delivery_identifier_value as delivery_identifier_value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_id,\n actor_id,\n message_id,\n thread_id,\n name,\n recipient_field,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_participant": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event_participant.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event_participant.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_participant", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event_participant"], "alias": "stg_hubspot__marketing_event_participant", "checksum": {"name": "sha256", "checksum": "3d8ddb1af8edb6bf4f9c43c887eee5942581217c536813bea8a881254d607467"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a participant in a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_participant_id": {"name": "marketing_event_participant_id", "description": "The unique ID of the marketing event participant record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the participant record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "The timestamp when the participation event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_percentage": {"name": "attendance_percentage", "description": "Percentage of the participation duration relative to the event duration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_state": {"name": "attendance_state", "description": "The attendance state of the participant (e.g., ATTENDED, CANCELLED, EMPTY, NO_SHOW, REGISTERED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_duration_seconds": {"name": "attendance_duration_seconds", "description": "The number of seconds the participation lasted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_participant_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1747298, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_participant_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_participant_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_participant_tmp')),\n staging_columns=get_marketing_event_participant_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as marketing_event_participant_id,\n marketing_event_id,\n contact_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n cast(properties_occurred_at as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n properties_attendance_percentage as attendance_percentage,\n properties_attendance_state as attendance_state,\n properties_attendance_duration_seconds as attendance_duration_seconds\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_participant_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_participant_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_participant_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_participant_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event_participant.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n marketing_event_id as marketing_event_id,\n contact_id as contact_id,\n created_at as created_at,\n properties_occurred_at as properties_occurred_at,\n properties_attendance_percentage as properties_attendance_percentage,\n properties_attendance_state as properties_attendance_state,\n properties_attendance_duration_seconds as properties_attendance_duration_seconds\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as marketing_event_participant_id,\n marketing_event_id,\n contact_id,\n cast(created_at as timestamp) as created_timestamp,\n cast(properties_occurred_at as timestamp) as occurred_timestamp,\n properties_attendance_percentage as attendance_percentage,\n properties_attendance_state as attendance_state,\n properties_attendance_duration_seconds as attendance_duration_seconds\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_sent": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_sent.sql", "original_file_path": "models/staging/stg_hubspot__email_event_sent.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_sent", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_sent"], "alias": "stg_hubspot__email_event_sent", "checksum": {"name": "sha256", "checksum": "80624cfb0abb32917cffe53e5989a7aff16f45a810c539992fce9415e8be1779"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SENT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6266286, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_sent_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_sent_tmp')),\n staging_columns=get_email_event_sent_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_sent_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_sent_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_sent_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_sent_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_sent_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_sent.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n bcc as bcc,\n cc as cc,\n id as id,\n reply_to as reply_to,\n subject as subject,\n \n \"from\" as from_email\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_sent_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_custom_property": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event_custom_property.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event_custom_property.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event_custom_property"], "alias": "stg_hubspot__marketing_event_custom_property", "checksum": {"name": "sha256", "checksum": "966f1821a241eb82c92fb6cd7423b96904507558a711811e9fba8fd6d077ac63"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a custom property on a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_name": {"name": "property_name", "description": "The name of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_value": {"name": "property_value", "description": "The value of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_custom_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1758127, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_custom_property\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_custom_property_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_custom_property_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_custom_property_tmp')),\n staging_columns=get_marketing_event_custom_property_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n marketing_event_id,\n name as property_name,\n value as property_value\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_custom_property_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_custom_property_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_custom_property_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event_custom_property.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_custom_property_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n marketing_event_id as marketing_event_id,\n name as name,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n marketing_event_id,\n name as property_name,\n value as property_value\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_message_history.sql", "original_file_path": "models/staging/stg_hubspot__conversation_message_history.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_history", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_message_history"], "alias": "stg_hubspot__conversation_message_history", "checksum": {"name": "sha256", "checksum": "8363c7b84f6e805f4a23bd405269842f07f7b69ff844aa4c1ae6eb1413eb795f"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a version of a conversation message, tracking changes over time via SCD Type 2.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether this is the currently active version of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "message_id": {"name": "message_id", "description": "Unique ID of the conversation message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_id": {"name": "channel_account_id", "description": "ID of the channel account associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_inbox_id": {"name": "from_inbox_id", "description": "ID of the inbox the message was sent from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "to_inbox_id": {"name": "to_inbox_id", "description": "ID of the inbox the message was sent to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to_actor_id": {"name": "assigned_to_actor_id", "description": "ID of the agent the thread was assigned to at message time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_from_actor_id": {"name": "assigned_from_actor_id", "description": "ID of the previous assignee before this message triggered a reassignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the message was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_actor_id": {"name": "created_by_actor_id", "description": "ID of the user who created the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_actor_type": {"name": "created_by_actor_type", "description": "Type of the actor (VISITOR, AGENT, BOT, SYSTEM, EMAIL, INTEGRATION, LLM, OTHER) who created the message. Inferred from the prefix of `created_by_actor_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "direction": {"name": "direction", "description": "Direction of the message (e.g., INCOMING, OUTGOING).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "in_reply_to_id": {"name": "in_reply_to_id", "description": "ID of the message this message is a reply to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "new_status": {"name": "new_status", "description": "The thread status set by this message event (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "rich_text": {"name": "rich_text", "description": "HTML-formatted body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "Subject line of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "text": {"name": "text", "description": "Plain-text body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "truncation_status": {"name": "truncation_status", "description": "Indicates whether the message body was truncated (e.g., NOT_TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY, TRUNCATED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the message event (e.g., MESSAGE, COMMENT, WELCOME_MESSAGE).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the message record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "client_type": {"name": "client_type", "description": "The type of client used to send the message (e.g., SYSTEM, HUBSPOT, INTEGRATION).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status_type": {"name": "status_type", "description": "The status type of the message (e.g., SENT, RECEIVED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "version_rank": {"name": "version_rank", "description": "Row number ordered by _fivetran_end descending; rank 1 is the most recent active version of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1937726, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_message_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_message_history_tmp')),\n staging_columns=get_conversation_message_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n _fivetran_deleted as is_deleted,\n id as message_id,\n thread_id,\n channel_account_id,\n channel_id,\n from_inbox_id,\n to_inbox_id,\n assigned_to as assigned_to_actor_id,\n assigned_from as assigned_from_actor_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n created_by as created_by_actor_id,\n case \n when created_by like 'A-%' then 'AGENT'\n when created_by like 'B-%' then 'BOT'\n when created_by like 'E-%' then 'EMAIL'\n when created_by like 'I-%' then 'INTEGRATION'\n when created_by like 'L-%' then 'LLM' -- customer agent powered by Hubspot's AI called Breeze\n when created_by like 'S-%' then 'SYSTEM'\n when created_by like 'V-%' then 'VISITOR'\n else 'OTHER' end as created_by_actor_type,\n upper(direction) as direction,\n in_reply_to_id,\n new_status,\n rich_text,\n subject,\n text,\n upper(truncation_status) as truncation_status,\n upper(type) as type,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n upper(client_type) as client_type,\n upper(status_type) as status_type,\n row_number() over (partition by id order by _fivetran_end desc) as version_rank\n from macro\n where coalesce(_fivetran_active, true)\n and not coalesce(_fivetran_deleted, false)\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_message_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_message_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n id as id,\n thread_id as thread_id,\n channel_account_id as channel_account_id,\n channel_id as channel_id,\n from_inbox_id as from_inbox_id,\n to_inbox_id as to_inbox_id,\n assigned_to as assigned_to,\n assigned_from as assigned_from,\n created_at as created_at,\n created_by as created_by,\n direction as direction,\n in_reply_to_id as in_reply_to_id,\n new_status as new_status,\n rich_text as rich_text,\n subject as subject,\n text as text,\n truncation_status as truncation_status,\n type as type,\n updated_at as updated_at,\n client_type as client_type,\n status_type as status_type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n _fivetran_deleted as is_deleted,\n id as message_id,\n thread_id,\n channel_account_id,\n channel_id,\n from_inbox_id,\n to_inbox_id,\n assigned_to as assigned_to_actor_id,\n assigned_from as assigned_from_actor_id,\n cast(created_at as timestamp) as created_at,\n created_by as created_by_actor_id,\n case \n when created_by like 'A-%' then 'AGENT'\n when created_by like 'B-%' then 'BOT'\n when created_by like 'E-%' then 'EMAIL'\n when created_by like 'I-%' then 'INTEGRATION'\n when created_by like 'L-%' then 'LLM' -- customer agent powered by Hubspot's AI called Breeze\n when created_by like 'S-%' then 'SYSTEM'\n when created_by like 'V-%' then 'VISITOR'\n else 'OTHER' end as created_by_actor_type,\n upper(direction) as direction,\n in_reply_to_id,\n new_status,\n rich_text,\n subject,\n text,\n upper(truncation_status) as truncation_status,\n upper(type) as type,\n cast(updated_at as timestamp) as updated_at,\n upper(client_type) as client_type,\n upper(status_type) as status_type,\n row_number() over (partition by id order by _fivetran_end desc) as version_rank\n from macro\n where coalesce(_fivetran_active, true)\n and not coalesce(_fivetran_deleted, false)\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline_stage": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_pipeline_stage.sql", "original_file_path": "models/staging/stg_hubspot__deal_pipeline_stage.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage", "fqn": ["hubspot", "staging", "stg_hubspot__deal_pipeline_stage"], "alias": "stg_hubspot__deal_pipeline_stage", "checksum": {"name": "sha256", "checksum": "002fdca1f3adce6bacff7b59a1ae870e67d4cb36ed6de922a896d66bcab3b1ce"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a pipeline stage in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_deal_pipeline_stage_deleted": {"name": "is_deal_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the related pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the pipeline stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal (\"Closed Won\" vs \"Closed Lost\"), refer to the pipeline_stage_label column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "probability": {"name": "probability", "description": "The probability that the deal will close. Used for the deal forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_created_at": {"name": "deal_pipeline_stage_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_updated_at": {"name": "deal_pipeline_stage_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2322223, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_pipeline_stage_tmp')),\n staging_columns=get_deal_pipeline_stage_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_stage_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n coalesce(is_closed, closed_won) as is_closed,\n display_order,\n label as pipeline_stage_label,\n cast(pipeline_id as {{ dbt.type_string() }}) as deal_pipeline_id,\n probability,\n cast(stage_id as {{ dbt.type_string() }}) as deal_pipeline_stage_id,\n created_at as deal_pipeline_stage_created_at,\n updated_at as deal_pipeline_stage_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline_stage_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_pipeline_stage_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_pipeline_stage.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n closed_won as closed_won,\n is_closed as is_closed,\n display_order as display_order,\n label as label,\n pipeline_id as pipeline_id,\n probability as probability,\n stage_id as stage_id,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_stage_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n coalesce(is_closed, closed_won) as is_closed,\n display_order,\n label as pipeline_stage_label,\n cast(pipeline_id as TEXT) as deal_pipeline_id,\n probability,\n cast(stage_id as TEXT) as deal_pipeline_stage_id,\n created_at as deal_pipeline_stage_created_at,\n updated_at as deal_pipeline_stage_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement.sql", "original_file_path": "models/staging/stg_hubspot__engagement.sql", "unique_id": "model.hubspot.stg_hubspot__engagement", "fqn": ["hubspot", "staging", "stg_hubspot__engagement"], "alias": "stg_hubspot__engagement", "checksum": {"name": "sha256", "checksum": "064b638e701eb444a668da74ba15d0eab884f04fc96d5a195abffcb1b0ca1a22"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an engagement", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6972601, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__engagement_tmp')),\n staging_columns=get_engagement_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as engagement_id,\n portal_id,\n engagement_type\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__engagement_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n portal_id as portal_id,\n type as engagement_type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as engagement_id,\n portal_id,\n engagement_type\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner_team": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner_team", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__owner_team.sql", "original_file_path": "models/staging/stg_hubspot__owner_team.sql", "unique_id": "model.hubspot.stg_hubspot__owner_team", "fqn": ["hubspot", "staging", "stg_hubspot__owner_team"], "alias": "stg_hubspot__owner_team", "checksum": {"name": "sha256", "checksum": "b73a5538b31bc88615243ee56b4a723a3c9927dff35114e643e802335063e959"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table mapping owners to their associated teams in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "owner_id": {"name": "owner_id", "description": "Unique ID of the HubSpot owner (user) assigned to the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the team to which the owner belongs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_team_primary": {"name": "is_team_primary", "description": "Indicates whether the team is the owner's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2546537, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__owner_team_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__owner_team_tmp')),\n staging_columns=get_owner_team_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n owner_id,\n team_id,\n is_team_primary,\n _fivetran_deleted as is_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner_team_tmp", "package": null, "version": null}, {"name": "stg_hubspot__owner_team_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_owner_team_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__owner_team_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__owner_team.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n owner_id as owner_id,\n team_id as team_id,\n is_team_primary as is_team_primary\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n owner_id,\n team_id,\n is_team_primary,\n _fivetran_deleted as is_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_pipeline.sql", "original_file_path": "models/staging/stg_hubspot__deal_pipeline.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline", "fqn": ["hubspot", "staging", "stg_hubspot__deal_pipeline"], "alias": "stg_hubspot__deal_pipeline", "checksum": {"name": "sha256", "checksum": "5ceeb4cbfa495eaf3e1b3c1fc468635f546feab78aca5165d773d1a4548bafee"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a pipeline in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_deal_pipeline_deleted": {"name": "is_deal_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the pipelines appear when viewed in HubSpot", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_created_at": {"name": "deal_pipeline_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_updated_at": {"name": "deal_pipeline_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2332268, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_pipeline_tmp')),\n staging_columns=get_deal_pipeline_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n cast(pipeline_id as {{ dbt.type_string() }}) as deal_pipeline_id,\n created_at as deal_pipeline_created_at,\n updated_at as deal_pipeline_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_pipeline_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_pipeline.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n display_order as display_order,\n label as label,\n pipeline_id as pipeline_id,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n cast(pipeline_id as TEXT) as deal_pipeline_id,\n created_at as deal_pipeline_created_at,\n updated_at as deal_pipeline_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel_account": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_channel_account.sql", "original_file_path": "models/staging/stg_hubspot__conversation_channel_account.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel_account", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_channel_account"], "alias": "stg_hubspot__conversation_channel_account", "checksum": {"name": "sha256", "checksum": "5fc6dd823b767e0e5fe6efdadc880b73a780ac7f16d700e3626f1370faf45196"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an instance of a channel connected to an inbox, such as a specific email address or Facebook Messenger account.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_account_id": {"name": "channel_account_id", "description": "Unique ID of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel this account belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox this channel account is connected to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the channel account is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_authorized": {"name": "is_authorized", "description": "Boolean indicating whether the channel account is authorized.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the channel account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for this channel account (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1892588, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_channel_account_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_channel_account_tmp')),\n staging_columns=get_conversation_channel_account_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_account_id,\n channel_id,\n inbox_id,\n active as is_active,\n authorized as is_authorized,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n name,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel_account_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel_account_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_channel_account_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel_account_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_channel_account.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n channel_id as channel_id,\n inbox_id as inbox_id,\n active as active,\n authorized as authorized,\n created_at as created_at,\n name as name,\n delivery_identifier_type as delivery_identifier_type,\n delivery_identifier_value as delivery_identifier_value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_account_id,\n channel_id,\n inbox_id,\n active as is_active,\n authorized as is_authorized,\n cast(created_at as timestamp) as created_at,\n name,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company_property_history.sql", "original_file_path": "models/staging/stg_hubspot__company_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__company_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__company_property_history"], "alias": "stg_hubspot__company_property_history", "checksum": {"name": "sha256", "checksum": "a50a22105bcb075978dfaae3a00a06328396d3dc8171a1d280be81c111b50298"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to company record in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the company property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the company property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the company property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "company_id": {"name": "company_id", "description": "The ID of the related company record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.7205572, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled','hubspot_company_property_history_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_property_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_property_history_tmp')),\n staging_columns=get_company_property_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n company_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as {{ dbt.type_timestamp() }}) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_company_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_property_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__company_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n company_id as company_id,\n name as name,\n source as source,\n source_id as source_id,\n timestamp as change_timestamp,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n company_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as timestamp) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_company_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event"], "alias": "stg_hubspot__marketing_event", "checksum": {"name": "sha256", "checksum": "ef9dbaa2f12ee917fff2b8c083f29ccb61bb32421b33013bb9185c35e4f896dd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_marketing_event_deleted": {"name": "is_marketing_event_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The unique ID of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The string ID of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The name of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendees": {"name": "attendees", "description": "Number of attended contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellations": {"name": "cancellations", "description": "Number of cancelled contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the marketing event was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp when the marketing event ends.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_cancelled": {"name": "event_cancelled", "description": "Boolean indicating whether the marketing event was cancelled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_completed": {"name": "event_completed", "description": "Boolean indicating whether the marketing event has been completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_description": {"name": "event_description", "description": "A description of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_name": {"name": "event_name", "description": "The name of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_organizer": {"name": "event_organizer", "description": "The name of the organizer of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_status": {"name": "event_status", "description": "The current status of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_url": {"name": "event_url", "description": "A URL in the external event application where the marketing event can be managed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "external_event_id": {"name": "external_event_id", "description": "The ID that is associated with this marketing event in the external event application.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_shows": {"name": "no_shows", "description": "Number of no-show contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "registrants": {"name": "registrants", "description": "Number of registered contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp when the marketing event starts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp when the marketing event was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.169811, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_tmp')),\n staging_columns=get_marketing_event_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_marketing_event_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as marketing_event_id,\n app_id,\n app_name,\n attendees,\n cancellations,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n cast(end_date_time as {{ dbt.type_timestamp() }}) as end_timestamp,\n event_cancelled,\n event_completed,\n event_description,\n event_name,\n event_organizer,\n event_status,\n event_type,\n event_url,\n external_event_id,\n no_shows,\n registrants,\n cast(start_date_time as {{ dbt.type_timestamp() }}) as start_timestamp,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n id as id,\n app_id as app_id,\n app_name as app_name,\n attendees as attendees,\n cancellations as cancellations,\n created_at as created_at,\n end_date_time as end_date_time,\n event_cancelled as event_cancelled,\n event_completed as event_completed,\n event_description as event_description,\n event_name as event_name,\n event_organizer as event_organizer,\n event_status as event_status,\n event_type as event_type,\n event_url as event_url,\n external_event_id as external_event_id,\n no_shows as no_shows,\n registrants as registrants,\n start_date_time as start_date_time,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_marketing_event_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as marketing_event_id,\n app_id,\n app_name,\n attendees,\n cancellations,\n cast(created_at as timestamp) as created_timestamp,\n cast(end_date_time as timestamp) as end_timestamp,\n event_cancelled,\n event_completed,\n event_description,\n event_name,\n event_organizer,\n event_status,\n event_type,\n event_url,\n external_event_id,\n no_shows,\n registrants,\n cast(start_date_time as timestamp) as start_timestamp,\n cast(updated_at as timestamp) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_merge_audit": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_merge_audit.sql", "original_file_path": "models/staging/stg_hubspot__contact_merge_audit.sql", "unique_id": "model.hubspot.stg_hubspot__contact_merge_audit", "fqn": ["hubspot", "staging", "stg_hubspot__contact_merge_audit"], "alias": "stg_hubspot__contact_merge_audit", "checksum": {"name": "sha256", "checksum": "d152609be723efdd8d14c54fd6de85327b3fcd1521f810692ca6e14f1ab1720b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record contains a contact merge event and the contacts affected by the merge.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "canonical_vid": {"name": "canonical_vid", "description": "The contact ID of the contact which the vid_to_merge contact was merged into.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "entity_id": {"name": "entity_id", "description": "The ID of the related entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_properties_moved": {"name": "num_properties_moved", "description": "The number of properties which were removed from the merged contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp_at": {"name": "timestamp_at", "description": "Timestamp of when the contacts were merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_id": {"name": "user_id", "description": "The ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "vid_to_merge": {"name": "vid_to_merge", "description": "The ID of the contact which was merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_contact_merge_audit_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6797802, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit\"", "raw_code": "{{ config(enabled=(var('hubspot_marketing_enabled', true) and var('hubspot_contact_merge_audit_enabled', false))) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_merge_audit_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_merge_audit_tmp')),\n staging_columns=get_contact_merge_audit_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n canonical_vid,\n contact_id,\n entity_id,\n first_name,\n last_name,\n num_properties_moved,\n cast(\n {%- if target.type == 'redshift' %}\n \"timestamp\"\n {%- else %} \n timestamp {%- endif %}\n as {{ dbt.type_timestamp() }}) as timestamp_at,\n user_id,\n vid_to_merge,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_merge_audit_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_merge_audit_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_contact_merge_audit_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_merge_audit_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_merge_audit.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n canonical_vid as canonical_vid,\n contact_id as contact_id,\n entity_id as entity_id,\n first_name as first_name,\n last_name as last_name,\n num_properties_moved as num_properties_moved,\n timestamp as timestamp,\n user_id as user_id,\n vid_to_merge as vid_to_merge\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n canonical_vid,\n contact_id,\n entity_id,\n first_name,\n last_name,\n num_properties_moved,\n cast( \n timestamp\n as timestamp) as timestamp_at,\n user_id,\n vid_to_merge,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal.sql", "original_file_path": "models/staging/stg_hubspot__deal.sql", "unique_id": "model.hubspot.stg_hubspot__deal", "fqn": ["hubspot", "staging", "stg_hubspot__deal"], "alias": "stg_hubspot__deal", "checksum": {"name": "sha256", "checksum": "0ad26f2b2971db0022ee286045eca559357ac8bdeac9806ae8ebe59e94c43de9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_deal_deleted": {"name": "is_deal_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_id": {"name": "deal_id", "description": "The ID of the deal", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_name": {"name": "deal_name", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A brief description of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount": {"name": "amount", "description": "The total value of the deal in the deal's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_date": {"name": "closed_date", "description": "The day the deal is expected to close, or was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the deal was created. This property is set automatically by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2344744, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_tmp')),\n staging_columns=get_deal_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_tmp')),\n staging_columns=get_deal_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__deal_tmp',get_deal_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_deal_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_tmp')), \n prefix='property_',exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_deal_columns.sql macro\n source_relation,\n deal_name,\n cast(closed_date as {{ dbt.type_timestamp() }}) as closed_date,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n coalesce(is_deal_deleted, _fivetran_deleted) as is_deal_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n deal_id,\n cast(deal_pipeline_id as {{ dbt.type_string() }}) as deal_pipeline_id,\n cast(deal_pipeline_stage_id as {{ dbt.type_string() }}) as deal_pipeline_stage_id,\n owner_id,\n portal_id,\n description,\n amount\n\n --The below macro adds the fields defined within your hubspot__deal_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__deal_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__deal_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__deal_calculated_fields') }}\n\n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__deal_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_tmp\"\n\n), macro as (\n\n select\n \n cast(null as timestamp) as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n deal_id as deal_id,\n deal_pipeline_id as deal_pipeline_id,\n deal_pipeline_stage_id as deal_pipeline_stage_id,\n is_deleted as is_deal_deleted,\n owner_id as owner_id,\n portal_id as portal_id,\n property_dealname as deal_name,\n property_description as description,\n property_amount as amount,\n property_closedate as closed_date,\n property_createdate as created_date\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_deal_columns.sql macro\n source_relation,\n deal_name,\n cast(closed_date as timestamp) as closed_date,\n cast(created_date as timestamp) as created_date,\n coalesce(is_deal_deleted, _fivetran_deleted) as is_deal_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n deal_id,\n cast(deal_pipeline_id as TEXT) as deal_pipeline_id,\n cast(deal_pipeline_stage_id as TEXT) as deal_pipeline_stage_id,\n owner_id,\n portal_id,\n description,\n amount\n\n --The below macro adds the fields defined within your hubspot__deal_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__deal_calculated_fields variable.\n \n\n\n\n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_campaign": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_campaign.sql", "original_file_path": "models/staging/stg_hubspot__email_campaign.sql", "unique_id": "model.hubspot.stg_hubspot__email_campaign", "fqn": ["hubspot", "staging", "stg_hubspot__email_campaign"], "alias": "stg_hubspot__email_campaign", "checksum": {"name": "sha256", "checksum": "202f26e0e2f618dd4c1492c0c8dc1a1cf125a30f235897c9af8f4bcef21b5cc2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an email campaign in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The app ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The app name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "The ID of the content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_name": {"name": "email_campaign_name", "description": "The name of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_sub_type": {"name": "email_campaign_sub_type", "description": "The email campaign sub-type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_subject": {"name": "email_campaign_subject", "description": "The subject of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_type": {"name": "email_campaign_type", "description": "The email campaign type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_included": {"name": "num_included", "description": "The number of messages included as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_queued": {"name": "num_queued", "description": "The number of messages queued as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6331594, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_campaign_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_campaign_tmp')),\n staging_columns=get_email_campaign_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n app_id,\n app_name,\n content_id,\n id as email_campaign_id,\n name as email_campaign_name,\n num_included,\n num_queued,\n sub_type as email_campaign_sub_type,\n subject as email_campaign_subject,\n type as email_campaign_type\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_campaign_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_campaign_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_campaign_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_campaign.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n app_id as app_id,\n app_name as app_name,\n content_id as content_id,\n id as id,\n name as name,\n num_included as num_included,\n num_queued as num_queued,\n sub_type as sub_type,\n subject as subject,\n type as type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n app_id,\n app_name,\n content_id,\n id as email_campaign_id,\n name as email_campaign_name,\n num_included,\n num_queued,\n sub_type as email_campaign_sub_type,\n subject as email_campaign_subject,\n type as email_campaign_type\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_contact.sql", "original_file_path": "models/staging/stg_hubspot__engagement_contact.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_contact", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_contact"], "alias": "stg_hubspot__engagement_contact", "checksum": {"name": "sha256", "checksum": "5b52a432f0341a5d33e9a812414f5b6098c5ed54cfd50c412596583385e50708"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a contact and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6916156, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_contact_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_contact_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_contact_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_contact_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_contact_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_contact_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n contact_id as contact_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n \n \n\n \n \n , \"engagement_type\"\n , \"type_id\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team_user": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team_user", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__team_user.sql", "original_file_path": "models/staging/stg_hubspot__team_user.sql", "unique_id": "model.hubspot.stg_hubspot__team_user", "fqn": ["hubspot", "staging", "stg_hubspot__team_user"], "alias": "stg_hubspot__team_user", "checksum": {"name": "sha256", "checksum": "f2e7efea9f94652de55845e1af278e9920043572d511dfe16a79bbf874e3ae17"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table representing associations between users and teams, including secondary team assignments.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "user_id": {"name": "user_id", "description": "Unique ID of the user associated with the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the associated team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_secondary_user": {"name": "is_secondary_user", "description": "Indicates whether the team is a secondary team for the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2579823, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team_user\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__team_user_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__team_user_tmp')),\n staging_columns=get_team_user_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n team_id,\n user_id,\n is_secondary_user,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__team_user_tmp", "package": null, "version": null}, {"name": "stg_hubspot__team_user_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_team_user_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__team_user_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team_user.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team_user_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n team_id as team_id,\n user_id as user_id,\n is_secondary_user as is_secondary_user\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n team_id,\n user_id,\n is_secondary_user,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_status_change": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_status_change.sql", "original_file_path": "models/staging/stg_hubspot__email_event_status_change.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_status_change", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_status_change"], "alias": "stg_hubspot__email_event_status_change", "checksum": {"name": "sha256", "checksum": "2b3212b8e94c460c02acd0fd9d98e14f3195773150d6fa19969e12bcb9849bd3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a STATUS_CHANGE email event in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_bounced": {"name": "is_bounced", "description": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requested_by_email": {"name": "requested_by_email", "description": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscription_status": {"name": "subscription_status", "description": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscriptions": {"name": "subscriptions", "description": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6283803, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_status_change_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_status_change_tmp')),\n staging_columns=get_email_event_status_change_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n bounced as is_bounced,\n id as event_id,\n portal_subscription_status as subscription_status,\n requested_by as requested_by_email,\n source as change_source,\n subscriptions\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_status_change_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_status_change_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_status_change_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_status_change_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_status_change.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n bounced as bounced,\n id as id,\n portal_subscription_status as portal_subscription_status,\n requested_by as requested_by,\n source as source,\n subscriptions as subscriptions\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n bounced as is_bounced,\n id as event_id,\n portal_subscription_status as subscription_status,\n requested_by as requested_by_email,\n source as change_source,\n subscriptions\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline_stage": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_pipeline_stage.sql", "original_file_path": "models/staging/stg_hubspot__ticket_pipeline_stage.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_pipeline_stage"], "alias": "stg_hubspot__ticket_pipeline_stage", "checksum": {"name": "sha256", "checksum": "7f43ae83f23429394a3b879d8d06652354660e8e9653793cfc6e9b8477bdcb14"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket pipeline stage.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_ticket_pipeline_stage_deleted": {"name": "is_ticket_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the pipeline stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_id": {"name": "ticket_pipeline_stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_created_at": {"name": "ticket_pipeline_stage_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_updated_at": {"name": "ticket_pipeline_stage_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.222057, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_stage_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_hubspot__ticket_pipeline_stage_tmp')),\n staging_columns=get_ticket_pipeline_stage_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n _fivetran_deleted as is_ticket_pipeline_stage_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n display_order,\n is_closed,\n label as pipeline_stage_label,\n cast(pipeline_id as {{ dbt.type_string() }}) as ticket_pipeline_id,\n cast(stage_id as {{ dbt.type_string() }}) as ticket_pipeline_stage_id,\n ticket_state,\n created_at as ticket_pipeline_stage_created_at,\n updated_at as ticket_pipeline_stage_updated_at\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_pipeline_stage_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_stage_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_pipeline_stage_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_pipeline_stage.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n display_order as display_order,\n is_closed as is_closed,\n label as label,\n pipeline_id as pipeline_id,\n stage_id as stage_id,\n ticket_state as ticket_state,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n _fivetran_deleted as is_ticket_pipeline_stage_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n display_order,\n is_closed,\n label as pipeline_stage_label,\n cast(pipeline_id as TEXT) as ticket_pipeline_id,\n cast(stage_id as TEXT) as ticket_pipeline_stage_id,\n ticket_state,\n created_at as ticket_pipeline_stage_created_at,\n updated_at as ticket_pipeline_stage_updated_at\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_actor": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_actor.sql", "original_file_path": "models/staging/stg_hubspot__conversation_actor.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_actor", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_actor"], "alias": "stg_hubspot__conversation_actor", "checksum": {"name": "sha256", "checksum": "faeeb444377df9dada6679130cf999fea2c94234ca1c5c0d4404ce2b7fe092fd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an actor (user or contact) in HubSpot conversations.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "actor_id": {"name": "actor_id", "description": "Unique ID of the actor. The first letter corresponds with the type of actor (A- agent, B- bot, S- system, E- email, I- integration, L- customer agent).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "avatar": {"name": "avatar", "description": "URL of the actor's avatar image.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the actor (e.g., VISITOR, AGENT, BOT, SYSTEM).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1858654, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_actor_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_actor_tmp')),\n staging_columns=get_conversation_actor_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as actor_id,\n avatar,\n email,\n name,\n upper(type) as type\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_actor_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_actor_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_actor_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_actor_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_actor.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n avatar as avatar,\n email as email,\n name as name,\n type as type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as actor_id,\n avatar,\n email,\n name,\n upper(type) as type\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list_member": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_list_member.sql", "original_file_path": "models/staging/stg_hubspot__contact_list_member.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list_member", "fqn": ["hubspot", "staging", "stg_hubspot__contact_list_member"], "alias": "stg_hubspot__contact_list_member", "checksum": {"name": "sha256", "checksum": "a176018fc8d652b556f06e7d9e338c0b961227984d9f0b054d595837fe3ef0c7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a contact and a contact list.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_list_member_deleted": {"name": "is_contact_list_member_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "added_timestamp": {"name": "added_timestamp", "description": "The timestamp a contact was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the related contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.673239, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_list_member_tmp') }} \n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_member_tmp')),\n staging_columns=get_contact_list_member_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_contact_list_member_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(added_at as {{ dbt.type_timestamp() }}) as added_timestamp,\n contact_id,\n contact_list_id\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list_member_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_list_member_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_list_member_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_list_member_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_list_member.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member_tmp\" \n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n added_at as added_at,\n contact_id as contact_id,\n contact_list_id as contact_list_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_contact_list_member_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(added_at as timestamp) as added_timestamp,\n contact_id,\n contact_list_id\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_note": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_note.sql", "original_file_path": "models/staging/stg_hubspot__engagement_note.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_note", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_note"], "alias": "stg_hubspot__engagement_note", "checksum": {"name": "sha256", "checksum": "26c7e6e53c8040103d5c7fcc6c0634548d50e2bfae888cabbd81536bfbe74273"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a NOTE engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "note": {"name": "note", "description": "The body of the note. The body has a limit of 65536 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the note's time of creation and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the note's time of occurrence and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the note. This field determines the user listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the note. This field determines the team listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_note_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6954217, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_note_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_note_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_note_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_note_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_note_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_note_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_note_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_note_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_note.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n cast(null as TEXT) as note,\n type as engagement_type,\n engagement_id as engagement_id,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n property_hubspot_owner_id as owner_id,\n property_hubspot_team_id as team_id\n \n \n \n \n \n \n \n\n \n \n , \"property_hs_body_preview\" as body_preview\n , \"property_hs_lastmodifieddate\" as lastmodifieddate\n , \"property_hs_note_body\" as note_body\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_call": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_call.sql", "original_file_path": "models/staging/stg_hubspot__engagement_call.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_call", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_call"], "alias": "stg_hubspot__engagement_call", "checksum": {"name": "sha256", "checksum": "56c1ea835689014259d72c088a76494ad04a87307d335f363478a1c3b0f311bb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CALL engagement event. All source `property_hs_*` fields", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_call_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.688514, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_call_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_call_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_call_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_call_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_call_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_call_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_call_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_call_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_call.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n engagement_id as engagement_id,\n type as engagement_type,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n cast(null as integer) as owner_id,\n cast(null as integer) as team_id\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__submission_response": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__submission_response", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__submission_response.sql", "original_file_path": "models/staging/stg_hubspot__submission_response.sql", "unique_id": "model.hubspot.stg_hubspot__submission_response", "fqn": ["hubspot", "staging", "stg_hubspot__submission_response"], "alias": "stg_hubspot__submission_response", "checksum": {"name": "sha256", "checksum": "dfa5d224c46cd8fc5dd3ac0dad088a2d38a78dab9cce842e7cbb0c9903074348"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a single field response from a HubSpot form submission.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "conversion_id": {"name": "conversion_id", "description": "Unique identifier for the specific form conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The ID of the form the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_value": {"name": "field_value", "description": "The value submitted for the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submitted_at": {"name": "submitted_at", "description": "Unix timestamp in milliseconds of when the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submitted_timestamp": {"name": "submitted_timestamp", "description": "Timestamp of when the form was submitted, converted from the `submitted_at` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL of the page where the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the HubSpot object type associated with the submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__form.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6122644, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__submission_response_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__submission_response_tmp')),\n staging_columns=get_submission_response_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n conversion_id,\n form_id,\n field_name,\n field_value,\n submitted_at,\n {{ dbt.dateadd(datepart='millisecond',interval='submitted_at', from_date_or_timestamp=\"cast('1970-01-01' as \" ~ dbt.type_timestamp() ~ \")\") }} as submitted_timestamp,\n page_url,\n object_type_id,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__submission_response_tmp", "package": null, "version": null}, {"name": "stg_hubspot__submission_response_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_submission_response_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.dateadd"], "nodes": ["model.hubspot.stg_hubspot__submission_response_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__submission_response.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n conversion_id as conversion_id,\n form_id as form_id,\n field_name as field_name,\n field_value as field_value,\n submitted_at as submitted_at,\n page_url as page_url,\n object_type_id as object_type_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n conversion_id,\n form_id,\n field_name,\n field_value,\n submitted_at,\n \n\n cast('1970-01-01' as timestamp) + ((interval '1 millisecond') * (submitted_at))\n\n as submitted_timestamp,\n page_url,\n object_type_id,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__property.sql", "original_file_path": "models/staging/stg_hubspot__property.sql", "unique_id": "model.hubspot.stg_hubspot__property", "fqn": ["hubspot", "staging", "stg_hubspot__property"], "alias": "stg_hubspot__property", "checksum": {"name": "sha256", "checksum": "aac7e1bcc055095a809ae9f851f0b0a5c88c8c5355d105c5b12502d911b181f7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a property.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "(DEPRECATED IN OCTOBER 2025) Fivetran generated id. Joins to `property_id` (ALSO DEPRECATED) in the `PROPERTY_OPTION` table. Use `hubspot_object` to join to `PROPERTY_OPTION` instead.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "calculated": {"name": "calculated", "description": "Indicates if the property is calculated by a HubSpot process", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp representing when the property was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A description of the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_type": {"name": "field_type", "description": "One of textarea, text, date, file, number, select, radio, checkbox, or booleancheckbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "group_name": {"name": "group_name", "description": "The name of the property group that the property belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_defined": {"name": "hubspot_defined", "description": "This will be true for default properties that are built into HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this property is related to other objects, the object will be listed here. Part of the primary key with `property_name`. Use `hubspot_object` to join with the `PROPERTY_OPTION` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_label": {"name": "property_label", "description": "A human readable label for the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_name": {"name": "property_name", "description": "The internal name of the property. Part of the primary key with `hubspot_object`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_type": {"name": "property_type", "description": "One of string, number, date, datetime, or enumeration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp representing when the property was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__property.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2285511, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__property_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__property_tmp')),\n staging_columns=get_property_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_id,\n _fivetran_synced,\n calculated,\n created_at,\n description,\n field_type,\n group_name,\n hubspot_defined,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n label as property_label,\n name as property_name,\n type as property_type,\n updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__property_tmp", "package": null, "version": null}, {"name": "stg_hubspot__property_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_property_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__property_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__property.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__property_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n calculated as calculated,\n created_at as created_at,\n description as description,\n field_type as field_type,\n group_name as group_name,\n hubspot_defined as hubspot_defined,\n hubspot_object as hubspot_object,\n label as label,\n name as name,\n show_currency_symbol as show_currency_symbol,\n type as type,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_id,\n _fivetran_synced,\n calculated,\n created_at,\n description,\n field_type,\n group_name,\n hubspot_defined,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n label as property_label,\n name as property_name,\n type as property_type,\n updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_engagement": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_engagement.sql", "original_file_path": "models/staging/stg_hubspot__ticket_engagement.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_engagement", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_engagement"], "alias": "stg_hubspot__ticket_engagement", "checksum": {"name": "sha256", "checksum": "e037aee69fa126e3a60d1f65170ff2c655664f3482b1df0605a6bac35634ae26"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2179248, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_engagement_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_engagement_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_engagement_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_engagement_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_engagement_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_engagement_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_engagement_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_engagement_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_engagement.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_inbox": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_inbox.sql", "original_file_path": "models/staging/stg_hubspot__conversation_inbox.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_inbox", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_inbox"], "alias": "stg_hubspot__conversation_inbox", "checksum": {"name": "sha256", "checksum": "f4602551f7ed788088c6a1222120c4dda5cb5f147d190069edd3bc6917d929e0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a conversation inbox in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "inbox_id": {"name": "inbox_id", "description": "Unique ID of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the inbox is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the inbox was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the inbox (e.g., HELP_DESK, INBOX).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the inbox was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.1868827, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_inbox_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_inbox_tmp')),\n staging_columns=get_conversation_inbox_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as inbox_id,\n active as is_active,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n name,\n upper(type) as type,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_inbox_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_inbox_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_inbox_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_inbox_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_inbox.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n active as active,\n created_at as created_at,\n name as name,\n type as type,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as inbox_id,\n active as is_active,\n cast(created_at as timestamp) as created_at,\n name,\n upper(type) as type,\n cast(updated_at as timestamp) as updated_at\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact.sql", "original_file_path": "models/staging/stg_hubspot__contact.sql", "unique_id": "model.hubspot.stg_hubspot__contact", "fqn": ["hubspot", "staging", "stg_hubspot__contact"], "alias": "stg_hubspot__contact", "checksum": {"name": "sha256", "checksum": "b759e986c5b0eb86ccea4b0d8380ffa0109cd008cb9f8d1adb02ed6f06e8e709"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "The email address of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_company": {"name": "contact_company", "description": "The name of the contact's company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date that the contact was created in your HubSpot account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "job_title": {"name": "job_title", "description": "The contact's job title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_annual_revenue": {"name": "company_annual_revenue", "description": "The contact's annual company revenue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_object_ids": {"name": "merged_object_ids", "description": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.680895, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_tmp')),\n staging_columns=get_contact_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_tmp')),\n staging_columns=get_contact_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__contact_tmp',get_contact_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_contact_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_tmp')), \n prefix='property_', exclude=exclude_cols) \n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns.\n -- a few columns below are aliased within the macros/get_contact_columns.sql macro\n source_relation,\n contact_id,\n is_contact_deleted,\n cast(merged_object_ids as {{ dbt.type_string() }}) as merged_object_ids, -- using this field to merge contacts\n email,\n contact_company,\n first_name,\n last_name,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n job_title,\n company_annual_revenue,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n\n --The below macro adds the fields defined within your hubspot__contact_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__contact_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__contact_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__contact_calculated_fields') }}\n\n from macro\n{% endif %} \n\n), joined as (\n {{ add_property_labels('hubspot__contact_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as is_contact_deleted,\n _fivetran_synced as _fivetran_synced,\n id as contact_id,\n property_hs_merged_object_ids as merged_object_ids,\n property_email as email,\n property_company as contact_company,\n property_firstname as first_name,\n property_lastname as last_name,\n property_createdate as created_date,\n property_jobtitle as job_title,\n property_annualrevenue as company_annual_revenue\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns.\n -- a few columns below are aliased within the macros/get_contact_columns.sql macro\n source_relation,\n contact_id,\n is_contact_deleted,\n cast(merged_object_ids as TEXT) as merged_object_ids, -- using this field to merge contacts\n email,\n contact_company,\n first_name,\n last_name,\n cast(created_date as timestamp) as created_date,\n job_title,\n company_annual_revenue,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n\n --The below macro adds the fields defined within your hubspot__contact_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__contact_calculated_fields variable.\n \n\n\n\n from macro\n \n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_print": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_print.sql", "original_file_path": "models/staging/stg_hubspot__email_event_print.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_print", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_print"], "alias": "stg_hubspot__email_event_print", "checksum": {"name": "sha256", "checksum": "79b75e64151e19992c5374e1b41b2487cfabd5e1e90e88befb69e0aadd302f20"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a PRINT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_print_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034521.6257086, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_print_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_print_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_print_tmp')),\n staging_columns=get_email_event_print_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_print_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_print_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_print_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_print_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_print.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n id as id,\n ip_address as ip_address,\n location as location,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_company.sql", "original_file_path": "models/staging/stg_hubspot__deal_company.sql", "unique_id": "model.hubspot.stg_hubspot__deal_company", "fqn": ["hubspot", "staging", "stg_hubspot__deal_company"], "alias": "stg_hubspot__deal_company", "checksum": {"name": "sha256", "checksum": "6b75ab746898087b668a8169c44431f3ebcc1db6431661e0674e299a7528884a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a deal and company.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.236566, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_company\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_company_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_company_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_company_tmp')),\n staging_columns=get_deal_company_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n company_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_company_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_company_tmp\"\n\n), macro as (\n\n select\n \n cast(null as timestamp) as _fivetran_synced,\n deal_id as deal_id,\n company_id as company_id,\n type_id as type_id,\n category as category\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n company_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_company.sql", "original_file_path": "models/staging/stg_hubspot__ticket_company.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_company", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_company"], "alias": "stg_hubspot__ticket_company", "checksum": {"name": "sha256", "checksum": "c7a620e472f2d20f73d2ae48f9f354425eedb4b1aa8fbaab00730930dc499a68"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and company.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034522.2156103, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_company_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_company_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_company_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_company_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_company_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n company_id as company_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_deal_tmp"], "alias": "stg_hubspot__engagement_deal_tmp", "checksum": {"name": "sha256", "checksum": "e8fe954364c05e316783d3aac309f1bb3b20cc2bffeff51831a6755e8ba6d408"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.378135, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_deal"], ["hubspot", "engagement_deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_deal_data\n\n\n select\n \"deal_id\",\n \"engagement_id\",\n \"engagement_type\",\n \"type_id\",\n \"_fivetran_synced\",\n \"category\"\n from \"postgres\".\"public\".\"engagement_deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_print_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_print_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_print_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_print_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_print_tmp"], "alias": "stg_hubspot__email_event_print_tmp", "checksum": {"name": "sha256", "checksum": "86fe026f50e3b8093870021f29b6abd5dc6b99b4f0a31b008bd4da49612dea34"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_print_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.402621, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_print_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_print'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_print"], ["hubspot", "email_event_print"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_print"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_print_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_print_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_print_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"browser\",\n \"ip_address\",\n \"location\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_print_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_communication_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_communication_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_communication_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_communication_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_communication_tmp"], "alias": "stg_hubspot__engagement_communication_tmp", "checksum": {"name": "sha256", "checksum": "f7a9ba47b8eb48e57741f74c1c97d2c6fb4b43cf858903409bffbb22b37b7e42"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4108815, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_communication'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_communication"], ["hubspot", "engagement_communication"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_communication_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_communication_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_communication_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_createdate\",\n \"property_hs_timestamp\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_communication_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_pipeline_stage_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_pipeline_stage_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_pipeline_stage_tmp"], "alias": "stg_hubspot__ticket_pipeline_stage_tmp", "checksum": {"name": "sha256", "checksum": "407831fc4b5b3784abaf0be5c1b4c1477909397febad57dce7239aa5a913143e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4196992, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_pipeline_stage'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_pipeline_stage"], ["hubspot", "ticket_pipeline_stage"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_pipeline_stage_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_pipeline_stage_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_pipeline_stage_data\n\n\n select\n \"stage_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"display_order\",\n \"is_closed\",\n \"label\",\n \"pipeline_id\",\n \"ticket_state\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"ticket_pipeline_stage_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_email_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_email_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_email_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_email_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_email_tmp"], "alias": "stg_hubspot__engagement_email_tmp", "checksum": {"name": "sha256", "checksum": "ad76ee3b305df539a6721dcbe6f8ef58aca246ce0e293d5047cb15c6761d4210"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_email_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4274552, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_email_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_email'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_email"], ["hubspot", "engagement_email"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_email"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_email_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_email_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_email_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_all_owner_ids\",\n \"property_hs_all_team_ids\",\n \"property_hs_createdate\",\n \"property_hs_email_subject\",\n \"property_hs_email_text\",\n \"property_hs_lastmodifieddate\",\n \"property_hs_modified_by\",\n \"property_hs_timestamp\",\n \"property_hubspot_owner_id\",\n \"property_hubspot_team_id\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_email_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_tmp"], "alias": "stg_hubspot__engagement_tmp", "checksum": {"name": "sha256", "checksum": "43baf350a8646a7a28ae217e6e6b13410b4bfb50cade22558d25aeca2a3484d4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4363437, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement"], ["hubspot", "engagement"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_data\n\n\n select\n \"id\",\n \"type\",\n \"_fivetran_synced\",\n \"portal_id\"\n from \"postgres\".\"public\".\"engagement_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_click_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_click_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_click_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_click_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_click_tmp"], "alias": "stg_hubspot__email_event_click_tmp", "checksum": {"name": "sha256", "checksum": "82f14ba1ee61c4ebdc50beaa22ee2f0e43bc1dfe9c252a22adb1694f98277023"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_click_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4445176, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_click_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_click'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_click"], ["hubspot", "email_event_click"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_click"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_click_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_click_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_click_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"referer\",\n \"browser\",\n \"location\",\n \"ip_address\",\n \"url\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_click_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_property_history_tmp"], "alias": "stg_hubspot__company_property_history_tmp", "checksum": {"name": "sha256", "checksum": "849bdc99781ae20cfee3dab7ae5e8c88a5f24fa8d3899e2b1bab7359072a6aa8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4528484, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled','hubspot_company_property_history_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company_property_history"], ["hubspot", "company_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_property_history_data\n\n\n select\n \"company_id\",\n \"timestamp\",\n \"_fivetran_synced\",\n \"source\",\n \"source_id\",\n \"name\",\n \"value\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"company_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_thread_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_thread_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_thread_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_thread_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_thread_tmp"], "alias": "stg_hubspot__conversation_thread_tmp", "checksum": {"name": "sha256", "checksum": "fac0696e0385f702058d15fd50acaa67a98f1fbbb5420f517ac3d8722e96ea00"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4611597, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_thread'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_thread"], ["hubspot", "conversation_thread"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_thread"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_thread_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_thread_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_thread_data\n\n\n select\n \"id\",\n \"inbox_id\",\n \"associated_contact_id\",\n \"associated_ticket_id\",\n \"original_channel_account_id\",\n \"original_channel_id\",\n \"assigned_to\",\n \"closed_at\",\n \"created_at\",\n \"latest_message_received_timestamp\",\n \"latest_message_sent_timestamp\",\n \"latest_message_timestamp\",\n \"spam\",\n \"status\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_thread_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_list_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_list_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_list_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_list_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_list_tmp"], "alias": "stg_hubspot__marketing_event_list_tmp", "checksum": {"name": "sha256", "checksum": "12324c06124c2dbcb6f92e66bda757c7bd86ad98d3a20fe6c7c10ef78b1b1c1b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_list_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4691834, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_list_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event_list'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event_list"], ["hubspot", "marketing_event_list"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_list_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_list_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_list_data\n\n\n select\n \"id\",\n \"marketing_event_id\",\n \"created_by_id\",\n \"updated_by_id\",\n \"filters_updated_at\",\n \"created_at\",\n \"processing_status\",\n \"deleted_at\",\n \"list_version\",\n \"object_type_id\",\n \"size\",\n \"name\",\n \"updated_at\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_list_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_pipeline_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_pipeline_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_pipeline_tmp"], "alias": "stg_hubspot__deal_pipeline_tmp", "checksum": {"name": "sha256", "checksum": "d3f756b87cda3fc4cb9a05c04cbc7a1ab59561104efa877a9aa9a2c10205e3c8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4778683, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_pipeline'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_pipeline"], ["hubspot", "deal_pipeline"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_pipeline_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_pipeline_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_pipeline_data\n\n\n select\n \"pipeline_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"display_order\",\n \"label\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"deal_pipeline_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__merged_deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__merged_deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__merged_deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__merged_deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__merged_deal_tmp"], "alias": "stg_hubspot__merged_deal_tmp", "checksum": {"name": "sha256", "checksum": "114faac6792c12abaf9c0652350fac34d524bce44187b37c1d41a7cb0cb8df04"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4860587, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='merged_deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "merged_deal"], ["hubspot", "merged_deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.merged_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__merged_deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_merged_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: merged_deal_data\n\n\n select\n \"deal_id\",\n \"merged_deal_id\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"merged_deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel_account_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_channel_account_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_channel_account_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel_account_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_channel_account_tmp"], "alias": "stg_hubspot__conversation_channel_account_tmp", "checksum": {"name": "sha256", "checksum": "65f90fcdaf5c0f9158dc17cc5784e3da8c572ea13ae73b253cb6b9711f90d882"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.4947996, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_channel_account'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_channel_account"], ["hubspot", "conversation_channel_account"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_channel_account"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_channel_account_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_channel_account_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_channel_account_data\n\n\n select\n \"id\",\n \"channel_id\",\n \"inbox_id\",\n \"active\",\n \"authorized\",\n \"created_at\",\n \"name\",\n \"delivery_identifier_type\",\n \"delivery_identifier_value\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_channel_account_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_contact_tmp"], "alias": "stg_hubspot__deal_contact_tmp", "checksum": {"name": "sha256", "checksum": "f4cc39640f724550c34c01fb7bcd40024697aad8d9313c11cabf8b7681a6684b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5027773, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_contact_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_contact_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_contact"], ["hubspot", "deal_contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_contact_data\n\n\n select\n \"contact_id\",\n \"deal_id\",\n \"_fivetran_synced\",\n \"type_id\",\n \"category\"\n from \"postgres\".\"public\".\"deal_contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_company_tmp"], "alias": "stg_hubspot__deal_company_tmp", "checksum": {"name": "sha256", "checksum": "6f6cc82e357546e0d7ad70beb98711c22e3e439e8b06d5412877f24de4d96629"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5110636, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_company_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_company_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_company"], ["hubspot", "deal_company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_company_data\n\n\n select\n \"company_id\",\n \"deal_id\",\n \"type_id\",\n \"category\"\n from \"postgres\".\"public\".\"deal_company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__role_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__role_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__role_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__role_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__role_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__role_tmp"], "alias": "stg_hubspot__role_tmp", "checksum": {"name": "sha256", "checksum": "ec17dc857f1373950abfb505988bf6d9bf71855273a9e22276d065e7685e61e3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.51916, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__role_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='role'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "role"], ["hubspot", "role"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.role"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__role_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_role_identifier\n -- database: postgres \n -- schema: public\n -- identifier: role_data\n\n\n select\n \"id\",\n \"name\",\n \"requires_billing_write\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"role_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_participant_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_participant_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_participant_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_participant_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_participant_tmp"], "alias": "stg_hubspot__marketing_event_participant_tmp", "checksum": {"name": "sha256", "checksum": "da10f463771c9c0dc2123a70a46ed8ead3bc1ad402ab224616f6cfb2e40f191d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_participant_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5271785, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_participant_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event_participant'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event_participant"], ["hubspot", "marketing_event_participant"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event_participant"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_participant_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_participant_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_participant_data\n\n\n select\n \"id\",\n \"marketing_event_id\",\n \"contact_id\",\n \"created_at\",\n \"properties_occurred_at\",\n \"properties_attendance_percentage\",\n \"properties_attendance_state\",\n \"properties_attendance_duration_seconds\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_participant_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_engagement_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_engagement_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_engagement_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_engagement_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_engagement_tmp"], "alias": "stg_hubspot__ticket_engagement_tmp", "checksum": {"name": "sha256", "checksum": "9f0e02363af755fe5278720faa76f8270f10aeae3f21c895901e8af6dd57b218"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5360196, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_engagement'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_engagement"], ["hubspot", "ticket_engagement"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_engagement"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_engagement_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_engagement_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_engagement_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"engagement_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_engagement_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_form_submission_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_form_submission_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_form_submission_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_form_submission_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_form_submission_tmp"], "alias": "stg_hubspot__contact_form_submission_tmp", "checksum": {"name": "sha256", "checksum": "a6af6c18e065285a47f7428e34b5511878c36861b7aba77b37bb80316367754a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.544189, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_form_submission'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_form_submission"], ["hubspot", "contact_form_submission"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_form_submission"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_form_submission_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_form_submission_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_form_submission_data\n\n\n select\n \"timestamp\",\n \"form_id\",\n \"contact_id\",\n \"conversion_id\",\n \"page_id\",\n \"page_url\",\n \"portal_id\",\n \"title\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"contact_form_submission_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_tmp"], "alias": "stg_hubspot__marketing_event_tmp", "checksum": {"name": "sha256", "checksum": "98fb2f6a2bb7df828a73a7809b646e597976d2e0f3492a65eaf31ad0ca77c77b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.553206, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event"], ["hubspot", "marketing_event"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_data\n\n\n select\n \"id\",\n \"app_id\",\n \"app_name\",\n \"attendees\",\n \"cancellations\",\n \"created_at\",\n \"end_date_time\",\n \"event_cancelled\",\n \"event_completed\",\n \"event_description\",\n \"event_name\",\n \"event_organizer\",\n \"event_status\",\n \"event_type\",\n \"event_url\",\n \"external_event_id\",\n \"no_shows\",\n \"registrants\",\n \"start_date_time\",\n \"updated_at\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_message_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_message_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_message_history_tmp"], "alias": "stg_hubspot__conversation_message_history_tmp", "checksum": {"name": "sha256", "checksum": "b471ef84700edda942f5078bc50eef52729cbe6a7fc45b7facc79c9899d565eb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5616148, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_message_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_message_history"], ["hubspot", "conversation_message_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_message_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_message_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_message_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_message_history_data\n\n\n select\n \"id\",\n \"thread_id\",\n \"channel_account_id\",\n \"channel_id\",\n \"from_inbox_id\",\n \"to_inbox_id\",\n \"assigned_to\",\n \"assigned_from\",\n \"created_at\",\n \"created_by\",\n \"direction\",\n \"in_reply_to_id\",\n \"new_status\",\n \"rich_text\",\n \"subject\",\n \"text\",\n \"truncation_status\",\n \"type\",\n \"updated_at\",\n \"client_type\",\n \"status_type\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"conversation_message_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_call_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_call_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_call_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_call_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_call_tmp"], "alias": "stg_hubspot__engagement_call_tmp", "checksum": {"name": "sha256", "checksum": "3aef1f3c5ec606598957d13de131aeeebe7768cc9189d2c0f45cdef7148b6aa2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_call_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5694387, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_call_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_call'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_call"], ["hubspot", "engagement_call"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_call"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_call_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_call_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_call_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_createdate\",\n \"property_hs_timestamp\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_call_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_deal_tmp"], "alias": "stg_hubspot__ticket_deal_tmp", "checksum": {"name": "sha256", "checksum": "d675322f483225022a3b77e3e847a6d203943c232b907d10dad53e77fa1979c6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False) and var('hubspot_ticket_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5776308, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal_tmp\"", "raw_code": "{{ config(enabled=(var('hubspot_service_enabled', false) and var('hubspot_ticket_deal_enabled', false))) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_deal"], ["hubspot", "ticket_deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_deal_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"deal_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list_member_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_list_member_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_list_member_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_list_member_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_list_member_tmp"], "alias": "stg_hubspot__company_list_member_tmp", "checksum": {"name": "sha256", "checksum": "4a0883ef68d7afe74309c32fc4a1bc173bd20908c614a68d11777bf642afd368"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5861769, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company_list_member'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company_list_member"], ["hubspot", "company_list_member"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company_list_member"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_list_member_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_list_member_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_list_member_data\n\n\n select\n \"company_id\",\n \"company_list_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"added_at\"\n from \"postgres\".\"public\".\"company_list_member_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_note_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_note_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_note_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_note_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_note_tmp"], "alias": "stg_hubspot__engagement_note_tmp", "checksum": {"name": "sha256", "checksum": "bc69a7ebfdf8a421cbf7e30c02f44b78b7ec838c2b9f718094a4fbf37c31783d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_note_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.5943844, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_note_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_note'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_note"], ["hubspot", "engagement_note"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_note"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_note_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_note_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_note_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_body_preview\",\n \"property_hs_createdate\",\n \"property_hs_lastmodifieddate\",\n \"property_hs_note_body\",\n \"property_hs_timestamp\",\n \"property_hubspot_owner_id\",\n \"property_hubspot_team_id\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_note_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_inbox_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_inbox_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_inbox_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_inbox_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_inbox_tmp"], "alias": "stg_hubspot__conversation_inbox_tmp", "checksum": {"name": "sha256", "checksum": "bcb810382efcdae23134cfbcecff2694f64e18f823f345c1775178ecbb9fdaf3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6026912, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_inbox'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_inbox"], ["hubspot", "conversation_inbox"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_inbox"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_inbox_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_inbox_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_inbox_data\n\n\n select\n \"id\",\n \"active\",\n \"created_at\",\n \"name\",\n \"type\",\n \"updated_at\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_inbox_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_contact_tmp"], "alias": "stg_hubspot__ticket_contact_tmp", "checksum": {"name": "sha256", "checksum": "e783c7fdd45189cdbb695f42e935d2096e3c275a34f99e407d28e1343f4d2948"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6105, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_contact"], ["hubspot", "ticket_contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_contact_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"contact_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_pipeline_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_pipeline_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_pipeline_tmp"], "alias": "stg_hubspot__ticket_pipeline_tmp", "checksum": {"name": "sha256", "checksum": "2b2eb318f06552c90972b169e071eb7662b238075aede7944f5f0e2ac904b8fc"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6185217, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_pipeline'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_pipeline"], ["hubspot", "ticket_pipeline"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_pipeline_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_pipeline_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_pipeline_data\n\n\n select\n \"pipeline_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"display_order\",\n \"label\",\n \"object_type_id\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"ticket_pipeline_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_open_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_open_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_open_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_open_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_open_tmp"], "alias": "stg_hubspot__email_event_open_tmp", "checksum": {"name": "sha256", "checksum": "1ffff7f296f0b19a5efe5aafddce47ec0e827cf85cf6b2d0907da043f80170af"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_open_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6265244, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_open_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_open'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_open"], ["hubspot", "email_event_open"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_open"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_open_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_open_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_open_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"duration\",\n \"browser\",\n \"ip_address\",\n \"location\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_open_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_tmp"], "alias": "stg_hubspot__company_tmp", "checksum": {"name": "sha256", "checksum": "55ed7f7f30880b56c358ff164ad46129da886260cc6ef5e8da94b2c9dfa3c34c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6347997, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company"], ["hubspot", "company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_data\n\n\n select\n \"id\",\n \"is_deleted\",\n \"_fivetran_synced\",\n \"property_name\",\n \"property_description\",\n \"property_createdate\",\n \"property_industry\",\n \"property_address\",\n \"property_address_2\",\n \"property_city\",\n \"property_state\",\n \"property_country\",\n \"property_annualrevenue\",\n \"property_hs_all-funky-a9384-syntax\"\n from \"postgres\".\"public\".\"company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_stage_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_stage_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_stage_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_stage_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_stage_tmp"], "alias": "stg_hubspot__deal_stage_tmp", "checksum": {"name": "sha256", "checksum": "6427b897d438ebdf0a1680f85dd5b2ecac4c6275fe50cbc3a328e5916ea01788"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6430888, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_stage'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_stage"], ["hubspot", "deal_stage"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_stage_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_stage_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_stage_data\n\n\n select\n \"_fivetran_start\",\n \"deal_id\",\n \"_fivetran_active\",\n \"_fivetran_end\",\n \"_fivetran_synced\",\n \"date_entered\",\n \"source\",\n \"source_id\",\n \"value\"\n from \"postgres\".\"public\".\"deal_stage_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_tmp"], "alias": "stg_hubspot__deal_tmp", "checksum": {"name": "sha256", "checksum": "832978a45c22d72dc41e9ec2c9d102d41379c00b17c6faedf72942619900a2e9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.65111, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal"], ["hubspot", "deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_data\n\n\n select\n \"deal_id\",\n \"is_deleted\",\n \"deal_pipeline_id\",\n \"deal_pipeline_stage_id\",\n \"owner_id\",\n \"portal_id\",\n \"property_dealname\",\n \"property_description\",\n \"property_amount\",\n \"property_closedate\",\n \"property_createdate\"\n from \"postgres\".\"public\".\"deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_channel_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_channel_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_channel_tmp"], "alias": "stg_hubspot__conversation_channel_tmp", "checksum": {"name": "sha256", "checksum": "f2b1fc8aa99e949c40495b60da2ed7b6de2d75d8dd471da757f849e931081ce3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.659272, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_channel'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_channel"], ["hubspot", "conversation_channel"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_channel"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_channel_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_channel_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_channel_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_channel_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_delivered_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_delivered_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_delivered_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_delivered_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_delivered_tmp"], "alias": "stg_hubspot__email_event_delivered_tmp", "checksum": {"name": "sha256", "checksum": "3275a1d5c6314d9ccd0d45ec84d178beae5c5ccfbb6a274033bbd3816f1f31b6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_delivered_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6672366, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_delivered_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_delivered'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_delivered"], ["hubspot", "email_event_delivered"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_delivered"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_delivered_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_delivered_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_delivered_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"response\",\n \"smtp_id\"\n from \"postgres\".\"public\".\"email_event_delivered_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property_option_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property_option_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__property_option_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__property_option_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__property_option_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__property_option_tmp"], "alias": "stg_hubspot__property_option_tmp", "checksum": {"name": "sha256", "checksum": "c6623e478eb98eb7ae8f2a7d118816087de4341a8195ca5825b6fba27d618901"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.676158, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property_option_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='property_option'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "property_option"], ["hubspot", "property_option"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.property_option"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__property_option_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_property_option_identifier\n -- database: postgres \n -- schema: public\n -- identifier: property_option_data\n\n\n select\n \"label\",\n \"property_id\",\n \"_fivetran_synced\",\n \"display_order\",\n \"hidden\",\n \"value\",\n \"hubspot_object\",\n \"name\"\n from \"postgres\".\"public\".\"property_option_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_sent_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_sent_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_sent_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_sent_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_sent_tmp"], "alias": "stg_hubspot__email_event_sent_tmp", "checksum": {"name": "sha256", "checksum": "e759682718a60625abbb2f0ba1b301ac8094003021f2300f9f4095ff9b69d612"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.6841516, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_sent'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_sent"], ["hubspot", "email_event_sent"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_sent"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_sent_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_sent_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_sent_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"bcc\",\n \"cc\",\n \"from\",\n \"reply_to\",\n \"subject\"\n from \"postgres\".\"public\".\"email_event_sent_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__property_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__property_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__property_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__property_tmp"], "alias": "stg_hubspot__property_tmp", "checksum": {"name": "sha256", "checksum": "d72f385a3b0df3ac494b050e08eb1318e33e6b585180dd94ecfa13cb43f3e74e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.692646, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='property'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "property"], ["hubspot", "property"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.property"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__property_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_property_identifier\n -- database: postgres \n -- schema: public\n -- identifier: property_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"calculated\",\n \"created_at\",\n \"description\",\n \"field_type\",\n \"group_name\",\n \"hubspot_defined\",\n \"hubspot_object\",\n \"label\",\n \"name\",\n \"show_currency_symbol\",\n \"type\",\n \"updated_at\"\n from \"postgres\".\"public\".\"property_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_tmp"], "alias": "stg_hubspot__ticket_tmp", "checksum": {"name": "sha256", "checksum": "59ee5b779d4d415a3f11e588fc0fce82a67fa2e484206450ff05a25f2d713751"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.700519, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket"], ["hubspot", "ticket"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_data\n\n\n select\n \"_fivetran_synced\",\n \"id\",\n \"is_deleted\",\n \"property_closed_date\",\n \"property_createdate\",\n \"property_first_agent_reply_date\",\n \"property_hs_pipeline\",\n \"property_hs_pipeline_stage\",\n \"property_hs_ticket_category\",\n \"property_hs_ticket_priority\",\n \"property_hubspot_owner_id\",\n \"property_subject\",\n \"property_content\"\n from \"postgres\".\"public\".\"ticket_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_meeting_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_meeting_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_meeting_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_meeting_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_meeting_tmp"], "alias": "stg_hubspot__engagement_meeting_tmp", "checksum": {"name": "sha256", "checksum": "2513acf365ad94d47300fe36ceee819b577bb0d0c681b71bfb62452f82149a53"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_meeting_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7084513, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_meeting_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_meeting'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_meeting"], ["hubspot", "engagement_meeting"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_meeting"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_meeting_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_meeting_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_meeting_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_synced\",\n \"created_from_link_id\",\n \"end_time\",\n \"pre_meeting_prospect_reminders\",\n \"source\",\n \"source_id\",\n \"start_time\",\n \"web_conference_meeting_id\",\n \"meeting_outcome\",\n \"body\",\n \"external_url\",\n \"title\"\n from \"postgres\".\"public\".\"engagement_meeting_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_deferred_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_deferred_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_deferred_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_deferred_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_deferred_tmp"], "alias": "stg_hubspot__email_event_deferred_tmp", "checksum": {"name": "sha256", "checksum": "b8d3b04d270d6cdc08bf3b7e2a66217208dfb0d70f4e4dcc64f6c747229cd962"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_deferred_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.716781, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_deferred_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_deferred'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_deferred"], ["hubspot", "email_event_deferred"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_deferred"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_deferred_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_deferred_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_deferred_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"attempt\",\n \"response\"\n from \"postgres\".\"public\".\"email_event_deferred_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_property_history_tmp"], "alias": "stg_hubspot__contact_property_history_tmp", "checksum": {"name": "sha256", "checksum": "43d6741566a336e312b3b3a4b34a1174a5a360f8f3beb7e2eead4899d3c4b6c9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7251067, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_property_history"], ["hubspot", "contact_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_property_history_data\n\n\n select\n \"contact_id\",\n \"timestamp\",\n \"_fivetran_synced\",\n \"source\",\n \"name\",\n \"value\",\n \"source_id\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"contact_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_company_tmp"], "alias": "stg_hubspot__ticket_company_tmp", "checksum": {"name": "sha256", "checksum": "9c45f8bc1140173eccaa15cda4e34667b41d5dd370cc06bc5bc39a2e655a128c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7334933, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_company"], ["hubspot", "ticket_company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_company_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"company_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_status_change_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_status_change_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_status_change_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_status_change_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_status_change_tmp"], "alias": "stg_hubspot__email_event_status_change_tmp", "checksum": {"name": "sha256", "checksum": "fc8678808b62f257fdb4da8d956b66ba16536da2551fc7227b464163683633b1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.741478, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_status_change'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_status_change"], ["hubspot", "email_event_status_change"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_status_change_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_status_change_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_status_change_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"bounced\",\n \"portal_subscription_status\",\n \"requested_by\",\n \"source\",\n \"subscriptions\"\n from \"postgres\".\"public\".\"email_event_status_change_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_merge_audit_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_merge_audit_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_merge_audit_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_merge_audit_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_merge_audit_tmp"], "alias": "stg_hubspot__contact_merge_audit_tmp", "checksum": {"name": "sha256", "checksum": "fd7acf48a3fe7dfbf82fd4dca35b574d0ba1a028b79318a9ff5829595c675ed7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_contact_merge_audit_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7496052, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit_tmp\"", "raw_code": "{{ config(enabled=(var('hubspot_marketing_enabled', true) and var('hubspot_contact_merge_audit_enabled', false))) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_merge_audit'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_merge_audit"], ["hubspot", "contact_merge_audit"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_merge_audit"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_merge_audit_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_merge_audit_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_merge_audit_data\n\n\n select\n \"canonical_vid\",\n \"contact_id\",\n \"vid_to_merge\",\n \"_fivetran_synced\",\n \"entity_id\",\n \"first_name\",\n \"last_name\",\n \"num_properties_moved\",\n \"timestamp\",\n \"user_id\"\n from \"postgres\".\"public\".\"contact_merge_audit_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_list_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_list_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_list_tmp"], "alias": "stg_hubspot__contact_list_tmp", "checksum": {"name": "sha256", "checksum": "f8b3df675d1db3217b35e7c15b31bd7d51e62bed698c77eaa89e2e0602c7b9b9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7581708, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_list'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_list"], ["hubspot", "contact_list"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_list_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_list_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_list_data\n\n\n select\n \"id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"created_at\",\n \"updated_at\",\n \"name\",\n \"created_by_id\",\n \"object_type_id\",\n \"processing_status\",\n \"processing_type\",\n \"list_version\",\n \"filters_updated_at\",\n \"custom_field\"\n from \"postgres\".\"public\".\"contact_list_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_actor_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_actor_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_actor_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_actor_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_actor_tmp"], "alias": "stg_hubspot__conversation_actor_tmp", "checksum": {"name": "sha256", "checksum": "fa722eb4821c49a39e06261872f8ca7a5b926200bf5e4bd3915a357c1ef89fe0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7663589, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_actor'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_actor"], ["hubspot", "conversation_actor"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_actor"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_actor_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_actor_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_actor_data\n\n\n select\n \"id\",\n \"avatar\",\n \"email\",\n \"name\",\n \"type\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_actor_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_tmp"], "alias": "stg_hubspot__email_event_tmp", "checksum": {"name": "sha256", "checksum": "0d06ffe9ab7ed1d6fbacbbf707b45bbc7eeb2e44e549b8bfe63e9fd50d84692e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7742972, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event"], ["hubspot", "email_event"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"app_id\",\n \"caused_by_created\",\n \"caused_by_id\",\n \"created\",\n \"email_campaign_id\",\n \"obsoleted_by_created\",\n \"obsoleted_by_id\",\n \"portal_id\",\n \"sent_by_created\",\n \"sent_by_id\",\n \"type\",\n \"filtered_event\",\n \"recipient\"\n from \"postgres\".\"public\".\"email_event_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_pipeline_stage_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_pipeline_stage_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_pipeline_stage_tmp"], "alias": "stg_hubspot__deal_pipeline_stage_tmp", "checksum": {"name": "sha256", "checksum": "607c3e3828b148170af9e8d07013eb9eab7b519aaec76a167ce2638201bb9827"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7824903, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_pipeline_stage'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_pipeline_stage"], ["hubspot", "deal_pipeline_stage"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_pipeline_stage_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_pipeline_stage_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_pipeline_stage_data\n\n\n select\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"closed_won\",\n \"is_closed\",\n \"display_order\",\n \"probability\",\n \"stage_id\",\n \"label\",\n \"pipeline_id\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"deal_pipeline_stage_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_campaign_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_campaign_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_campaign_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_campaign_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_campaign_tmp"], "alias": "stg_hubspot__email_campaign_tmp", "checksum": {"name": "sha256", "checksum": "bde16718bff3684b9d59975c313f335f4528c0b84d22f0adf20ecbbbf2a6ec67"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7905679, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_campaign'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_campaign"], ["hubspot", "email_campaign"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_campaign"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_campaign_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_campaign_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_campaign_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"app_id\",\n \"content_id\",\n \"num_included\",\n \"num_queued\",\n \"sub_type\",\n \"type\",\n \"app_name\",\n \"name\",\n \"subject\"\n from \"postgres\".\"public\".\"email_campaign_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team_user_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team_user_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__team_user_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__team_user_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__team_user_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__team_user_tmp"], "alias": "stg_hubspot__team_user_tmp", "checksum": {"name": "sha256", "checksum": "03d010e98d51384e71be913a735cce89a4092bf24a3df82cadcfec1d5e9cf277"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.7993188, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team_user_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='team_user'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "team_user"], ["hubspot", "team_user"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.team_user"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__team_user_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_team_user_identifier\n -- database: postgres \n -- schema: public\n -- identifier: team_user_data\n\n\n select\n \"user_id\",\n \"team_id\",\n \"is_secondary_user\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"team_user_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_company_tmp"], "alias": "stg_hubspot__engagement_company_tmp", "checksum": {"name": "sha256", "checksum": "9b43e4143e530556e9b48f7dabd528376c9d701c6d68319095533c6ca132654c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8074493, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_company_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_company"], ["hubspot", "engagement_company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_company_data\n\n\n select\n \"company_id\",\n \"engagement_id\",\n \"engagement_type\",\n \"type_id\",\n \"_fivetran_synced\",\n \"category\"\n from \"postgres\".\"public\".\"engagement_company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_custom_property_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_custom_property_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_custom_property_tmp"], "alias": "stg_hubspot__marketing_event_custom_property_tmp", "checksum": {"name": "sha256", "checksum": "8e5295986c4cce18266020fd68626c70c7aded8fe7922a55ea25a7115e310270"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_custom_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8158326, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_custom_property_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_custom_property_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event_custom_property'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event_custom_property"], ["hubspot", "marketing_event_custom_property"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event_custom_property"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_custom_property_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_custom_property_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_custom_property_data\n\n\n select\n \"marketing_event_id\",\n \"name\",\n \"value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_custom_property_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner_team_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner_team_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__owner_team_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__owner_team_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__owner_team_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__owner_team_tmp"], "alias": "stg_hubspot__owner_team_tmp", "checksum": {"name": "sha256", "checksum": "e846c4ad7a2dffab89f21bc5d8fd8ad8ae490767d4ed645ba81359fe1750a0e3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8246791, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='owner_team'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "owner_team"], ["hubspot", "owner_team"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.owner_team"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__owner_team_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_owner_team_identifier\n -- database: postgres \n -- schema: public\n -- identifier: owner_team_data\n\n\n select\n \"owner_id\",\n \"team_id\",\n \"is_team_primary\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"owner_team_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_forward_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_forward_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_forward_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_forward_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_forward_tmp"], "alias": "stg_hubspot__email_event_forward_tmp", "checksum": {"name": "sha256", "checksum": "7c1387311f54b533a9bce9294ff52157c82253f3824b60bbdbbfec87016bd9a6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_forward_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8328168, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_forward'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_forward"], ["hubspot", "email_event_forward"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_forward"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_forward_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_forward_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_forward_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"browser\",\n \"ip_address\",\n \"location\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_forward_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_dropped_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_dropped_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_dropped_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_dropped_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_dropped_tmp"], "alias": "stg_hubspot__email_event_dropped_tmp", "checksum": {"name": "sha256", "checksum": "e4da8b77851bf0c81eea80284ee3fdee8365fe43e90fa743b3244477a15f2ddf"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_dropped_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8409383, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_dropped_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_dropped'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_dropped"], ["hubspot", "email_event_dropped"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_dropped"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_dropped_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_dropped_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_dropped_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"drop_reason\",\n \"bcc\",\n \"cc\",\n \"drop_message\",\n \"from\",\n \"reply_to\",\n \"subject\"\n from \"postgres\".\"public\".\"email_event_dropped_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__team_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__team_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__team_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__team_tmp"], "alias": "stg_hubspot__team_tmp", "checksum": {"name": "sha256", "checksum": "dc39a222b4e9a3af3c3417fcc3b46b02e2a361080ef36113bf3f46735562b8d6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8492048, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='team'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "team"], ["hubspot", "team"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.team"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__team_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_team_identifier\n -- database: postgres \n -- schema: public\n -- identifier: team_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"team_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__users_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__users_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__users_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__users_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__users_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__users_tmp"], "alias": "stg_hubspot__users_tmp", "checksum": {"name": "sha256", "checksum": "3f0f4bc069efa31265b26805e16bb7aec2f22d4596abfc1cef14848760823b64"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8573635, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__users_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='users'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "users"], ["hubspot", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.users"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__users_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_users_identifier\n -- database: postgres \n -- schema: public\n -- identifier: users_data\n\n\n select\n \"id\",\n \"primary_team_id\",\n \"role_id\",\n \"email\",\n \"first_name\",\n \"last_name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"users_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_task_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_task_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_task_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_task_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_task_tmp"], "alias": "stg_hubspot__engagement_task_tmp", "checksum": {"name": "sha256", "checksum": "e0defe8ab71be43e2345bf3d62de3ce473035a6898e13e36c0aa60987bfe8ad9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_task_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8654542, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_task_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_task'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_task"], ["hubspot", "engagement_task"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_task"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_task_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_task_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_task_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_createdate\",\n \"property_hs_object_id\",\n \"property_hs_task_type\",\n \"property_hs_timestamp\",\n \"property_hubspot_owner_id\",\n \"property_hubspot_team_id\",\n \"type\",\n \"task_type\",\n \"property_hs_engagement_source\"\n from \"postgres\".\"public\".\"engagement_task_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_tmp"], "alias": "stg_hubspot__contact_tmp", "checksum": {"name": "sha256", "checksum": "d10790aa71c3fb70c06dad4df81c8bfaf6606ba7115bdbec55c2316449d56094"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8737242, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact"], ["hubspot", "contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_data\n\n\n select\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_email\",\n \"id\",\n \"property_company\",\n \"property_firstname\",\n \"property_lastname\",\n \"property_email_1\",\n \"property_createdate\",\n \"property_jobtitle\",\n \"property_annualrevenue\",\n \"property_hs_merged_object_ids\",\n \"property_created_at\",\n \"property_first_conversion_date\"\n from \"postgres\".\"public\".\"contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__submission_response_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__submission_response_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__submission_response_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__submission_response_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__submission_response_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__submission_response_tmp"], "alias": "stg_hubspot__submission_response_tmp", "checksum": {"name": "sha256", "checksum": "5a35d8014c42b7af0d9bce0f5a2a7bcf83d72647e6e71a5e5d9b8dc3c1406cb0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8817244, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='submission_response'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "submission_response"], ["hubspot", "submission_response"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.submission_response"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__submission_response_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_submission_response_identifier\n -- database: postgres \n -- schema: public\n -- identifier: submission_response_data\n\n\n select\n \"conversion_id\",\n \"form_id\",\n \"field_name\",\n \"field_value\",\n \"submitted_at\",\n \"page_url\",\n \"object_type_id\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"submission_response_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_property_history_tmp"], "alias": "stg_hubspot__ticket_property_history_tmp", "checksum": {"name": "sha256", "checksum": "1f8b813f23af217a1b491c902e82a72e11afb2ae3db34d2f3addc23f3ab83fb5"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8900688, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_property_history"], ["hubspot", "ticket_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_property_history_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"name\",\n \"source\",\n \"source_id\",\n \"timestamp_instant\",\n \"value\",\n \"_fivetran_start\",\n \"_fivetran_end\"\n from \"postgres\".\"public\".\"ticket_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_bounce_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_bounce_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_bounce_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_bounce_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_bounce_tmp"], "alias": "stg_hubspot__email_event_bounce_tmp", "checksum": {"name": "sha256", "checksum": "c60e54463b5bc144036766c9b4dc6e01c6cc3d9ebd6e303b51be6e439dca6898"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_bounce_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.8980615, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_bounce_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_bounce'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_bounce"], ["hubspot", "email_event_bounce"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_bounce"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_bounce_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_bounce_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_bounce_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"category\",\n \"status\",\n \"response\"\n from \"postgres\".\"public\".\"email_event_bounce_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list_member_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_list_member_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_list_member_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list_member_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_list_member_tmp"], "alias": "stg_hubspot__contact_list_member_tmp", "checksum": {"name": "sha256", "checksum": "db622924ab3309fb61d4642fb381e559bd2d1ab7e7701608b2488dd14e015d46"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.9063127, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_list_member'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_list_member"], ["hubspot", "contact_list_member"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_list_member"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_list_member_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_list_member_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_list_member_data\n\n\n select\n \"contact_id\",\n \"contact_list_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"added_at\"\n from \"postgres\".\"public\".\"contact_list_member_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_list_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_list_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_list_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_list_tmp"], "alias": "stg_hubspot__company_list_tmp", "checksum": {"name": "sha256", "checksum": "cfdd250e355a81520b821508597264a9243affff3adc15984ef07a5303594c15"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.9151216, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company_list'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company_list"], ["hubspot", "company_list"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_list_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_list_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_list_data\n\n\n select\n \"id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"created_at\",\n \"updated_at\",\n \"name\",\n \"created_by_id\",\n \"object_type_id\",\n \"processing_status\",\n \"processing_type\",\n \"list_version\",\n \"filters_updated_at\",\n \"custom_field\"\n from \"postgres\".\"public\".\"company_list_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_spam_report_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_spam_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_spam_report_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_spam_report_tmp"], "alias": "stg_hubspot__email_event_spam_report_tmp", "checksum": {"name": "sha256", "checksum": "6ca1479d0ea2b2b71242564a5e8f517ef45b3b46da90caa3b9a2f68b8ee5ca79"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_spam_report_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.9233487, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_spam_report_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_spam_report'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_spam_report"], ["hubspot", "email_event_spam_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_spam_report"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_spam_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_spam_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_spam_report_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"ip_address\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_spam_report_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_property_history_tmp"], "alias": "stg_hubspot__deal_property_history_tmp", "checksum": {"name": "sha256", "checksum": "49c65c0797cb196c0c30203775ca8f6037a5808a1994fceb6606e01a2f8b4dac"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.9315262, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_property_history"], ["hubspot", "deal_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_property_history_data\n\n\n select\n \"deal_id\",\n \"timestamp\",\n \"_fivetran_synced\",\n \"source\",\n \"name\",\n \"source_id\",\n \"value\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"deal_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__form_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__form_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__form_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__form_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__form_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__form_tmp"], "alias": "stg_hubspot__form_tmp", "checksum": {"name": "sha256", "checksum": "d4d20c15c3247f9e3dbec803e393f40d9dbea3dc925da1a43099fd7eebdcd088"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.939869, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__form_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='form'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "form"], ["hubspot", "form"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.form"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__form_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_form_identifier\n -- database: postgres \n -- schema: public\n -- identifier: form_data\n\n\n select\n \"guid\",\n \"action\",\n \"created_at\",\n \"css_class\",\n \"follow_up_id\",\n \"form_type\",\n \"lead_nurturing_campaign_id\",\n \"method\",\n \"name\",\n \"notify_recipients\",\n \"portal_id\",\n \"redirect\",\n \"submit_text\",\n \"updated_at\"\n from \"postgres\".\"public\".\"form_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_contact_tmp"], "alias": "stg_hubspot__engagement_contact_tmp", "checksum": {"name": "sha256", "checksum": "f9cb2e8c733e0ff9cc99d7a468a3a34e353a935e9af22e398de63add3f3349da"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.948092, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_contact_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_contact"], ["hubspot", "engagement_contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_contact_data\n\n\n select\n \"contact_id\",\n \"engagement_id\",\n \"engagement_type\",\n \"type_id\",\n \"_fivetran_synced\",\n \"category\"\n from \"postgres\".\"public\".\"engagement_contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__owner_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__owner_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__owner_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__owner_tmp"], "alias": "stg_hubspot__owner_tmp", "checksum": {"name": "sha256", "checksum": "b070e77a7e44eb3868f48e63868b96721ae34d6e0a52aa46186e506abe6de3ef"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_owner_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.9564211, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_owner_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='owner'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "owner"], ["hubspot", "owner"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.owner"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__owner_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_owner_identifier\n -- database: postgres \n -- schema: public\n -- identifier: owner_data\n\n\n select\n \"owner_id\",\n \"_fivetran_synced\",\n \"created_at\",\n \"portal_id\",\n \"type\",\n \"updated_at\",\n \"email\",\n \"first_name\",\n \"last_name\",\n \"active_user_id\"\n from \"postgres\".\"public\".\"owner_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_message_recipient_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_message_recipient_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_recipient_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_message_recipient_tmp"], "alias": "stg_hubspot__conversation_message_recipient_tmp", "checksum": {"name": "sha256", "checksum": "f5db62674be3e2828b705dbadcc3c70ebc8234bc81b1bd5c98af2bd8f44ba9fb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786034520.9643946, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_message_recipient'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_message_recipient"], ["hubspot", "conversation_message_recipient"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_message_recipient"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_message_recipient_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_message_recipient_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_message_recipient_data\n\n\n select\n \"_fivetran_id\",\n \"actor_id\",\n \"message_id\",\n \"thread_id\",\n \"name\",\n \"recipient_field\",\n \"delivery_identifier_type\",\n \"delivery_identifier_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_message_recipient_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__marketing_event_performance_marketing_event_performance_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb", "fqn": ["hubspot", "marketing", "not_null_hubspot__marketing_event_performance_marketing_event_performance_id"], "alias": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d"}, "created_at": 1786034521.3583498, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__marketing_event_performance", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__marketing_event_performance"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_performance_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__marketing_event_performance\"\nwhere marketing_event_performance_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_performance_id", "file_key_name": "models.hubspot__marketing_event_performance", "attached_node": "model.hubspot.hubspot__marketing_event_performance", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_performance_id", "model": "{{ get_where_subquery(ref('hubspot__marketing_event_performance')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__marketing_event_performance_marketing_event_performance_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712", "fqn": ["hubspot", "marketing", "unique_hubspot__marketing_event_performance_marketing_event_performance_id"], "alias": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9"}, "created_at": 1786034521.3614335, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__marketing_event_performance", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__marketing_event_performance"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n marketing_event_performance_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__marketing_event_performance\"\nwhere marketing_event_performance_id is not null\ngroup by marketing_event_performance_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_performance_id", "file_key_name": "models.hubspot__marketing_event_performance", "attached_node": "model.hubspot.hubspot__marketing_event_performance", "test_metadata": {"name": "unique", "kwargs": {"column_name": "marketing_event_performance_id", "model": "{{ get_where_subquery(ref('hubspot__marketing_event_performance')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_sends_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_sends_event_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3", "fqn": ["hubspot", "marketing", "not_null_hubspot__email_sends_event_id"], "alias": "not_null_hubspot__email_sends_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.3643138, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_sends"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__email_sends_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_sends", "attached_node": "model.hubspot.hubspot__email_sends", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_sends')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_campaigns_email_campaign_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_campaigns_email_campaign_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0", "fqn": ["hubspot", "marketing", "not_null_hubspot__email_campaigns_email_campaign_id"], "alias": "not_null_hubspot__email_campaigns_email_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.3671618, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_campaigns", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_campaigns"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__email_campaigns_email_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect email_campaign_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_campaigns\"\nwhere email_campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email_campaign_id", "file_key_name": "models.hubspot__email_campaigns", "attached_node": "model.hubspot.hubspot__email_campaigns", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email_campaign_id", "model": "{{ get_where_subquery(ref('hubspot__email_campaigns')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__contacts_contact_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__contacts_contact_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3", "fqn": ["hubspot", "marketing", "not_null_hubspot__contacts_contact_id"], "alias": "not_null_hubspot__contacts_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.3699703, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contacts", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contacts"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__contacts_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contacts\"\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.hubspot__contacts", "attached_node": "model.hubspot.hubspot__contacts", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('hubspot__contacts')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__contact_lists_contact_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__contact_lists_contact_list_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891", "fqn": ["hubspot", "marketing", "not_null_hubspot__contact_lists_contact_list_id"], "alias": "not_null_hubspot__contact_lists_contact_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.37295, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contact_lists"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__contact_lists_contact_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_list_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contact_lists\"\nwhere contact_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_list_id", "file_key_name": "models.hubspot__contact_lists", "attached_node": "model.hubspot.hubspot__contact_lists", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_list_id", "model": "{{ get_where_subquery(ref('hubspot__contact_lists')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_bounce_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_bounce_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_bounce_event_id"], "alias": "not_null_hubspot__email_event_bounce_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.3963683, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_bounce", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_bounce"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_bounce_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_bounce", "attached_node": "model.hubspot.hubspot__email_event_bounce", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_bounce')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_clicks_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_clicks_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_clicks_event_id"], "alias": "not_null_hubspot__email_event_clicks_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.399267, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_clicks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_clicks"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_clicks_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_clicks", "attached_node": "model.hubspot.hubspot__email_event_clicks", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_clicks')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_deferred_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_deferred_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_deferred_event_id"], "alias": "not_null_hubspot__email_event_deferred_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.402106, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_deferred", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_deferred"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_deferred_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_deferred\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_deferred", "attached_node": "model.hubspot.hubspot__email_event_deferred", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_deferred')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_delivered_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_delivered_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_delivered_event_id"], "alias": "not_null_hubspot__email_event_delivered_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4049098, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_delivered", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_delivered"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_delivered_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_delivered", "attached_node": "model.hubspot.hubspot__email_event_delivered", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_delivered')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_dropped_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_dropped_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_dropped_event_id"], "alias": "not_null_hubspot__email_event_dropped_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4083734, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_dropped", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_dropped"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_dropped_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_dropped\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_dropped", "attached_node": "model.hubspot.hubspot__email_event_dropped", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_dropped')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_forward_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_forward_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_forward_event_id"], "alias": "not_null_hubspot__email_event_forward_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4112384, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_forward", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_forward"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_forward_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_forward\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_forward", "attached_node": "model.hubspot.hubspot__email_event_forward", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_forward')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_opens_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_opens_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_opens_event_id"], "alias": "not_null_hubspot__email_event_opens_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4140284, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_opens", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_opens"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_opens_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_opens", "attached_node": "model.hubspot.hubspot__email_event_opens", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_opens')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_print_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_print_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_print_event_id"], "alias": "not_null_hubspot__email_event_print_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4168253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_print", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_print"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_print_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_print\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_print", "attached_node": "model.hubspot.hubspot__email_event_print", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_print')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_sent_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_sent_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_sent_event_id"], "alias": "not_null_hubspot__email_event_sent_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4196007, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_sent"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_sent_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_sent", "attached_node": "model.hubspot.hubspot__email_event_sent", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_sent')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_spam_report_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_spam_report_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_spam_report_event_id"], "alias": "not_null_hubspot__email_event_spam_report_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4224906, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_spam_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_spam_report"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_spam_report_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_spam_report", "attached_node": "model.hubspot.hubspot__email_event_spam_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_spam_report')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_status_change_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_status_change_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_status_change_event_id"], "alias": "not_null_hubspot__email_event_status_change_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4252944, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_status_change_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_status_change", "attached_node": "model.hubspot.hubspot__email_event_status_change", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_status_change')) }}"}, "namespace": null}}, "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_int_hubspot__email_aggregate_status_change_unique_key", "resource_type": "test", "package_name": "hubspot", "path": "unique_int_hubspot__email_aggregate_status_change_unique_key.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a", "fqn": ["hubspot", "marketing", "intermediate", "unique_int_hubspot__email_aggregate_status_change_unique_key"], "alias": "unique_int_hubspot__email_aggregate_status_change_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4311705, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_aggregate_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_aggregate_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/unique_int_hubspot__email_aggregate_status_change_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n) select\n unique_key as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_hubspot__email_aggregate_status_change\nwhere unique_key is not null\ngroup by unique_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_aggregate_status_change", "sql": " __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "unique_key", "file_key_name": "models.int_hubspot__email_aggregate_status_change", "attached_node": "model.hubspot.int_hubspot__email_aggregate_status_change", "test_metadata": {"name": "unique", "kwargs": {"column_name": "unique_key", "model": "{{ get_where_subquery(ref('int_hubspot__email_aggregate_status_change')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__email_aggregate_status_change_unique_key", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__email_aggregate_status_change_unique_key.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__email_aggregate_status_change_unique_key"], "alias": "not_null_int_hubspot__email_aggregate_status_change_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.433995, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_aggregate_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_aggregate_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__email_aggregate_status_change_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n) select unique_key\nfrom __dbt__cte__int_hubspot__email_aggregate_status_change\nwhere unique_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_aggregate_status_change", "sql": " __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "unique_key", "file_key_name": "models.int_hubspot__email_aggregate_status_change", "attached_node": "model.hubspot.int_hubspot__email_aggregate_status_change", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "unique_key", "model": "{{ get_where_subquery(ref('int_hubspot__email_aggregate_status_change')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id"], "alias": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33"}, "created_at": 1786034521.437043, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_metrics__by_contact_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_metrics__by_contact_list"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_list_id\nfrom \"postgres\".\"public_hubspot\".\"int_hubspot__email_metrics__by_contact_list\"\nwhere contact_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_list_id", "file_key_name": "models.int_hubspot__email_metrics__by_contact_list", "attached_node": "model.hubspot.int_hubspot__email_metrics__by_contact_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_list_id", "model": "{{ get_where_subquery(ref('int_hubspot__email_metrics__by_contact_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__email_event_aggregates_email_send_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__email_event_aggregates_email_send_id.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__email_event_aggregates_email_send_id"], "alias": "not_null_int_hubspot__email_event_aggregates_email_send_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4398959, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_event_aggregates", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_event_aggregates"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__email_event_aggregates_email_send_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n) select email_send_id\nfrom __dbt__cte__int_hubspot__email_event_aggregates\nwhere email_send_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_event_aggregates", "sql": " __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email_send_id", "file_key_name": "models.int_hubspot__email_event_aggregates", "attached_node": "model.hubspot.int_hubspot__email_event_aggregates", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email_send_id", "model": "{{ get_where_subquery(ref('int_hubspot__email_event_aggregates')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__engagement_metrics__by_contact_contact_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__engagement_metrics__by_contact_contact_id.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__engagement_metrics__by_contact_contact_id"], "alias": "not_null_int_hubspot__engagement_metrics__by_contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4427214, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__engagement_metrics__by_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__engagement_metrics__by_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__engagement_metrics__by_contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n) select contact_id\nfrom __dbt__cte__int_hubspot__engagement_metrics__by_contact\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.int_hubspot__engagement_metrics__by_contact", "attached_node": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('int_hubspot__engagement_metrics__by_contact')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_contact_history_contact_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_contact_history_contact_day_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba", "fqn": ["hubspot", "marketing", "history", "unique_hubspot__daily_contact_history_contact_day_id"], "alias": "unique_hubspot__daily_contact_history_contact_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4554217, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/unique_hubspot__daily_contact_history_contact_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n contact_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\nwhere contact_day_id is not null\ngroup by contact_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_day_id", "file_key_name": "models.hubspot__daily_contact_history", "attached_node": "model.hubspot.hubspot__daily_contact_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "contact_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_contact_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_contact_history_contact_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_contact_history_contact_day_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d", "fqn": ["hubspot", "marketing", "history", "not_null_hubspot__daily_contact_history_contact_day_id"], "alias": "not_null_hubspot__daily_contact_history_contact_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4584305, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/not_null_hubspot__daily_contact_history_contact_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\nwhere contact_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_day_id", "file_key_name": "models.hubspot__daily_contact_history", "attached_node": "model.hubspot.hubspot__daily_contact_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_contact_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__contact_history_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__contact_history_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec", "fqn": ["hubspot", "marketing", "history", "unique_hubspot__contact_history_id"], "alias": "unique_hubspot__contact_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4613254, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/unique_hubspot__contact_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contact_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__contact_history", "attached_node": "model.hubspot.hubspot__contact_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__contact_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__contact_history_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__contact_history_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088", "fqn": ["hubspot", "marketing", "history", "not_null_hubspot__contact_history_id"], "alias": "not_null_hubspot__contact_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.4641507, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/not_null_hubspot__contact_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contact_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__contact_history", "attached_node": "model.hubspot.hubspot__contact_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__contact_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_ticket_history_ticket_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_ticket_history_ticket_day_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c", "fqn": ["hubspot", "service", "unique_hubspot__daily_ticket_history_ticket_day_id"], "alias": "unique_hubspot__daily_ticket_history_ticket_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.504928, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/unique_hubspot__daily_ticket_history_ticket_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n ticket_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\nwhere ticket_day_id is not null\ngroup by ticket_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_day_id", "file_key_name": "models.hubspot__daily_ticket_history", "attached_node": "model.hubspot.hubspot__daily_ticket_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "ticket_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_ticket_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_ticket_history_ticket_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_ticket_history_ticket_day_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e", "fqn": ["hubspot", "service", "not_null_hubspot__daily_ticket_history_ticket_day_id"], "alias": "not_null_hubspot__daily_ticket_history_ticket_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5077968, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/not_null_hubspot__daily_ticket_history_ticket_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ticket_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\nwhere ticket_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_day_id", "file_key_name": "models.hubspot__daily_ticket_history", "attached_node": "model.hubspot.hubspot__daily_ticket_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ticket_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_ticket_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__tickets_ticket_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__tickets_ticket_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7", "fqn": ["hubspot", "service", "not_null_hubspot__tickets_ticket_id"], "alias": "not_null_hubspot__tickets_ticket_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5106292, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__tickets", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__tickets"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/not_null_hubspot__tickets_ticket_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ticket_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__tickets\"\nwhere ticket_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_id", "file_key_name": "models.hubspot__tickets", "attached_node": "model.hubspot.hubspot__tickets", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ticket_id", "model": "{{ get_where_subquery(ref('hubspot__tickets')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__conversations_conversation_thread_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__conversations_conversation_thread_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084", "fqn": ["hubspot", "service", "not_null_hubspot__conversations_conversation_thread_id"], "alias": "not_null_hubspot__conversations_conversation_thread_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5134394, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__conversations", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__conversations"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/not_null_hubspot__conversations_conversation_thread_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect conversation_thread_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__conversations\"\nwhere conversation_thread_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "conversation_thread_id", "file_key_name": "models.hubspot__conversations", "attached_node": "model.hubspot.hubspot__conversations", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "conversation_thread_id", "model": "{{ get_where_subquery(ref('hubspot__conversations')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__company_lists_company_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__company_lists_company_list_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f", "fqn": ["hubspot", "sales", "not_null_hubspot__company_lists_company_list_id"], "alias": "not_null_hubspot__company_lists_company_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5358758, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__company_lists"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__company_lists_company_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_list_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__company_lists\"\nwhere company_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_list_id", "file_key_name": "models.hubspot__company_lists", "attached_node": "model.hubspot.hubspot__company_lists", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_list_id", "model": "{{ get_where_subquery(ref('hubspot__company_lists')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__deals_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__deals_deal_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd", "fqn": ["hubspot", "sales", "not_null_hubspot__deals_deal_id"], "alias": "not_null_hubspot__deals_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5388572, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deals", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deals"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__deals_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deals\"\nwhere deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_id", "file_key_name": "models.hubspot__deals", "attached_node": "model.hubspot.hubspot__deals", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_id", "model": "{{ get_where_subquery(ref('hubspot__deals')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__deal_stages_deal_stage_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__deal_stages_deal_stage_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b", "fqn": ["hubspot", "sales", "not_null_hubspot__deal_stages_deal_stage_id"], "alias": "not_null_hubspot__deal_stages_deal_stage_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5416334, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_stages", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deal_stages"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__deal_stages_deal_stage_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_stage_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deal_stages\"\nwhere deal_stage_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_stage_id", "file_key_name": "models.hubspot__deal_stages", "attached_node": "model.hubspot.hubspot__deal_stages", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_stage_id", "model": "{{ get_where_subquery(ref('hubspot__deal_stages')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__companies_company_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__companies_company_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97", "fqn": ["hubspot", "sales", "not_null_hubspot__companies_company_id"], "alias": "not_null_hubspot__companies_company_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5444233, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__companies", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__companies"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__companies_company_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__companies\"\nwhere company_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_id", "file_key_name": "models.hubspot__companies", "attached_node": "model.hubspot.hubspot__companies", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_id", "model": "{{ get_where_subquery(ref('hubspot__companies')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagements_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagements_engagement_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7", "fqn": ["hubspot", "sales", "not_null_hubspot__engagements_engagement_id"], "alias": "not_null_hubspot__engagements_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5472205, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__engagements_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagements", "attached_node": "model.hubspot.hubspot__engagements", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagements')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_calls_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_calls_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_calls_engagement_id"], "alias": "not_null_hubspot__engagement_calls_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5577595, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_calls", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_calls"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_calls_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_calls\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_calls", "attached_node": "model.hubspot.hubspot__engagement_calls", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_calls')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_communication_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_communication_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_communication_engagement_id"], "alias": "not_null_hubspot__engagement_communication_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.560567, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_communication_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_communication\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_communication", "attached_node": "model.hubspot.hubspot__engagement_communication", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_communication')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_emails_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_emails_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_emails_engagement_id"], "alias": "not_null_hubspot__engagement_emails_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5635915, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_emails", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_emails"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_emails_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_emails\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_emails", "attached_node": "model.hubspot.hubspot__engagement_emails", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_emails')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_meetings_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_meetings_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_meetings_engagement_id"], "alias": "not_null_hubspot__engagement_meetings_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5665245, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_meetings", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_meetings"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_meetings_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_meetings\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_meetings", "attached_node": "model.hubspot.hubspot__engagement_meetings", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_meetings')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_notes_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_notes_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_notes_engagement_id"], "alias": "not_null_hubspot__engagement_notes_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5693886, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_notes", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_notes"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_notes_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_notes\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_notes", "attached_node": "model.hubspot.hubspot__engagement_notes", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_notes')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_tasks_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_tasks_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_tasks_engagement_id"], "alias": "not_null_hubspot__engagement_tasks_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5721648, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_tasks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_tasks"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_tasks_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_tasks\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_tasks", "attached_node": "model.hubspot.hubspot__engagement_tasks", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_tasks')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_deal_history_deal_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_deal_history_deal_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8", "fqn": ["hubspot", "sales", "history", "unique_hubspot__daily_deal_history_deal_day_id"], "alias": "unique_hubspot__daily_deal_history_deal_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5826364, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__daily_deal_history_deal_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n deal_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\nwhere deal_day_id is not null\ngroup by deal_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_day_id", "file_key_name": "models.hubspot__daily_deal_history", "attached_node": "model.hubspot.hubspot__daily_deal_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "deal_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_deal_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_deal_history_deal_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_deal_history_deal_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__daily_deal_history_deal_day_id"], "alias": "not_null_hubspot__daily_deal_history_deal_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5854661, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__daily_deal_history_deal_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\nwhere deal_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_day_id", "file_key_name": "models.hubspot__daily_deal_history", "attached_node": "model.hubspot.hubspot__daily_deal_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_deal_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_company_history_company_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_company_history_company_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe", "fqn": ["hubspot", "sales", "history", "unique_hubspot__daily_company_history_company_day_id"], "alias": "unique_hubspot__daily_company_history_company_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5882807, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__daily_company_history_company_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n company_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\nwhere company_day_id is not null\ngroup by company_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_day_id", "file_key_name": "models.hubspot__daily_company_history", "attached_node": "model.hubspot.hubspot__daily_company_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "company_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_company_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_company_history_company_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_company_history_company_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__daily_company_history_company_day_id"], "alias": "not_null_hubspot__daily_company_history_company_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5910614, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__daily_company_history_company_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\nwhere company_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_day_id", "file_key_name": "models.hubspot__daily_company_history", "attached_node": "model.hubspot.hubspot__daily_company_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_company_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__company_history_id.f1af964b1f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__company_history_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__company_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__company_history_id.f1af964b1f", "fqn": ["hubspot", "sales", "history", "unique_hubspot__company_history_id"], "alias": "unique_hubspot__company_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.593909, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__company_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__company_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__company_history", "attached_node": "model.hubspot.hubspot__company_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__company_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__company_history_id.33035793ff": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__company_history_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__company_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__company_history_id.33035793ff", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__company_history_id"], "alias": "not_null_hubspot__company_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.596639, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__company_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__company_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__company_history", "attached_node": "model.hubspot.hubspot__company_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__company_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__deal_history_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__deal_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79", "fqn": ["hubspot", "sales", "history", "unique_hubspot__deal_history_id"], "alias": "unique_hubspot__deal_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.5994096, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__deal_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deal_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__deal_history", "attached_node": "model.hubspot.hubspot__deal_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__deal_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__deal_history_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__deal_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__deal_history_id"], "alias": "not_null_hubspot__deal_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6022203, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__deal_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deal_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__deal_history", "attached_node": "model.hubspot.hubspot__deal_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__deal_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__form_form_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__form_form_id.sql", "original_file_path": "models/staging/stg_hubspot__form.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__form_form_id"], "alias": "not_null_stg_hubspot__form_form_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6133454, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__form", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__form"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__form.yml/not_null_stg_hubspot__form_form_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect form_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\nwhere form_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "form_id", "file_key_name": "models.stg_hubspot__form", "attached_node": "model.hubspot.stg_hubspot__form", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "form_id", "model": "{{ get_where_subquery(ref('stg_hubspot__form')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__submission_response_conversion_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__submission_response_conversion_id.sql", "original_file_path": "models/staging/stg_hubspot__form.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__submission_response_conversion_id"], "alias": "not_null_stg_hubspot__submission_response_conversion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6162918, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__submission_response", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__submission_response"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__form.yml/not_null_stg_hubspot__submission_response_conversion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect conversion_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\nwhere conversion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "conversion_id", "file_key_name": "models.stg_hubspot__submission_response", "attached_node": "model.hubspot.stg_hubspot__submission_response", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "conversion_id", "model": "{{ get_where_subquery(ref('stg_hubspot__submission_response')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_bounce_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_bounce_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_bounce_event_id"], "alias": "not_null_stg_hubspot__email_event_bounce_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6342378, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_bounce", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_bounce"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_bounce_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_bounce", "attached_node": "model.hubspot.stg_hubspot__email_event_bounce", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_bounce')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_click_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_click_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_click_event_id"], "alias": "not_null_stg_hubspot__email_event_click_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6371226, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_click", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_click"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_click_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_click", "attached_node": "model.hubspot.stg_hubspot__email_event_click", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_click')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_deferred_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_deferred_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_deferred_event_id"], "alias": "not_null_stg_hubspot__email_event_deferred_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6399224, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_deferred", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_deferred"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_deferred_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_deferred", "attached_node": "model.hubspot.stg_hubspot__email_event_deferred", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_deferred')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_delivered_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_delivered_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_delivered_event_id"], "alias": "not_null_stg_hubspot__email_event_delivered_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.642685, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_delivered", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_delivered"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_delivered_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_delivered", "attached_node": "model.hubspot.stg_hubspot__email_event_delivered", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_delivered')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_dropped_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_dropped_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_dropped_event_id"], "alias": "not_null_stg_hubspot__email_event_dropped_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6455295, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_dropped", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_dropped"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_dropped_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_dropped", "attached_node": "model.hubspot.stg_hubspot__email_event_dropped", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_dropped')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_forward_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_forward_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_forward_event_id"], "alias": "not_null_stg_hubspot__email_event_forward_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6483266, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_forward", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_forward"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_forward_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_forward", "attached_node": "model.hubspot.stg_hubspot__email_event_forward", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_forward')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_open_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_open_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_open_event_id"], "alias": "not_null_stg_hubspot__email_event_open_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6511197, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_open", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_open"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_open_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_open", "attached_node": "model.hubspot.stg_hubspot__email_event_open", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_open')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_print_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_print_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_print_event_id"], "alias": "not_null_stg_hubspot__email_event_print_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6538846, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_print", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_print"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_print_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_print", "attached_node": "model.hubspot.stg_hubspot__email_event_print", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_print')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_sent_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_sent_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_sent_event_id"], "alias": "not_null_stg_hubspot__email_event_sent_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.656645, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_sent", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_sent"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_sent_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_sent", "attached_node": "model.hubspot.stg_hubspot__email_event_sent", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_sent')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_spam_report_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_spam_report_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_spam_report_event_id"], "alias": "not_null_stg_hubspot__email_event_spam_report_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6595097, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_spam_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_spam_report"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_spam_report_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_spam_report", "attached_node": "model.hubspot.stg_hubspot__email_event_spam_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_spam_report')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_status_change_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_status_change_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_status_change_event_id"], "alias": "not_null_stg_hubspot__email_event_status_change_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6622837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_status_change_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_status_change", "attached_node": "model.hubspot.stg_hubspot__email_event_status_change", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_status_change')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_event_id"], "alias": "not_null_stg_hubspot__email_event_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6650522, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event", "attached_node": "model.hubspot.stg_hubspot__email_event", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_campaign_email_campaign_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_campaign_email_campaign_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_campaign_email_campaign_id"], "alias": "not_null_stg_hubspot__email_campaign_email_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6678603, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_campaign"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_campaign_email_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect email_campaign_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign\"\nwhere email_campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email_campaign_id", "file_key_name": "models.stg_hubspot__email_campaign", "attached_node": "model.hubspot.stg_hubspot__email_campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email_campaign_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_campaign')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__contact_list_contact_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__contact_list_contact_list_id.sql", "original_file_path": "models/staging/stg_hubspot__contact.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__contact_list_contact_list_id"], "alias": "not_null_stg_hubspot__contact_list_contact_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.681988, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__contact_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact.yml/not_null_stg_hubspot__contact_list_contact_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_list_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list\"\nwhere contact_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_list_id", "file_key_name": "models.stg_hubspot__contact_list", "attached_node": "model.hubspot.stg_hubspot__contact_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_list_id", "model": "{{ get_where_subquery(ref('stg_hubspot__contact_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__contact_contact_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__contact_contact_id.sql", "original_file_path": "models/staging/stg_hubspot__contact.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__contact_contact_id"], "alias": "not_null_stg_hubspot__contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6849675, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact.yml/not_null_stg_hubspot__contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.stg_hubspot__contact", "attached_node": "model.hubspot.stg_hubspot__contact", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('stg_hubspot__contact')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_call_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_call_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_call_engagement_id"], "alias": "not_null_stg_hubspot__engagement_call_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.6983545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_call", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_call"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_call_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_call", "attached_node": "model.hubspot.stg_hubspot__engagement_call", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_call')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_communication_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_communication_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_communication_engagement_id"], "alias": "not_null_stg_hubspot__engagement_communication_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7013307, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_communication_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_communication", "attached_node": "model.hubspot.stg_hubspot__engagement_communication", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_communication')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_email_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_email_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_email_engagement_id"], "alias": "not_null_stg_hubspot__engagement_email_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7041113, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_email", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_email"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_email_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_email", "attached_node": "model.hubspot.stg_hubspot__engagement_email", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_email')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_meeting_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_meeting_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_meeting_engagement_id"], "alias": "not_null_stg_hubspot__engagement_meeting_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7068598, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_meeting"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_meeting_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_meeting", "attached_node": "model.hubspot.stg_hubspot__engagement_meeting", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_meeting')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_note_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_note_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_note_engagement_id"], "alias": "not_null_stg_hubspot__engagement_note_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7095826, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_note", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_note"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_note_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_note", "attached_node": "model.hubspot.stg_hubspot__engagement_note", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_note')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_task_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_task_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_task_engagement_id"], "alias": "not_null_stg_hubspot__engagement_task_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7124326, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_task", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_task"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_task_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_task", "attached_node": "model.hubspot.stg_hubspot__engagement_task", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_task')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_engagement_id"], "alias": "not_null_stg_hubspot__engagement_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7152, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement", "attached_node": "model.hubspot.stg_hubspot__engagement", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__company_list_company_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__company_list_company_list_id.sql", "original_file_path": "models/staging/stg_hubspot__company.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__company_list_company_list_id"], "alias": "not_null_stg_hubspot__company_list_company_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7250688, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__company_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company.yml/not_null_stg_hubspot__company_list_company_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_list_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list\"\nwhere company_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_list_id", "file_key_name": "models.stg_hubspot__company_list", "attached_node": "model.hubspot.stg_hubspot__company_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_list_id", "model": "{{ get_where_subquery(ref('stg_hubspot__company_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__company_company_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__company_company_id.sql", "original_file_path": "models/staging/stg_hubspot__company.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__company_company_id"], "alias": "not_null_stg_hubspot__company_company_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034521.7280295, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__company"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company.yml/not_null_stg_hubspot__company_company_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\nwhere company_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_id", "file_key_name": "models.stg_hubspot__company", "attached_node": "model.hubspot.stg_hubspot__company", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_id", "model": "{{ get_where_subquery(ref('stg_hubspot__company')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__marketing_event_marketing_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__marketing_event_marketing_event_id.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__marketing_event_marketing_event_id"], "alias": "not_null_stg_hubspot__marketing_event_marketing_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.1770437, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__marketing_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.yml/not_null_stg_hubspot__marketing_event_marketing_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event\"\nwhere marketing_event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_id", "file_key_name": "models.stg_hubspot__marketing_event", "attached_node": "model.hubspot.stg_hubspot__marketing_event", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__marketing_event')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__marketing_event_list_marketing_event_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__marketing_event_list_marketing_event_list_id"], "alias": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc"}, "created_at": 1786034522.1800573, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.yml/not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_list_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list\"\nwhere marketing_event_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_list_id", "file_key_name": "models.stg_hubspot__marketing_event_list", "attached_node": "model.hubspot.stg_hubspot__marketing_event_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_list_id", "model": "{{ get_where_subquery(ref('stg_hubspot__marketing_event_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id"], "alias": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905"}, "created_at": 1786034522.1829152, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_participant", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_participant"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.yml/not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_participant_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant\"\nwhere marketing_event_participant_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_participant_id", "file_key_name": "models.stg_hubspot__marketing_event_participant", "attached_node": "model.hubspot.stg_hubspot__marketing_event_participant", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_participant_id", "model": "{{ get_where_subquery(ref('stg_hubspot__marketing_event_participant')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_actor_actor_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_actor_actor_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_actor_actor_id"], "alias": "not_null_stg_hubspot__conversation_actor_actor_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.1959574, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_actor", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_actor"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_actor_actor_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect actor_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor\"\nwhere actor_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "actor_id", "file_key_name": "models.stg_hubspot__conversation_actor", "attached_node": "model.hubspot.stg_hubspot__conversation_actor", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "actor_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_actor')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_inbox_inbox_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_inbox_inbox_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_inbox_inbox_id"], "alias": "not_null_stg_hubspot__conversation_inbox_inbox_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.1988068, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_inbox", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_inbox"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_inbox_inbox_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect inbox_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox\"\nwhere inbox_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "inbox_id", "file_key_name": "models.stg_hubspot__conversation_inbox", "attached_node": "model.hubspot.stg_hubspot__conversation_inbox", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "inbox_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_inbox')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_channel_channel_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_channel_channel_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_channel_channel_id"], "alias": "not_null_stg_hubspot__conversation_channel_channel_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.2015827, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_channel_channel_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect channel_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel\"\nwhere channel_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "channel_id", "file_key_name": "models.stg_hubspot__conversation_channel", "attached_node": "model.hubspot.stg_hubspot__conversation_channel", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "channel_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_channel')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_channel_account_channel_account_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_channel_account_channel_account_id"], "alias": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe"}, "created_at": 1786034522.2044435, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel_account", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel_account"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect channel_account_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account\"\nwhere channel_account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "channel_account_id", "file_key_name": "models.stg_hubspot__conversation_channel_account", "attached_node": "model.hubspot.stg_hubspot__conversation_channel_account", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "channel_account_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_channel_account')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_thread_conversation_thread_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_thread_conversation_thread_id"], "alias": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3"}, "created_at": 1786034522.2073872, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_thread", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_thread"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect conversation_thread_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread\"\nwhere conversation_thread_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "conversation_thread_id", "file_key_name": "models.stg_hubspot__conversation_thread", "attached_node": "model.hubspot.stg_hubspot__conversation_thread", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "conversation_thread_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_thread')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_message_history_message_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_message_history_message_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_message_history_message_id"], "alias": "not_null_stg_hubspot__conversation_message_history_message_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.2101889, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_message_history_message_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect message_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history\"\nwhere message_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "message_id", "file_key_name": "models.stg_hubspot__conversation_message_history", "attached_node": "model.hubspot.stg_hubspot__conversation_message_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "message_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_message_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_message_recipient__fivetran_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_message_recipient__fivetran_id"], "alias": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe"}, "created_at": 1786034522.2129638, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_recipient", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_recipient"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_id", "file_key_name": "models.stg_hubspot__conversation_message_recipient", "attached_node": "model.hubspot.stg_hubspot__conversation_message_recipient", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_message_recipient')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__ticket_ticket_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__ticket_ticket_id.sql", "original_file_path": "models/staging/stg_hubspot__ticket.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__ticket_ticket_id"], "alias": "not_null_stg_hubspot__ticket_ticket_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.224792, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__ticket"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket.yml/not_null_stg_hubspot__ticket_ticket_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ticket_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\nwhere ticket_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_id", "file_key_name": "models.stg_hubspot__ticket", "attached_node": "model.hubspot.stg_hubspot__ticket", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ticket_id", "model": "{{ get_where_subquery(ref('stg_hubspot__ticket')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id"], "alias": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b"}, "created_at": 1786034522.2404077, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_pipeline_stage_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\nwhere deal_pipeline_stage_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_pipeline_stage_id", "file_key_name": "models.stg_hubspot__deal_pipeline_stage", "attached_node": "model.hubspot.stg_hubspot__deal_pipeline_stage", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_pipeline_stage_id", "model": "{{ get_where_subquery(ref('stg_hubspot__deal_pipeline_stage')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id"], "alias": "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.2433162, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_pipeline_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\nwhere deal_pipeline_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_pipeline_id", "file_key_name": "models.stg_hubspot__deal_pipeline", "attached_node": "model.hubspot.stg_hubspot__deal_pipeline", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_pipeline_id", "model": "{{ get_where_subquery(ref('stg_hubspot__deal_pipeline')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__deal_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__deal_deal_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__deal_deal_id"], "alias": "not_null_stg_hubspot__deal_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.246253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__deal_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\nwhere deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_id", "file_key_name": "models.stg_hubspot__deal", "attached_node": "model.hubspot.stg_hubspot__deal", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_id", "model": "{{ get_where_subquery(ref('stg_hubspot__deal')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__merged_deal_merged_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__merged_deal_merged_deal_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__merged_deal_merged_deal_id"], "alias": "not_null_stg_hubspot__merged_deal_merged_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.249109, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__merged_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__merged_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__merged_deal_merged_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect merged_deal_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"\nwhere merged_deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "merged_deal_id", "file_key_name": "models.stg_hubspot__merged_deal", "attached_node": "model.hubspot.stg_hubspot__merged_deal", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "merged_deal_id", "model": "{{ get_where_subquery(ref('stg_hubspot__merged_deal')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__merged_deal_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__merged_deal_deal_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__merged_deal_deal_id"], "alias": "not_null_stg_hubspot__merged_deal_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.251917, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__merged_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__merged_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__merged_deal_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"\nwhere deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_id", "file_key_name": "models.stg_hubspot__merged_deal", "attached_node": "model.hubspot.stg_hubspot__merged_deal", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_id", "model": "{{ get_where_subquery(ref('stg_hubspot__merged_deal')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__role_role_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__role_role_id.sql", "original_file_path": "models/staging/stg_hubspot__team.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__role_role_id"], "alias": "not_null_stg_hubspot__role_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.2600522, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__role", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__role"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.yml/not_null_stg_hubspot__role_role_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect role_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__role\"\nwhere role_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "role_id", "file_key_name": "models.stg_hubspot__role", "attached_node": "model.hubspot.stg_hubspot__role", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "role_id", "model": "{{ get_where_subquery(ref('stg_hubspot__role')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__team_team_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__team_team_id.sql", "original_file_path": "models/staging/stg_hubspot__team.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__team_team_id"], "alias": "not_null_stg_hubspot__team_team_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.262909, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__team", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__team"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.yml/not_null_stg_hubspot__team_team_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect team_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__team\"\nwhere team_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "team_id", "file_key_name": "models.stg_hubspot__team", "attached_node": "model.hubspot.stg_hubspot__team", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "team_id", "model": "{{ get_where_subquery(ref('stg_hubspot__team')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__users_user_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__users_user_id.sql", "original_file_path": "models/staging/stg_hubspot__team.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__users_user_id"], "alias": "not_null_stg_hubspot__users_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.2657328, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__users", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__users"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.yml/not_null_stg_hubspot__users_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__users\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_hubspot__users", "attached_node": "model.hubspot.stg_hubspot__users", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_hubspot__users')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__owner_owner_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__owner_owner_id.sql", "original_file_path": "models/staging/stg_hubspot__owner.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__owner_owner_id"], "alias": "not_null_stg_hubspot__owner_owner_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786034522.2710059, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__owner"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__owner.yml/not_null_stg_hubspot__owner_owner_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect owner_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\nwhere owner_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "owner_id", "file_key_name": "models.stg_hubspot__owner", "attached_node": "model.hubspot.stg_hubspot__owner", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "owner_id", "model": "{{ get_where_subquery(ref('stg_hubspot__owner')) }}"}, "namespace": null}}}, "sources": {"source.hubspot.hubspot.calendar_event": {"database": "postgres", "schema": "public", "name": "calendar_event", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.calendar_event", "fqn": ["hubspot", "staging", "hubspot", "calendar_event"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "calendar_event", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a calendar event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "avatar_url": {"name": "avatar_url", "description": "URL of image associated with social media event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "campaign_guid": {"name": "campaign_guid", "description": "Value of campaign GUID associated with Task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Type of event. If the event type is PUBLISHING_TASK, it is one of BLOG_POST, EMAIL, LANDING_PAGE, CUSTOM.\nIf event type is SOCIAL, it is one of twitter, facebook, linkedin, googlepluspages.\nIf event type is CONTENT, it is one of email, recurring-email, blog-post, landing-page, legacy-page, site-page.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category_id": {"name": "category_id", "description": "For event type of PUBLISHING_TASK, a numeric value corresponding to the type of task; one of 3 (BLOG_POST), 2 (EMAIL), 1 (LANDING_PAGE), 0 (CUSTOM).\nFor event type of SOCIAL, this is 0.\nIf event type is CONTENT, it is one of 2 (email, recurring-email), 3 (blog-post), 1 (landing-page), 5 (legacy-page), 4 (site-page).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_group_id": {"name": "content_group_id", "description": "The ID of the content group (aka blog) that the associated Blog Post belongs to, if any.\nOtherwise null. Only populated for single task GETs and for Blog Post Tasks.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "ID value of the COS content object associated with the event, null for social or if nothing associated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by": {"name": "created_by", "description": "HubSpot ID of the user that the event was created by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "Description of Event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_date": {"name": "event_date", "description": "If task, When the task is set to be due, otherwise when the event is/ was scheduled for; in milliseconds since the epoch.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "Type of calendar event; for tasks this is PUBLISHING_TASK, for COS Items, this is CONTENT, for social media events, this is SOCIAL", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The unique ID of the task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_recurring": {"name": "is_recurring", "description": "Whether the event is recurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of Event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "TASK - HubSpot ID of the user that the task is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "preview_key": {"name": "preview_key", "description": "Preview key of content object; used for showing previews of unpublished items.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "social_display_name": {"name": "social_display_name", "description": "Social media full name associate with event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "social_username": {"name": "social_username", "description": "Social media user name associated with event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "state": {"name": "state", "description": "For type publishing task, value of TODO or DONE, for others, a value of SCHEDULED, PUBLISHED, PUBLISHED_OR_SCHEDULED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "topic_ids": {"name": "topic_ids", "description": "The list of IDs of topics associated with the associated Blog Post, if any. Otherwise null. Only populated for single task GETs and for Blog Post Tasks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "url": {"name": "url", "description": "Public URL of content item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"calendar_event\"", "created_at": 1786034522.3078644, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company": {"database": "postgres", "schema": "public", "name": "company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company", "fqn": ["hubspot", "staging", "hubspot", "company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a company in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "id": {"name": "id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "property_name": {"name": "property_name", "description": "The name of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_description": {"name": "property_description", "description": "A short statement about the company's mission and goals.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date the company was added to your account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_industry": {"name": "property_industry", "description": "The type of business the company performs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_address": {"name": "property_address", "description": "The street address of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_address_2": {"name": "property_address_2", "description": "Additional address information for the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_city": {"name": "property_city", "description": "The city where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_state": {"name": "property_state", "description": "The state where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_country": {"name": "property_country", "description": "The country where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_annualrevenue": {"name": "property_annualrevenue", "description": "The actual or estimated annual revenue of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_data\"", "created_at": 1786034522.3101203, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company_list": {"database": "postgres", "schema": "public", "name": "company_list", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company_list", "fqn": ["hubspot", "staging", "hubspot", "company_list"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_list_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a company list in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_list_data\"", "created_at": 1786034522.3110194, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company_list_member": {"database": "postgres", "schema": "public", "name": "company_list_member", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company_list_member", "fqn": ["hubspot", "staging", "hubspot", "company_list_member"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_list_member_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a company and a company list.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_id": {"name": "company_list_id", "description": "The ID of the related company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "added_at": {"name": "added_at", "description": "The timestamp a company was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_list_member_data\"", "created_at": 1786034522.3117225, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company_property_history": {"database": "postgres", "schema": "public", "name": "company_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company_property_history", "fqn": ["hubspot", "staging", "hubspot", "company_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to company record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the company property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the company property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the company property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp": {"name": "timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_property_history_data\"", "created_at": 1786034522.312414, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_merge_audit": {"database": "postgres", "schema": "public", "name": "contact_merge_audit", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_merge_audit", "fqn": ["hubspot", "staging", "hubspot", "contact_merge_audit"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_merge_audit_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "DEPRECATED FOR NON-BIGQUERY USERS (will be deprecated on BigQuery as well). Each record contains a contact merge event and the contacts effected by the merge.\n", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "canonical_vid": {"name": "canonical_vid", "description": "The contact ID of the contact which the vid_to_merge contact was merged into.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "entity_id": {"name": "entity_id", "description": "The ID of the related entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_properties_moved": {"name": "num_properties_moved", "description": "The number of properties which were removed from the merged contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "Timestamp of when the contacts were merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_id": {"name": "user_id", "description": "The ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "vid_to_merge": {"name": "vid_to_merge", "description": "The ID of the contact which was merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_merge_audit_data\"", "created_at": 1786034522.3131208, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact": {"database": "postgres", "schema": "public", "name": "contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact", "fqn": ["hubspot", "staging", "hubspot", "contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a contact in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_email_1": {"name": "property_email_1", "description": "The email address of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_company": {"name": "property_company", "description": "The name of the contact's company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_firstname": {"name": "property_firstname", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_lastname": {"name": "property_lastname", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_email": {"name": "property_email", "description": "The contact's email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date that the contact was created in your HubSpot account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_jobtitle": {"name": "property_jobtitle", "description": "The contact's job title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_annualrevenue": {"name": "property_annualrevenue", "description": "The contact's annual company revenue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_merged_object_ids": {"name": "property_hs_merged_object_ids", "description": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_data\"", "created_at": 1786034522.3138323, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_form_submission": {"database": "postgres", "schema": "public", "name": "contact_form_submission", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_form_submission", "fqn": ["hubspot", "staging", "hubspot", "contact_form_submission"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_form_submission_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing contact form submission information", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "conversion_id": {"name": "conversion_id", "description": "A Unique ID for the specific form conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The GUID of the form that the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_id": {"name": "page_id", "description": "The ID of the related page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL that the form was submitted on, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "timestamp": {"name": "timestamp", "description": "A Unix timestamp in milliseconds of the time the submission occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "title": {"name": "title", "description": "The title of the page that the form was submitted on. This will default to the name of the form if no title is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_form_submission_data\"", "created_at": 1786034522.3145096, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_list": {"database": "postgres", "schema": "public", "name": "contact_list", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_list", "fqn": ["hubspot", "staging", "hubspot", "contact_list"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_list_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a contact list in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "created_at": {"name": "created_at", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_error": {"name": "metadata_error", "description": "Any errors that happened the last time the list was processed.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_last_processing_state_change_at": {"name": "metadata_last_processing_state_change_at", "description": "A timestamp of the last time that the processing state changed.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_last_size_change_at": {"name": "metadata_last_size_change_at", "description": "A timestamp of the last time that the size of the list changed.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_processing": {"name": "metadata_processing", "description": "One of DONE, REFRESHING, INITIALIZING, or PROCESSING. DONE indicates the list has finished processing, any other value indicates that list membership is being evaluated.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_size": {"name": "metadata_size", "description": "The approximate number of contacts in the list.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "'The hub ID.'\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deleteable": {"name": "deleteable", "description": "If this is false, this is a system list and cannot be deleted.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "dynamic": {"name": "dynamic", "description": "Whether the contact list is dynamic.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_list_data\"", "created_at": 1786034522.315659, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_list_member": {"database": "postgres", "schema": "public", "name": "contact_list_member", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_list_member", "fqn": ["hubspot", "staging", "hubspot", "contact_list_member"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_list_member_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a contact and a contact list.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "added_at": {"name": "added_at", "description": "The timestamp a contact was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the related contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_list_member_data\"", "created_at": 1786034522.316339, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_property_history": {"database": "postgres", "schema": "public", "name": "contact_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_property_history", "fqn": ["hubspot", "staging", "hubspot", "contact_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a change to contact record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the contact property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the contact property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the contact property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp": {"name": "timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_property_history_data\"", "created_at": 1786034522.3170166, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal": {"database": "postgres", "schema": "public", "name": "deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal", "fqn": ["hubspot", "staging", "hubspot", "deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a deal in Hubspot.", "columns": {"deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record was deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_dealname": {"name": "property_dealname", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_description": {"name": "property_description", "description": "A brief description of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_amount": {"name": "property_amount", "description": "The total value of the deal in the deal's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_closedate": {"name": "property_closedate", "description": "The day the deal is expected to close, or was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date the deal was created. This property is set automatically by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_data\"", "created_at": 1786034522.3177297, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_stage": {"database": "postgres", "schema": "public", "name": "deal_stage", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_stage", "fqn": ["hubspot", "staging", "hubspot", "deal_stage"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_stage_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a deal stage.", "columns": {"_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exist time of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "date_entered": {"name": "date_entered", "description": "The timestamp the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "Reference to the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The relevant source of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_id": {"name": "source_id", "description": "Reference to the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The value of the deal stage. Typically the name of the stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_stage_data\"", "created_at": 1786034522.318399, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_company": {"database": "postgres", "schema": "public", "name": "deal_company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_company", "fqn": ["hubspot", "staging", "hubspot", "deal_company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a deal and company.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_company_data\"", "created_at": 1786034522.3190646, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_contact": {"database": "postgres", "schema": "public", "name": "deal_contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_contact", "fqn": ["hubspot", "staging", "hubspot", "deal_contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a deal and a contact.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_contact_data\"", "created_at": 1786034522.3197281, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_pipeline": {"database": "postgres", "schema": "public", "name": "deal_pipeline", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_pipeline", "fqn": ["hubspot", "staging", "hubspot", "deal_pipeline"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_pipeline_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a pipeline in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the pipelines appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_data\"", "created_at": 1786034522.3204412, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_pipeline_stage": {"database": "postgres", "schema": "public", "name": "deal_pipeline_stage", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_pipeline_stage", "fqn": ["hubspot", "staging", "hubspot", "deal_pipeline_stage"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_pipeline_stage_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a pipeline stage in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the pipeline stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_won": {"name": "closed_won", "description": "Boolean indicating if the pipeline stage is closed. NOTE: This field is deprecated in favor of the `is_closed` column.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the related pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "probability": {"name": "probability", "description": "The probability that the deal will close. Used for the deal forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "stage_id": {"name": "stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_stage_data\"", "created_at": 1786034522.3211553, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_property_history": {"database": "postgres", "schema": "public", "name": "deal_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_property_history", "fqn": ["hubspot", "staging", "hubspot", "deal_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to deal record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the deal property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp": {"name": "timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_property_history_data\"", "created_at": 1786034522.3218422, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_campaign": {"database": "postgres", "schema": "public", "name": "email_campaign", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_campaign", "fqn": ["hubspot", "staging", "hubspot", "email_campaign"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_campaign_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an email campaign in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The app ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The app name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "The ID of the content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_included": {"name": "num_included", "description": "The number of messages included as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_queued": {"name": "num_queued", "description": "The number of messages queued as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sub_type": {"name": "sub_type", "description": "The email campaign sub-type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "The subject of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The email campaign type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_campaign_data\"", "created_at": 1786034522.322516, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event": {"database": "postgres", "schema": "public", "name": "email_event", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event", "fqn": ["hubspot", "staging", "hubspot", "email_event"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an email event in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The ID of the app that sent the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_by_created": {"name": "caused_by_created", "description": "The timestamp of the event that caused this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_by_id": {"name": "caused_by_id", "description": "The event ID which uniquely identifies the event which directly caused this event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created": {"name": "created", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filtered_event": {"name": "filtered_event", "description": "A boolean representing whether the event has been filtered out of reporting based on customer reports settings or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_by_created": {"name": "obsoleted_by_created", "description": "The timestamp of the event that made the current event obsolete.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_by_id": {"name": "obsoleted_by_id", "description": "The event ID which uniquely identifies the follow-on event which makes this current event obsolete. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "recipient": {"name": "recipient", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_by_created": {"name": "sent_by_created", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_by_id": {"name": "sent_by_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_data\"", "created_at": 1786034522.323217, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_bounce": {"database": "postgres", "schema": "public", "name": "email_event_bounce", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_bounce", "fqn": ["hubspot", "staging", "hubspot", "email_event_bounce"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_bounce_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a BOUNCE email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "category": {"name": "category", "description": "The best-guess of the type of bounce encountered.\nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values.\nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "response": {"name": "response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status code returned from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_bounce_data\"", "created_at": 1786034522.323887, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_click": {"database": "postgres", "schema": "public", "name": "email_event_click", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_click", "fqn": ["hubspot", "staging", "hubspot", "email_event_click"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_click_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a CLICK email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "referer": {"name": "referer", "description": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The URL within the message that the recipient clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_click_data\"", "created_at": 1786034522.3245804, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_deferred": {"database": "postgres", "schema": "public", "name": "email_event_deferred", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_deferred", "fqn": ["hubspot", "staging", "hubspot", "email_event_deferred"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_deferred_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a DEFERRED email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "attempt": {"name": "attempt", "description": "The delivery attempt number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "response": {"name": "response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_deferred_data\"", "created_at": 1786034522.3252413, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_delivered": {"database": "postgres", "schema": "public", "name": "email_event_delivered", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_delivered", "fqn": ["hubspot", "staging", "hubspot", "email_event_delivered"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_delivered_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a DELIVERED email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "response": {"name": "response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "smtp_id": {"name": "smtp_id", "description": "An ID attached to the message by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_delivered_data\"", "created_at": 1786034522.3258932, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_dropped": {"database": "postgres", "schema": "public", "name": "email_event_dropped", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_dropped", "fqn": ["hubspot", "staging", "hubspot", "email_event_dropped"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_dropped_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a DROPPED email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc": {"name": "bcc", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc": {"name": "cc", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_message": {"name": "drop_message", "description": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_reason": {"name": "drop_reason", "description": "The reason why the email message was dropped. See below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from": {"name": "from", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to": {"name": "reply_to", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "created_at": 1786034522.3265433, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_forward": {"database": "postgres", "schema": "public", "name": "email_event_forward", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_forward", "fqn": ["hubspot", "staging", "hubspot", "email_event_forward"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_forward_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a FORWARD email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_forward_data\"", "created_at": 1786034522.3272054, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_open": {"database": "postgres", "schema": "public", "name": "email_event_open", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_open", "fqn": ["hubspot", "staging", "hubspot", "email_event_open"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_open_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a OPEN email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "duration": {"name": "duration", "description": "If provided and nonzero, the approximate number of milliseconds the user had opened the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_open_data\"", "created_at": 1786034522.327867, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_print": {"database": "postgres", "schema": "public", "name": "email_event_print", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_print", "fqn": ["hubspot", "staging", "hubspot", "email_event_print"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_print_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a PRINT email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_print_data\"", "created_at": 1786034522.3285017, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_sent": {"database": "postgres", "schema": "public", "name": "email_event_sent", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_sent", "fqn": ["hubspot", "staging", "hubspot", "email_event_sent"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_sent_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a SENT email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc": {"name": "bcc", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc": {"name": "cc", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from": {"name": "from", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to": {"name": "reply_to", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "created_at": 1786034522.329175, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_spam_report": {"database": "postgres", "schema": "public", "name": "email_event_spam_report", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_spam_report", "fqn": ["hubspot", "staging", "hubspot", "email_event_spam_report"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_spam_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a SPAM_REPORT email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_spam_report_data\"", "created_at": 1786034522.3298683, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_status_change": {"database": "postgres", "schema": "public", "name": "email_event_status_change", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_status_change", "fqn": ["hubspot", "staging", "hubspot", "email_event_status_change"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_status_change_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a STATUS_CHANGE email event in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bounced": {"name": "bounced", "description": "A HubSpot employee explicitly initiated the status change to block messages to the recipient.\n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_subscription_status": {"name": "portal_subscription_status", "description": "The recipient's portal subscription status.\nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all\nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requested_by": {"name": "requested_by", "description": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscriptions": {"name": "subscriptions", "description": "An array of JSON objects representing the status of subscriptions for the recipient.\nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_status_change_data\"", "created_at": 1786034522.3305066, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_subscription": {"database": "postgres", "schema": "public", "name": "email_subscription", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_subscription", "fqn": ["hubspot", "staging", "hubspot", "email_subscription"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_subscription", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an email subscription in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the subscription is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "The description of the subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the email subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the email subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_subscription\"", "created_at": 1786034522.3311753, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_subscription_change": {"database": "postgres", "schema": "public", "name": "email_subscription_change", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_subscription_change", "fqn": ["hubspot", "staging", "hubspot", "email_subscription_change"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_subscription_change", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to an email subscription in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "caused_by_event_id": {"name": "caused_by_event_id", "description": "The ID of the event that caused the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change": {"name": "change", "description": "The change which occurred. This enumeration is specific to the 'changeType'; see below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_type": {"name": "change_type", "description": "The type of change which occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subscription_id": {"name": "email_subscription_id", "description": "The ID of the related email subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "recipient": {"name": "recipient", "description": "The email address of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "The timestamp when this change occurred. If 'causedByEvent' is present, this will be absent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_subscription_change\"", "created_at": 1786034522.3318639, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement": {"database": "postgres", "schema": "public", "name": "engagement", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement", "fqn": ["hubspot", "staging", "hubspot", "engagement"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an engagement", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the engagement is currently being shown in the UI.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the engagement was created.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "timestamp": {"name": "timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_data\"", "created_at": 1786034522.3325338, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_call": {"database": "postgres", "schema": "public", "name": "engagement_call", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_call", "fqn": ["hubspot", "staging", "hubspot", "engagement_call"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_call_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a CALL engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_call_data\"", "created_at": 1786034522.3332024, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_communication": {"database": "postgres", "schema": "public", "name": "engagement_communication", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_communication", "fqn": ["hubspot", "staging", "hubspot", "engagement_communication"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_communication_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a communication and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "engagement_id": {"name": "engagement_id", "description": "ID of the engagement associated with the communication.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "Timestamp indicating when the communication was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_timestamp": {"name": "property_hs_timestamp", "description": "Timestamp of the communication event linked to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of communication (e.g., email, call, meeting).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_communication_data\"", "created_at": 1786034522.3338633, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_company": {"database": "postgres", "schema": "public", "name": "engagement_company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_company", "fqn": ["hubspot", "staging", "hubspot", "engagement_company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a company and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_company_data\"", "created_at": 1786034522.3344893, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_contact": {"database": "postgres", "schema": "public", "name": "engagement_contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_contact", "fqn": ["hubspot", "staging", "hubspot", "engagement_contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a contact and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_contact_data\"", "created_at": 1786034522.3351781, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_deal": {"database": "postgres", "schema": "public", "name": "engagement_deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_deal", "fqn": ["hubspot", "staging", "hubspot", "engagement_deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a deal and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_id": {"name": "deal_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_deal_data\"", "created_at": 1786034522.3358274, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_email": {"database": "postgres", "schema": "public", "name": "engagement_email", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_email", "fqn": ["hubspot", "staging", "hubspot", "engagement_email"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_email_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an EMAIL engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the email's time of occurrence and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the email. This field determines the team listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_email_data\"", "created_at": 1786034522.3364687, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_email_cc": {"database": "postgres", "schema": "public", "name": "engagement_email_cc", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_email_cc", "fqn": ["hubspot", "staging", "hubspot", "engagement_email_cc"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_email_cc", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a CC'd email address as part of an EMAIL engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "email": {"name": "email", "description": "The email address of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_email_cc\"", "created_at": 1786034522.3371673, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_email_to": {"database": "postgres", "schema": "public", "name": "engagement_email_to", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_email_to", "fqn": ["hubspot", "staging", "hubspot", "engagement_email_to"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_email_to", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a TO email address as part of an EMAIL engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "email": {"name": "email", "description": "The email address of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_email_to\"", "created_at": 1786034522.3378544, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_meeting": {"database": "postgres", "schema": "public", "name": "engagement_meeting", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_meeting", "fqn": ["hubspot", "staging", "hubspot", "engagement_meeting"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_meeting_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a MEETING engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the meeting's time of creation and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the meeting's time of occurrence and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the meeting. This field determines the user listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the meeting. This field determines the team listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_meeting_data\"", "created_at": 1786034522.3384988, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_note": {"database": "postgres", "schema": "public", "name": "engagement_note", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_note", "fqn": ["hubspot", "staging", "hubspot", "engagement_note"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_note_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a NOTE engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "body": {"name": "body", "description": "The body of the note. The body has a limit of 65536 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the note's time of creation and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the note's time of occurrence and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the note. This field determines the user listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the note. This field determines the team listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_note_data\"", "created_at": 1786034522.3391798, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_task": {"database": "postgres", "schema": "public", "name": "engagement_task", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_task", "fqn": ["hubspot", "staging", "hubspot", "engagement_task"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_task_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a TASK engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the task's time of creation and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the task's time of occurrence and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the task. This field determines the user listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the task. This field determines the team listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_task_data\"", "created_at": 1786034522.339845, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.form": {"database": "postgres", "schema": "public", "name": "form", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.form", "fqn": ["hubspot", "staging", "hubspot", "form"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "form_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a form created in HubSpot, including metadata about its configuration and behavior.", "columns": {"guid": {"name": "guid", "description": "Unique identifier for the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "action": {"name": "action", "description": "The form action type or endpoint triggered upon submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the form was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "css_class": {"name": "css_class", "description": "CSS class applied to the form for styling purposes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "follow_up_id": {"name": "follow_up_id", "description": "ID of the follow-up action or workflow triggered by the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_type": {"name": "form_type", "description": "Category of the form, such as regular, pop-up, or embedded form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lead_nurturing_campaign_id": {"name": "lead_nurturing_campaign_id", "description": "ID of the associated lead nurturing campaign, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "method": {"name": "method", "description": "HTTP method used for form submission (typically POST).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the form as defined in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "notify_recipients": {"name": "notify_recipients", "description": "List of email addresses that receive notifications on form submissions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "redirect": {"name": "redirect", "description": "URL users are redirected to after submitting the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submit_text": {"name": "submit_text", "description": "Text displayed on the form's submit button.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the form was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"form_data\"", "created_at": 1786034522.340572, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.submission_response": {"database": "postgres", "schema": "public", "name": "submission_response", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.submission_response", "fqn": ["hubspot", "staging", "hubspot", "submission_response"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "submission_response_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a single field response from a HubSpot form submission.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "conversion_id": {"name": "conversion_id", "description": "Unique identifier for the specific form conversion event. Joins with `CONTACT_FORM_SUBMISSION.conversion_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The ID of the `FORM` the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_value": {"name": "field_value", "description": "The value submitted for the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submitted_at": {"name": "submitted_at", "description": "Unix timestamp in milliseconds of when the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL of the page where the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the HubSpot object type associated with the submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"submission_response_data\"", "created_at": 1786034522.3412576, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.owner": {"database": "postgres", "schema": "public", "name": "owner", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.owner", "fqn": ["hubspot", "staging", "hubspot", "owner"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "owner_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an owner/user in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active_user_id": {"name": "active_user_id", "description": "ID of the active user account associated with the owner. Null if owner is not an active user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp for when the owner was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "The email address of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "type": {"name": "type", "description": "The type of owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp the owner was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"owner_data\"", "created_at": 1786034522.3419552, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.property": {"database": "postgres", "schema": "public", "name": "property", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.property", "fqn": ["hubspot", "staging", "hubspot", "property"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "property_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a property.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "(DEPRECATED IN OCTOBER 2025) Fivetran generated id. Joins to `property_id` (ALSO DEPRECATED) in the `PROPERTY_OPTION` table. Use `hubspot_object` to join to `property_option` instead.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "calculated": {"name": "calculated", "description": "Indicates if the property is calculated by a HubSpot process", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp representing when the property was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A description of the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_type": {"name": "field_type", "description": "One of textarea, text, date, file, number, select, radio, checkbox, or booleancheckbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "group_name": {"name": "group_name", "description": "The name of the property group that the property belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_defined": {"name": "hubspot_defined", "description": "This will be true for default properties that are built into HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this property is related to other objects, the object will be listed here. Part of the composite primary key with `name`. Use `hubspot_object` to join with the `PROPERTY_OPTION` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "A human readable label for the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The internal name of the property. Part of the composite primary key with `hubspot_object`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "show_currency_symbol": {"name": "show_currency_symbol", "description": "If true, the property will display the currency symbol set in the portal settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "One of string, number, date, datetime, or enumeration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp representing when the property was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"property_data\"", "created_at": 1786034522.342633, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.property_option": {"database": "postgres", "schema": "public", "name": "property_option", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.property_option", "fqn": ["hubspot", "staging", "hubspot", "property_option"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "property_option_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an option for the related property.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "label": {"name": "label", "description": "The label of the option displayed inside the HubSpot app. Part of the composite primary key with `name` and `hubspot_object`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_id": {"name": "property_id", "description": "(DEPRECATED IN OCTOBER 2025) The ID of the related property. Use `hubspot_object` to join with the `PROPERTY` table instead.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Order of options displayed in Hubspot, starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hidden": {"name": "hidden", "description": "Boolean if the option will be displayed in HubSpot", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The internal value of the option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this option's property is related to other objects, the object will be listed here. Part of the composite primary key with `name` and `label`. Use `hubspot_object` to join with the `PROPERTY` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The internal name of the property option. Part of the composite primary key with `hubspot_object` and `label`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"property_option_data\"", "created_at": 1786034522.3433068, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_company": {"database": "postgres", "schema": "public", "name": "ticket_company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_company", "fqn": ["hubspot", "staging", "hubspot", "ticket_company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and company.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_company_data\"", "created_at": 1786034522.343964, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_contact": {"database": "postgres", "schema": "public", "name": "ticket_contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_contact", "fqn": ["hubspot", "staging", "hubspot", "ticket_contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and a contact.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_contact_data\"", "created_at": 1786034522.344594, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_deal": {"database": "postgres", "schema": "public", "name": "ticket_deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_deal", "fqn": ["hubspot", "staging", "hubspot", "ticket_deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and a deal.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_deal_data\"", "created_at": 1786034522.3452868, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_engagement": {"database": "postgres", "schema": "public", "name": "ticket_engagement", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_engagement", "fqn": ["hubspot", "staging", "hubspot", "ticket_engagement"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_engagement_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_engagement_data\"", "created_at": 1786034522.345942, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_pipeline_stage": {"database": "postgres", "schema": "public", "name": "ticket_pipeline_stage", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_pipeline_stage", "fqn": ["hubspot", "staging", "hubspot", "ticket_pipeline_stage"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_pipeline_stage_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a ticket pipeline stage.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Boolean indicating whether the pipeline stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "stage_id": {"name": "stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_stage_data\"", "created_at": 1786034522.346598, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_pipeline": {"database": "postgres", "schema": "public", "name": "ticket_pipeline", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_pipeline", "fqn": ["hubspot", "staging", "hubspot", "ticket_pipeline"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_pipeline_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a ticket pipeline.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Boolean indicating whether the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "Reference to the object type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "Reference to the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_data\"", "created_at": 1786034522.347279, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_property_history": {"database": "postgres", "schema": "public", "name": "ticket_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_property_history", "fqn": ["hubspot", "staging", "hubspot", "ticket_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to ticket record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp_instant": {"name": "timestamp_instant", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_property_history_data\"", "created_at": 1786034522.3480575, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket": {"database": "postgres", "schema": "public", "name": "ticket", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket", "fqn": ["hubspot", "staging", "hubspot", "ticket"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a ticket in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "ID of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record was deleted (v2 endpoint).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record was deleted (v3 endpoint).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "property_closed_date": {"name": "property_closed_date", "description": "The date the ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date the ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_first_agent_reply_date": {"name": "property_first_agent_reply_date", "description": "the date for the first agent reply on the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_pipeline": {"name": "property_hs_pipeline", "description": "The ID of the ticket's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_pipeline_stage": {"name": "property_hs_pipeline_stage", "description": "The ID of the ticket's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_ticket_priority": {"name": "property_hs_ticket_priority", "description": "The priority of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_ticket_category": {"name": "property_hs_ticket_category", "description": "The category of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_subject": {"name": "property_subject", "description": "Short summary of ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_content": {"name": "property_content", "description": "Text in body of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_data\"", "created_at": 1786034522.3487701, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.merged_deal": {"database": "postgres", "schema": "public", "name": "merged_deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.merged_deal", "fqn": ["hubspot", "staging", "hubspot", "merged_deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "merged_deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a deal that has been merged along with the related deal it's been merged into.", "columns": {"deal_id": {"name": "deal_id", "description": "The ID of the deal the record has been merged INTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_deal_id": {"name": "merged_deal_id", "description": "ID of deal that has been merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"merged_deal_data\"", "created_at": 1786034522.349407, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.owner_team": {"database": "postgres", "schema": "public", "name": "owner_team", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.owner_team", "fqn": ["hubspot", "staging", "hubspot", "owner_team"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "owner_team_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table mapping owners to their associated teams in HubSpot.", "columns": {"owner_id": {"name": "owner_id", "description": "Unique ID of the HubSpot owner (user) assigned to the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the team to which the owner belongs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_team_primary": {"name": "is_team_primary", "description": "Indicates whether the team is the owner's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"owner_team_data\"", "created_at": 1786034522.3501205, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.role": {"database": "postgres", "schema": "public", "name": "role", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.role", "fqn": ["hubspot", "staging", "hubspot", "role"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "role_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing role information for HubSpot users.", "columns": {"id": {"name": "id", "description": "Unique ID of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requires_billing_write": {"name": "requires_billing_write", "description": "Indicates whether the role requires billing write access.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"role_data\"", "created_at": 1786034522.3507946, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.team": {"database": "postgres", "schema": "public", "name": "team", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.team", "fqn": ["hubspot", "staging", "hubspot", "team"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "team_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing HubSpot team details.", "columns": {"id": {"name": "id", "description": "Unique ID of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"team_data\"", "created_at": 1786034522.3514302, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.team_user": {"database": "postgres", "schema": "public", "name": "team_user", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.team_user", "fqn": ["hubspot", "staging", "hubspot", "team_user"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "team_user_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table representing associations between users and teams, including secondary team assignments.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user associated with the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the associated team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_secondary_user": {"name": "is_secondary_user", "description": "Indicates whether the team is a secondary team for the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"team_user_data\"", "created_at": 1786034522.352094, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.users": {"database": "postgres", "schema": "public", "name": "users", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.users", "fqn": ["hubspot", "staging", "hubspot", "users"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "users_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing information about HubSpot users.", "columns": {"id": {"name": "id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "primary_team_id": {"name": "primary_team_id", "description": "ID of the user's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "role_id": {"name": "role_id", "description": "ID of the role assigned to the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "First name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "Last name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"users_data\"", "created_at": 1786034522.3527691, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_actor": {"database": "postgres", "schema": "public", "name": "conversation_actor", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_actor", "fqn": ["hubspot", "staging", "hubspot", "conversation_actor"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_actor_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing actors involved in Hubspot conversations.", "columns": {"id": {"name": "id", "description": "Unique ID of the actor. The first letter corresponds with the type of actor (A- agent, B- bot, S- system, E- email, I- integration, L- customer agent)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "avatar": {"name": "avatar", "description": "URL of the actor's avatar image.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the actor (e.g., VISITOR, AGENT, BOT, SYSTEM)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_actor_data\"", "created_at": 1786034522.3534162, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_inbox": {"database": "postgres", "schema": "public", "name": "conversation_inbox", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_inbox", "fqn": ["hubspot", "staging", "hubspot", "conversation_inbox"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_inbox_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a conversation inbox in HubSpot.", "columns": {"id": {"name": "id", "description": "Unique ID of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "active": {"name": "active", "description": "Boolean indicating whether the inbox is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the inbox was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the inbox (e.g., HELP_DESK, INBOX).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the inbox was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_inbox_data\"", "created_at": 1786034522.3540895, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_channel": {"database": "postgres", "schema": "public", "name": "conversation_channel", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_channel", "fqn": ["hubspot", "staging", "hubspot", "conversation_channel"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_channel_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a channel through which users can contact your team, such as email, Chat, Facebook Messenger, or WhatsApp.", "columns": {"id": {"name": "id", "description": "Unique ID of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_channel_data\"", "created_at": 1786034522.3547392, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_channel_account": {"database": "postgres", "schema": "public", "name": "conversation_channel_account", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_channel_account", "fqn": ["hubspot", "staging", "hubspot", "conversation_channel_account"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_channel_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an instance of a channel connected to an inbox, such as a specific email address or Facebook Messenger account.", "columns": {"id": {"name": "id", "description": "Unique ID of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel this account belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox this channel account is connected to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "active": {"name": "active", "description": "Boolean indicating whether the channel account is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "authorized": {"name": "authorized", "description": "Boolean indicating whether the channel account is authorized.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the channel account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for this channel account (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_channel_account_data\"", "created_at": 1786034522.3554425, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_thread": {"database": "postgres", "schema": "public", "name": "conversation_thread", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_thread", "fqn": ["hubspot", "staging", "hubspot", "conversation_thread"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_thread_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a conversation thread in HubSpot.", "columns": {"id": {"name": "id", "description": "Unique ID of the conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_contact_id": {"name": "associated_contact_id", "description": "ID of the contact associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_ticket_id": {"name": "associated_ticket_id", "description": "ID of the ticket associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_account_id": {"name": "original_channel_account_id", "description": "ID of the channel account through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_id": {"name": "original_channel_id", "description": "ID of the channel through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to": {"name": "assigned_to", "description": "ID of the agent the thread is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_at": {"name": "closed_at", "description": "Timestamp when the thread was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_received_timestamp": {"name": "latest_message_received_timestamp", "description": "Timestamp of the most recently received message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_sent_timestamp": {"name": "latest_message_sent_timestamp", "description": "Timestamp of the most recently sent message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_timestamp": {"name": "latest_message_timestamp", "description": "Timestamp of the most recent message (sent or received) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "spam": {"name": "spam", "description": "Indicates whether the thread has been marked as spam.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the thread (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_thread_data\"", "created_at": 1786034522.3561535, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_message_history": {"database": "postgres", "schema": "public", "name": "conversation_message_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_message_history", "fqn": ["hubspot", "staging", "hubspot", "conversation_message_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_message_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a version of a conversation message, tracking changes over time via SCD Type 2.", "columns": {"id": {"name": "id", "description": "Unique ID of the conversation message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_id": {"name": "channel_account_id", "description": "ID of the channel account associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_inbox_id": {"name": "from_inbox_id", "description": "ID of the inbox the message was sent from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "to_inbox_id": {"name": "to_inbox_id", "description": "ID of the inbox the message was sent to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to": {"name": "assigned_to", "description": "ID of the agent the thread was assigned to at message time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_from": {"name": "assigned_from", "description": "ID of the previous assignee before this message triggered a reassignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the message was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by": {"name": "created_by", "description": "ID of the user who created the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "direction": {"name": "direction", "description": "Direction of the message (e.g., INCOMING, OUTGOING).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "in_reply_to_id": {"name": "in_reply_to_id", "description": "ID of the message this message is a reply to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "new_status": {"name": "new_status", "description": "The thread status set by this message event (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "rich_text": {"name": "rich_text", "description": "HTML-formatted body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "Subject line of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "text": {"name": "text", "description": "Plain-text body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "truncation_status": {"name": "truncation_status", "description": "Indicates whether the message body was truncated (e.g., NOT_TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY, TRUNCATED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the message event (e.g., MESSAGE, COMMENT, WELCOME_MESSAGE).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the message record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "client_type": {"name": "client_type", "description": "The type of client used to send the message (e.g., SYSTEM, HUBSPOT, INTEGRATION)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status_type": {"name": "status_type", "description": "The status type of the message (e.g., SENT, RECEIVED)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether this is the currently active version of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_message_history_data\"", "created_at": 1786034522.3569322, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event": {"database": "postgres", "schema": "public", "name": "marketing_event", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event", "fqn": ["hubspot", "staging", "hubspot", "marketing_event"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a marketing event in HubSpot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The unique ID of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The string ID of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The name of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendees": {"name": "attendees", "description": "Number of attended contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellations": {"name": "cancellations", "description": "Number of cancelled contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp when the marketing event was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "end_date_time": {"name": "end_date_time", "description": "The timestamp when the marketing event ends.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_cancelled": {"name": "event_cancelled", "description": "Boolean indicating whether the marketing event was cancelled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_completed": {"name": "event_completed", "description": "Boolean indicating whether the marketing event has been completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_description": {"name": "event_description", "description": "A description of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_name": {"name": "event_name", "description": "The name of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_organizer": {"name": "event_organizer", "description": "The name of the organizer of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_status": {"name": "event_status", "description": "The current status of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_url": {"name": "event_url", "description": "A URL in the external event application where the marketing event can be managed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "external_event_id": {"name": "external_event_id", "description": "The ID that is associated with this marketing event in the external event application.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_shows": {"name": "no_shows", "description": "Number of no-show contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "registrants": {"name": "registrants", "description": "Number of registered contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "start_date_time": {"name": "start_date_time", "description": "The timestamp when the marketing event starts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp when the marketing event was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_data\"", "created_at": 1786034522.357758, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event_list": {"database": "postgres", "schema": "public", "name": "marketing_event_list", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event_list", "fqn": ["hubspot", "staging", "hubspot", "marketing_event_list"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_list_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a list associated with a marketing event in HubSpot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The unique ID of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The ID of the user who created the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_by_id": {"name": "updated_by_id", "description": "The ID of the user who last updated the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp when the list filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp when the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "The current processing status of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deleted_at": {"name": "deleted_at", "description": "The timestamp when the list was deleted, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "The version number of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the object type stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "size": {"name": "size", "description": "The number of records in the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp when the list was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_list_data\"", "created_at": 1786034522.358462, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event_participant": {"database": "postgres", "schema": "public", "name": "marketing_event_participant", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event_participant", "fqn": ["hubspot", "staging", "hubspot", "marketing_event_participant"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_participant_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a participant in a marketing event in HubSpot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The unique ID of the marketing event participant record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp when the participant record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_occurred_at": {"name": "properties_occurred_at", "description": "The timestamp when the participation event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_attendance_percentage": {"name": "properties_attendance_percentage", "description": "Percentage of the participation duration relative to the event duration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_attendance_state": {"name": "properties_attendance_state", "description": "The attendance state of the participant (e.g., ATTENDED, CANCELLED, EMPTY, NO_SHOW, REGISTERED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_attendance_duration_seconds": {"name": "properties_attendance_duration_seconds", "description": "The number of seconds the participation lasted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_participant_data\"", "created_at": 1786034522.3591683, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event_custom_property": {"database": "postgres", "schema": "public", "name": "marketing_event_custom_property", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event_custom_property", "fqn": ["hubspot", "staging", "hubspot", "marketing_event_custom_property"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_custom_property_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a custom property on a marketing event in HubSpot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The value of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_custom_property_data\"", "created_at": 1786034522.3598561, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_message_recipient": {"database": "postgres", "schema": "public", "name": "conversation_message_recipient", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_message_recipient", "fqn": ["hubspot", "staging", "hubspot", "conversation_message_recipient"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_message_recipient_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a recipient associated with a conversation message.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Unique ID generated by Fivetran for this recipient record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "actor_id": {"name": "actor_id", "description": "ID of the actor (user or contact) who received the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "message_id": {"name": "message_id", "description": "ID of the message this recipient is associated with.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_field": {"name": "recipient_field", "description": "The role of this recipient in the message (e.g., TO, CC, BCC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for the recipient (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_message_recipient_data\"", "created_at": 1786034522.3605368, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}}, "macros": {"macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8000684, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1786034514.800498, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8007565, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8009884, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.801217, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {% endif -%}\n {% if contract_config.enforced and (not temporary) -%}\n {{ get_table_columns_and_constraints() }} ;\n insert into {{ relation }} (\n {{ adapter.dispatch('get_column_names', 'dbt')() }}\n )\n {%- set sql = get_select_subquery(sql) %}\n {% else %}\n as\n {% endif %}\n (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.805631, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1786034514.8067584, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8073893, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8080406, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8089979, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select distinct\n '{{ schema_relation.database }}' as database,\n proname as name,\n ns.nspname as schema,\n 'function' as type\n from pg_proc\n join pg_namespace as ns on pronamespace = ns.oid\n where ns.nspname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786034514.8100052, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786034514.8103614, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786034514.8110662, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1786034514.8118467, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n {% if dstring %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix = suffix ~ dtstring %}\n {% endif %}\n {% set suffix_length = suffix|length %}\n {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n {% endif %}\n {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "dstring", "type": null, "description": ""}], "created_at": 1786034514.8134665, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034514.8138797, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n {{ return(temp_relation.incorporate(path={\"schema\": none,\n \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034514.8145008, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034514.8150597, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "comment", "type": null, "description": ""}], "created_at": 1786034514.8159258, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n {% if relation.type == 'materialized_view' -%}\n {% set relation_type = \"materialized view\" %}\n {%- else -%}\n {%- set relation_type = relation.type -%}\n {%- endif -%}\n comment on {{ relation_type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "comment", "type": null, "description": ""}], "created_at": 1786034514.8166828, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1786034514.8179922, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n select grantee, privilege_type\n from {{ relation.information_schema('role_table_grants') }}\n where grantor = current_role\n and grantee != current_role\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8184037, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.818651, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_indexes_sql": {"name": "postgres__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_indexes_sql", "macro_sql": "{% macro postgres__get_show_indexes_sql(relation) %}\n select\n i.relname as name,\n m.amname as method,\n ix.indisunique as \"unique\",\n array_to_string(array_agg(a.attname), ',') as column_names\n from pg_index ix\n join pg_class i\n on i.oid = ix.indexrelid\n join pg_am m\n on m.oid=i.relam\n join pg_class t\n on t.oid = ix.indrelid\n join pg_namespace n\n on n.oid = t.relnamespace\n join pg_attribute a\n on a.attrelid = t.oid\n and a.attnum = ANY(ix.indkey)\n where t.relname = '{{ relation.identifier }}'\n and n.nspname = '{{ relation.schema }}'\n and t.relkind in ('r', 'm')\n group by 1, 2, 3\n order by 1, 2, 3\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8190532, "supported_languages": null}, "macro.dbt_postgres.postgres__get_drop_index_sql": {"name": "postgres__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_drop_index_sql", "macro_sql": "\n\n\n{%- macro postgres__get_drop_index_sql(relation, index_name) -%}\n drop index if exists \"{{ relation.schema }}\".\"{{ index_name }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1786034514.8193493, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog_relations": {"name": "postgres__get_catalog_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog_relations", "macro_sql": "{% macro postgres__get_catalog_relations(information_schema, relations) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n when 'm' then 'MATERIALIZED VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for relation in relations -%}\n {%- if relation.identifier -%}\n (upper(sch.nspname) = upper('{{ relation.schema }}') and\n upper(tbl.relname) = upper('{{ relation.identifier }}'))\n {%- else-%}\n upper(sch.nspname) = upper('{{ relation.schema }}')\n {%- endif -%}\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p', 'm') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table, [m]aterialized view. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786034514.8213124, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n {%- set relations = [] -%}\n {%- for schema in schemas -%}\n {%- set dummy = relations.append({'schema': schema}) -%}\n {%- endfor -%}\n {{ return(postgres__get_catalog_relations(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1786034514.8220415, "supported_languages": null}, "macro.dbt_postgres.postgres__get_relations": {"name": "postgres__get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres__get_relations", "macro_sql": "{% macro postgres__get_relations() -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n select distinct\n dependent_namespace.nspname as dependent_schema,\n dependent_class.relname as dependent_name,\n referenced_namespace.nspname as referenced_schema,\n referenced_class.relname as referenced_name\n\n -- Query for views: views are entries in pg_class with an entry in pg_rewrite, but we avoid\n -- a seq scan on pg_rewrite by leveraging the fact there is an \"internal\" row in pg_depend for\n -- the view...\n from pg_class as dependent_class\n join pg_namespace as dependent_namespace on dependent_namespace.oid = dependent_class.relnamespace\n join pg_depend as dependent_depend on dependent_depend.refobjid = dependent_class.oid\n and dependent_depend.classid = 'pg_rewrite'::regclass\n and dependent_depend.refclassid = 'pg_class'::regclass\n and dependent_depend.deptype = 'i'\n\n -- ... and via pg_depend (that has a row per column, hence the need for \"distinct\" above, and\n -- making sure to exclude the internal row to avoid a view appearing to depend on itself)...\n join pg_depend as joining_depend on joining_depend.objid = dependent_depend.objid\n and joining_depend.classid = 'pg_rewrite'::regclass\n and joining_depend.refclassid = 'pg_class'::regclass\n and joining_depend.refobjid != dependent_depend.refobjid\n\n -- ... we can find the tables they query from in pg_class, but excluding system tables. Note we\n -- don't need need to exclude _dependent_ system tables, because they only query from other\n -- system tables, and so are automatically excluded by excluding _referenced_ system tables\n join pg_class as referenced_class on referenced_class.oid = joining_depend.refobjid\n join pg_namespace as referenced_namespace on referenced_namespace.oid = referenced_class.relnamespace\n and referenced_namespace.nspname != 'information_schema'\n and referenced_namespace.nspname not like 'pg\\_%'\n\n order by\n dependent_schema, dependent_name, referenced_schema, referenced_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8230114, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations() %}\n {{ return(postgres__get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8232777, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786034514.8237288, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8240507, "supported_languages": null}, "macro.dbt_postgres.postgres__equals": {"name": "postgres__equals", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt_postgres.postgres__equals", "macro_sql": "{% macro postgres__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n ({{ expr1 }} IS NOT DISTINCT FROM {{ expr2 }})\n{%- else -%}\n ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1786034514.824698, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1786034514.8257313, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8298187, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8308191, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786034514.8316007, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n update {{ target }}\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }}::text = {{ target }}.{{ columns.dbt_scd_id }}::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n {% if config.get(\"dbt_valid_to_current\") %}\n and ({{ target }}.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }} or {{ target }}.{{ columns.dbt_valid_to }} is null);\n {% else %}\n and {{ target }}.{{ columns.dbt_valid_to }} is null;\n {% endif %}\n\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1786034514.833867, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n {% else %}\n {% do return(get_incremental_append_sql(arg_dict)) %}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.834756, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_microbatch_sql": {"name": "postgres__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_microbatch_sql", "macro_sql": "{% macro postgres__get_incremental_microbatch_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"dbt-postgres 'microbatch' requires a `unique_key` config\") }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_merge_sql", "macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.8354118, "supported_languages": null}, "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql": {"name": "postgres__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql", "macro_sql": "{% macro postgres__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {% set default_value = arg.get('default_value', none) %}\n {% if default_value != none %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type ~ ' DEFAULT ' ~ default_value) -%}\n {% else %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {% endif %}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8368018, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_table_sql": {"name": "postgres__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_table_sql", "macro_sql": "{% macro postgres__get_rename_table_sql(relation, new_name) %}\n alter table {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034514.837167, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_table_sql": {"name": "postgres__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_table_sql", "macro_sql": "{% macro postgres__get_replace_table_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.8384085, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_table": {"name": "postgres__drop_table", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_table", "macro_sql": "{% macro postgres__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.838725, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_view_sql": {"name": "postgres__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_view_sql", "macro_sql": "{% macro postgres__get_rename_view_sql(relation, new_name) %}\n alter view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034514.839085, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_view_sql": {"name": "postgres__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_view_sql", "macro_sql": "{% macro postgres__get_replace_view_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.8401043, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_view": {"name": "postgres__drop_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_view", "macro_sql": "{% macro postgres__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8403935, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/describe.sql", "original_file_path": "macros/relations/materialized_view/describe.sql", "unique_id": "macro.dbt_postgres.postgres__describe_materialized_view", "macro_sql": "{% macro postgres__describe_materialized_view(relation) %}\n -- for now just get the indexes, we don't need the name or the query yet\n {% set _indexes = run_query(get_show_indexes_sql(relation)) %}\n {% do return({'indexes': _indexes}) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8409956, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt_postgres.postgres__refresh_materialized_view", "macro_sql": "{% macro postgres__refresh_materialized_view(relation) %}\n refresh materialized view {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.8412786, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": {"name": "postgres__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_materialized_view_sql", "macro_sql": "{% macro postgres__get_rename_materialized_view_sql(relation, new_name) %}\n alter materialized view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034514.841623, "supported_languages": null}, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": {"name": "postgres__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n\n -- apply a full refresh immediately if needed\n {% if configuration_changes.requires_full_refresh %}\n\n {{ get_replace_sql(existing_relation, relation, sql) }}\n\n -- otherwise apply individual changes as needed\n {% else %}\n\n {{ postgres__update_indexes_on_materialized_view(relation, configuration_changes.indexes) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786034514.8428838, "supported_languages": null}, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": {"name": "postgres__update_indexes_on_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__update_indexes_on_materialized_view", "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }}\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\t{{ ';' if not loop.last else \"\" }}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql", "macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_changes", "type": null, "description": ""}], "created_at": 1786034514.8439815, "supported_languages": null}, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": {"name": "postgres__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes", "macro_sql": "{% macro postgres__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {% set _existing_materialized_view = postgres__describe_materialized_view(existing_relation) %}\n {% set _configuration_changes = existing_relation.get_materialized_view_config_change_collection(_existing_materialized_view, new_config.model) %}\n {% do return(_configuration_changes) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__describe_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1786034514.8445754, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": {"name": "postgres__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else \"\" }}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.8454504, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_materialized_view": {"name": "postgres__drop_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_materialized_view", "macro_sql": "{% macro postgres__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.845774, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786034514.8463826, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786034514.8467438, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1786034514.8472939, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1786034514.8475702, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8481169, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8484075, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.848876, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8490412, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8495176, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8497598, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1786034514.8502953, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1786034514.850816, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1786034514.851304, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1786034514.8515215, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1786034514.8521564, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1786034514.852502, "supported_languages": null}, "macro.dbt.cast": {"name": "cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.cast", "macro_sql": "{% macro cast(field, type) %}\n {{ return(adapter.dispatch('cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034514.8530636, "supported_languages": null}, "macro.dbt.default__cast": {"name": "default__cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.default__cast", "macro_sql": "{% macro default__cast(field, type) %}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034514.8533347, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1786034514.853843, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1786034514.854107, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1786034514.854643, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1786034514.8549504, "supported_languages": null}, "macro.dbt.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8558915, "supported_languages": null}, "macro.dbt.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.857081, "supported_languages": null}, "macro.dbt.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034514.857648, "supported_languages": null}, "macro.dbt.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n {# call as follows:\n\n date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n ) #}\n\n\n with rawdata as (\n\n {{dbt.generate_series(\n dbt.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.generate_series", "macro.dbt.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034514.8583817, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034514.8588872, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034514.8592138, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8597188, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.859946, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034514.8604398, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034514.8607862, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1786034514.8615031, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n array[ {{ inputs|join(' , ') }} ]\n {% else %}\n array[]::{{data_type}}[]\n {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1786034514.86201, "supported_languages": null}, "macro.dbt.equals": {"name": "equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.equals", "macro_sql": "{% macro equals(expr1, expr2) %}\n {{ return(adapter.dispatch('equals', 'dbt') (expr1, expr2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1786034514.8626363, "supported_languages": null}, "macro.dbt.default__equals": {"name": "default__equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.default__equals", "macro_sql": "{% macro default__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))\n then 0\n else 1\n end = 0\n{%- else -%}\n ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1786034514.8632548, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1786034514.8641188, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1786034514.8649592, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8655577, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8660285, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1786034514.8665628, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1786034514.866856, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8673394, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786034514.8675675, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8681946, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8687348, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034514.8690438, "supported_languages": null}, "macro.dbt.date": {"name": "date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.date", "macro_sql": "{% macro date(year, month, day) %}\n {{ return(adapter.dispatch('date', 'dbt') (year, month, day)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1786034514.8696601, "supported_languages": null}, "macro.dbt.default__date": {"name": "default__date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.default__date", "macro_sql": "{% macro default__date(year, month, day) -%}\n {%- set dt = modules.datetime.date(year, month, day) -%}\n {%- set iso_8601_formatted_date = dt.strftime('%Y-%m-%d') -%}\n to_date('{{ iso_8601_formatted_date }}', 'YYYY-MM-DD')\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1786034514.8702412, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8707042, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.870869, "supported_languages": null}, "macro.dbt.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034514.8716927, "supported_languages": null}, "macro.dbt.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034514.8725023, "supported_languages": null}, "macro.dbt.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034514.873008, "supported_languages": null}, "macro.dbt.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034514.874063, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786034514.8748002, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786034514.8751392, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 + {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786034514.8755932, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8769011, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8772058, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8775287, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.877859, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8781781, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8784733, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8788183, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8791637, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8794787, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.879799, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8801231, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8805125, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8808513, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8811405, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1786034514.8816876, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1786034514.881981, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034514.8825507, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034514.882866, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "config", "type": null, "description": ""}], "created_at": 1786034514.8834352, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8840585, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.8846567, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "hooks", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1786034514.8863845, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1786034514.886798, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.8870943, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.8873813, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034514.8876896, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table.sql", "original_file_path": "macros/materializations/models/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n {% do create_indexes(intermediate_relation) %}\n\n -- cleanup\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.8919325, "supported_languages": ["sql"]}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.896024, "supported_languages": ["sql"]}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialization_materialized_view_default", "macro_sql": "{% materialization materialized_view, default %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.MaterializedView) %}\n {% set intermediate_relation = make_intermediate_relation(target_relation) %}\n {% set backup_relation_type = target_relation.MaterializedView if existing_relation is none else existing_relation.type %}\n {% set backup_relation = make_backup_relation(target_relation, backup_relation_type) %}\n\n {{ materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) }}\n\n {% set build_sql = materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% if build_sql == '' %}\n {{ materialized_view_execute_no_op(target_relation) }}\n {% else %}\n {{ materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) }}\n {% endif %}\n\n {{ materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.materialized_view_setup", "macro.dbt.materialized_view_get_build_sql", "macro.dbt.materialized_view_execute_no_op", "macro.dbt.materialized_view_execute_build_sql", "macro.dbt.materialized_view_teardown"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.8990705, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_setup", "macro_sql": "{% macro materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) %}\n\n -- backup_relation and intermediate_relation should not already exist in the database\n -- it's possible these exist because of a previous run that exited unexpectedly\n {% set preexisting_backup_relation = load_cached_relation(backup_relation) %}\n {% set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "pre_hooks", "type": null, "description": ""}], "created_at": 1786034514.8998623, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_teardown", "macro_sql": "{% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %}\n\n -- drop the temp relations if they exist to leave the database clean for the next run\n {{ drop_relation_if_exists(backup_relation) }}\n {{ drop_relation_if_exists(intermediate_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1786034514.900366, "supported_languages": null}, "macro.dbt.materialized_view_get_build_sql": {"name": "materialized_view_get_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_get_build_sql", "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation.render() ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation.render() ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.get_create_materialized_view_as_sql", "macro.dbt.get_replace_sql", "macro.dbt.get_materialized_view_configuration_changes", "macro.dbt.refresh_materialized_view", "macro.dbt.get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786034514.902948, "supported_languages": null}, "macro.dbt.materialized_view_execute_no_op": {"name": "materialized_view_execute_no_op", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_no_op", "macro_sql": "{% macro materialized_view_execute_no_op(target_relation) %}\n {% do store_raw_result(\n name=\"main\",\n message=\"skip \" ~ target_relation,\n code=\"skip\",\n rows_affected=\"-1\"\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9034042, "supported_languages": null}, "macro.dbt.materialized_view_execute_build_sql": {"name": "materialized_view_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_build_sql", "macro_sql": "{% macro materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) %}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1786034514.9047325, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% set relation_for_indexes = target_relation %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set relation_for_indexes = intermediate_relation %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% set relation_for_indexes = temp_relation %}\n {% set contract_config = config.get('contract') %}\n {% if not contract_config or not contract_config.enforced %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {% endif %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(relation_for_indexes) %}\n {% endif %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.9133031, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1786034514.9158056, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n {{ return(adapter.dispatch('check_for_schema_changes', 'dbt')(source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__check_for_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9162405, "supported_languages": null}, "macro.dbt.default__check_for_schema_changes": {"name": "default__check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__check_for_schema_changes", "macro_sql": "{% macro default__check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.918682, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n {{ return(adapter.dispatch('sync_column_schemas', 'dbt')(on_schema_change, target_relation, schema_changes_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1786034514.9191668, "supported_languages": null}, "macro.dbt.default__sync_column_schemas": {"name": "default__sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__sync_column_schemas", "macro_sql": "{% macro default__sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1786034514.9215238, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n {{ return(adapter.dispatch('process_schema_changes', 'dbt')(on_schema_change, source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__process_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.922024, "supported_languages": null}, "macro.dbt.default__process_schema_changes": {"name": "default__process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__process_schema_changes", "macro_sql": "{% macro default__process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n\n Additional troubleshooting context:\n Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n New column types: {{ schema_changes_dict['new_target_types'] }}\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9236875, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column_names", "type": null, "description": ""}], "created_at": 1786034514.9253268, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1786034514.926417, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n {{ return(adapter.dispatch('diff_column_data_types', 'dbt')(source_columns, target_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1786034514.9268572, "supported_languages": null}, "macro.dbt.default__diff_column_data_types": {"name": "default__diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__diff_column_data_types", "macro_sql": "{% macro default__diff_column_data_types(source_columns, target_columns) %}\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.expanded_data_type != tc.expanded_data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.expanded_data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1786034514.92815, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1786034514.928739, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n {%- if merge_update_columns and merge_exclude_columns -%}\n {{ exceptions.raise_compiler_error(\n 'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n )}}\n {%- elif merge_update_columns -%}\n {%- set update_columns = merge_update_columns -%}\n {%- elif merge_exclude_columns -%}\n {%- set update_columns = [] -%}\n {%- for column in dest_columns -%}\n {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n {%- do update_columns.append(column.quoted) -%}\n {% endif %}\n {%- endfor -%}\n {%- else -%}\n {%- set update_columns = default_cols -%}\n {%- endif -%}\n\n {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1786034514.9301908, "supported_languages": null}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n -- back compat for old kwarg name\n {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786034514.932316, "supported_languages": null}, "macro.dbt.get_merge_unique_key_match": {"name": "get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_unique_key_match", "macro_sql": "{% macro get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {{ return(adapter.dispatch('get_merge_unique_key_match', 'dbt')(source_unique_key, target_unique_key)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1786034514.9327621, "supported_languages": null}, "macro.dbt.default__get_merge_unique_key_match": {"name": "default__get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_unique_key_match", "macro_sql": "{% macro default__get_merge_unique_key_match(source_unique_key, target_unique_key) -%}\n {{ return(equals(source_unique_key, target_unique_key) | trim) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1786034514.9331074, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set merge_update_columns = config.get('merge_update_columns') -%}\n {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set source_unique_key = (\"DBT_INTERNAL_SOURCE.\" ~ unique_key) | trim %}\n {% set target_unique_key = (\"DBT_INTERNAL_DEST.\" ~ unique_key) | trim %}\n {% set unique_key_match = get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns", "macro.dbt.get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786034514.936543, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786034514.937096, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is string %}\n {% set unique_key = [unique_key] %}\n {% endif %}\n\n {%- set unique_key_str = unique_key|join(', ') -%}\n\n delete from {{ target }} as DBT_INTERNAL_DEST\n where ({{ unique_key_str }}) in (\n select distinct {{ unique_key_str }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786034514.9386177, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1786034514.9391692, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {#-- The only time include_sql_header is True: --#}\n {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n {#-- We should consider including the sql header at the materialization level instead --#}\n\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1786034514.9404562, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.941722, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9421992, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9425821, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9431927, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9436884, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.944272, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9446418, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9451845, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9455545, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9458797, "supported_languages": null}, "macro.dbt.get_incremental_microbatch_sql": {"name": "get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_microbatch_sql", "macro_sql": "{% macro get_incremental_microbatch_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_microbatch_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_microbatch_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.946243, "supported_languages": null}, "macro.dbt.default__get_incremental_microbatch_sql": {"name": "default__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_microbatch_sql", "macro_sql": "{% macro default__get_incremental_microbatch_sql(arg_dict) %}\n\n {{ exceptions.raise_not_implemented('microbatch materialization strategy not implemented for adapter ' + adapter.type()) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786034514.9465632, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ temp_relation }}\n )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}, {"name": "temp_relation", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1786034514.9471421, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9482799, "supported_languages": null}, "macro.dbt.can_clone_table": {"name": "can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.can_clone_table", "macro_sql": "{% macro can_clone_table() %}\n {{ return(adapter.dispatch('can_clone_table', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__can_clone_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9487765, "supported_languages": null}, "macro.dbt.default__can_clone_table": {"name": "default__can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.default__can_clone_table", "macro_sql": "{% macro default__can_clone_table() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9490166, "supported_languages": null}, "macro.dbt.materialization_clone_default": {"name": "materialization_clone_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/clone.sql", "original_file_path": "macros/materializations/models/clone/clone.sql", "unique_id": "macro.dbt.materialization_clone_default", "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n {%- set grant_config = config.get('grants') -%}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation.render() ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% if target_relation.database == defer_relation.database and\n target_relation.schema == defer_relation.schema and\n target_relation.identifier == defer_relation.identifier %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation.render()) }}\n {% else %}\n {% call statement('main') %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endcall %}\n {% endif %}\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.can_clone_table", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_or_replace_clone", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.9542215, "supported_languages": ["sql"]}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1786034514.9548566, "supported_languages": null}, "macro.dbt.default__create_or_replace_clone": {"name": "default__create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.default__create_or_replace_clone", "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation.render() }} clone {{ defer_relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1786034514.955205, "supported_languages": null}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.9558427, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034514.9566123, "supported_languages": null}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786034514.957647, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786034514.958297, "supported_languages": null}, "macro.dbt.get_unit_test_sql": {"name": "get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_unit_test_sql", "macro_sql": "{% macro get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n {{ adapter.dispatch('get_unit_test_sql', 'dbt')(main_sql, expected_fixture_sql, expected_column_names) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_unit_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1786034514.9587336, "supported_languages": null}, "macro.dbt.default__get_unit_test_sql": {"name": "default__get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_unit_test_sql", "macro_sql": "{% macro default__get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n-- Build actual result given inputs\nwith dbt_internal_unit_test_actual as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%},{% endif %}{%- endfor -%}, {{ dbt.string_literal(\"actual\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ main_sql }}\n ) _dbt_internal_unit_test_actual\n),\n-- Build expected result\ndbt_internal_unit_test_expected as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%}, {% endif %}{%- endfor -%}, {{ dbt.string_literal(\"expected\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ expected_fixture_sql }}\n ) _dbt_internal_unit_test_expected\n)\n-- Union actual and expected results\nselect * from dbt_internal_unit_test_actual\nunion all\nselect * from dbt_internal_unit_test_expected\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1786034514.959948, "supported_languages": null}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n {% set limit = config.get('limit') %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set sql_with_limit %}\n {{ get_limit_subquery_sql(sql, limit) }}\n {% endset %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% set store_failures_as = config.get('store_failures_as') %}\n -- if `--store-failures` is invoked via command line and `store_failures_as` is not set,\n -- config.get('store_failures_as', 'table') returns None, not 'table'\n {% if store_failures_as == none %}{% set store_failures_as = 'table' %}{% endif %}\n {% if store_failures_as not in ['table', 'view'] %}\n {{ exceptions.raise_compiler_error(\n \"'\" ~ store_failures_as ~ \"' is not a valid value for `store_failures_as`. \"\n \"Accepted values are: ['ephemeral', 'table', 'view']\"\n ) }}\n {% endif %}\n\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type=store_failures_as) -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ get_create_sql(target_relation, sql_with_limit) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {# Since the test failures have already been saved to the database, reuse that result rather than querying again #}\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql_with_limit %}\n\n {% endif %}\n\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {# The limit has already been included above, and we do not want to duplicate it again. We also want to be safe for macro overrides treating `limit` as a required parameter. #}\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit=none)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql", "macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.get_create_sql", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.9651015, "supported_languages": ["sql"]}, "macro.dbt.materialization_unit_default": {"name": "materialization_unit_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/unit.sql", "original_file_path": "macros/materializations/tests/unit.sql", "unique_id": "macro.dbt.materialization_unit_default", "macro_sql": "{%- materialization unit, default -%}\n\n {% set relations = [] %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set expected_rows = config.get('expected_rows') %}\n {% set expected_sql = config.get('expected_sql') %}\n {% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {% do run_query(get_create_table_as_sql(True, temp_relation, get_empty_subquery_sql(sql))) %}\n {%- set columns_in_relation = adapter.get_columns_in_relation(temp_relation) -%}\n {%- set column_name_to_data_types = {} -%}\n {%- set column_name_to_quoted = {} -%}\n {%- for column in columns_in_relation -%}\n {%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n {%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n {%- endfor -%}\n\n {%- set expected_column_names_quoted = [] -%}\n {%- for column_name in tested_expected_column_names -%}\n {%- do expected_column_names_quoted.append(column_name_to_quoted[column_name|lower]) -%}\n {%- endfor -%}\n\n {% if not expected_sql %}\n {% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types, column_name_to_quoted) %}\n {% endif %}\n {% set unit_test_sql = get_unit_test_sql(sql, expected_sql, expected_column_names_quoted) %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ unit_test_sql }}\n\n {%- endcall %}\n\n {% do adapter.drop_relation(temp_relation) %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt.make_temp_relation", "macro.dbt.run_query", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_empty_subquery_sql", "macro.dbt.get_expected_sql", "macro.dbt.get_unit_test_sql", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.9692583, "supported_languages": ["sql"]}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation.render())) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = \"\" %}\n {% if rows_affected > 0 %}\n {% set sql = load_csv_rows(model, agate_table) %}\n {% endif %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034514.9747458, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786034514.9765592, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786034514.9783485, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786034514.978837, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation.render() %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786034514.979826, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1786034514.9802077, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1786034514.9804862, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9807994, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9810424, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.981358, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.981598, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_names", "type": null, "description": ""}], "created_at": 1786034514.9825642, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786034514.9830608, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786034514.9855182, "supported_languages": null}, "macro.dbt.get_aggregate_function_create_replace_signature": {"name": "get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_create_replace_signature", "macro_sql": "{% macro get_aggregate_function_create_replace_signature(target_relation) %}\n {{ return(adapter.dispatch('get_aggregate_function_create_replace_signature', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_create_replace_signature"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9868073, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_create_replace_signature": {"name": "default__get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_create_replace_signature", "macro_sql": "{% macro default__get_aggregate_function_create_replace_signature(target_relation) %}\n CREATE OR REPLACE AGGREGATE FUNCTION {{ target_relation.render() }} ({{ get_formatted_aggregate_function_args()}})\n RETURNS {{ model.returns.data_type }}\n {{ get_function_language_specifier() }}\n {{ get_aggregate_function_volatility_specifier() }}\n {% if model.get('language') == 'python' %}\n {{ get_function_python_options() }}\n {% endif %}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_formatted_aggregate_function_args", "macro.dbt.get_function_language_specifier", "macro.dbt.get_aggregate_function_volatility_specifier", "macro.dbt.get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9875321, "supported_languages": null}, "macro.dbt.get_formatted_aggregate_function_args": {"name": "get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_formatted_aggregate_function_args", "macro_sql": "{% macro get_formatted_aggregate_function_args() %}\n {{ return(adapter.dispatch('get_formatted_aggregate_function_args', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_formatted_aggregate_function_args"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9879017, "supported_languages": null}, "macro.dbt.default__get_formatted_aggregate_function_args": {"name": "default__get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_formatted_aggregate_function_args", "macro_sql": "{% macro default__get_formatted_aggregate_function_args() %}\n {# conveniently we can reuse the sql scalar function args #}\n {{ formatted_scalar_function_args_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.988141, "supported_languages": null}, "macro.dbt.get_function_language_specifier": {"name": "get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_language_specifier", "macro_sql": "{% macro get_function_language_specifier() %}\n {{ return(adapter.dispatch('get_function_language_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_language_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9884634, "supported_languages": null}, "macro.dbt.default__get_function_language_specifier": {"name": "default__get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_language_specifier", "macro_sql": "{% macro default__get_function_language_specifier() %}\n {% set language = model.get('language') %}\n {% if language == 'sql' %}\n {# generally you dont need to specify the language for sql functions #}\n {% elif language == 'python' %}\n LANGUAGE PYTHON\n {% elif language == 'javascript' %}\n LANGUAGE js\n {% else %}\n {{ 'LANGUAGE ' ~ language.upper() }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.989224, "supported_languages": null}, "macro.dbt.get_aggregate_function_volatility_specifier": {"name": "get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_volatility_specifier", "macro_sql": "{% macro get_aggregate_function_volatility_specifier() %}\n {{ return(adapter.dispatch('get_aggregate_function_volatility_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_volatility_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.989569, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_volatility_specifier": {"name": "default__get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_volatility_specifier", "macro_sql": "{% macro default__get_aggregate_function_volatility_specifier() %}\n {{ scalar_function_volatility_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9898117, "supported_languages": null}, "macro.dbt.get_function_python_options": {"name": "get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_python_options", "macro_sql": "{% macro get_function_python_options() %}\n {{ return(adapter.dispatch('get_function_python_options', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.990137, "supported_languages": null}, "macro.dbt.default__get_function_python_options": {"name": "default__get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_python_options", "macro_sql": "{% macro default__get_function_python_options() %}\n RUNTIME_VERSION = '{{ model.config.get('runtime_version') }}'\n HANDLER = '{{ model.config.get('entry_point') }}'\n {% set packages = model.config.get('packages', []) %}\n {% if packages %}\n PACKAGES = ('{{ packages | join(\"','\") }}')\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9908755, "supported_languages": null}, "macro.dbt.scalar_function_sql": {"name": "scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_sql", "macro_sql": "{% macro scalar_function_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9924064, "supported_languages": null}, "macro.dbt.default__scalar_function_sql": {"name": "default__scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_sql", "macro_sql": "{% macro default__scalar_function_sql(target_relation) %}\n {{ scalar_function_create_replace_signature_sql(target_relation) }}\n {{ scalar_function_body_sql() }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_create_replace_signature_sql", "macro.dbt.scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9927423, "supported_languages": null}, "macro.dbt.scalar_function_create_replace_signature_sql": {"name": "scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_create_replace_signature_sql", "macro_sql": "{% macro scalar_function_create_replace_signature_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_create_replace_signature_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_create_replace_signature_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9931092, "supported_languages": null}, "macro.dbt.default__scalar_function_create_replace_signature_sql": {"name": "default__scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_create_replace_signature_sql", "macro_sql": "{% macro default__scalar_function_create_replace_signature_sql(target_relation) %}\n CREATE OR REPLACE FUNCTION {{ target_relation.render() }} ({{ formatted_scalar_function_args_sql()}})\n RETURNS {{ model.returns.data_type }}\n {{ scalar_function_volatility_sql() }}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql", "macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034514.9935322, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_sql": {"name": "formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_sql", "macro_sql": "{% macro formatted_scalar_function_args_sql() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9942176, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_javascript": {"name": "formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_javascript", "macro_sql": "{% macro formatted_scalar_function_args_javascript() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__formatted_scalar_function_args_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9945612, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_sql": {"name": "default__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_sql", "macro_sql": "{% macro default__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.995219, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_javascript": {"name": "default__formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_javascript", "macro_sql": "{% macro default__formatted_scalar_function_args_javascript() %}\n {% set msg = \"formatted_scalar_function_args_javascript not implemented for adapter \" ~ adapter.type() %}\n {% do exceptions.raise_compiler_error(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9956262, "supported_languages": null}, "macro.dbt.scalar_function_body_sql": {"name": "scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_body_sql", "macro_sql": "{% macro scalar_function_body_sql() %}\n {{ return(adapter.dispatch('scalar_function_body_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9959826, "supported_languages": null}, "macro.dbt.default__scalar_function_body_sql": {"name": "default__scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_body_sql", "macro_sql": "{% macro default__scalar_function_body_sql() %}\n $$\n {{ model.compiled_code }}\n $$ LANGUAGE SQL\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.996198, "supported_languages": null}, "macro.dbt.scalar_function_volatility_sql": {"name": "scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_sql", "macro_sql": "{% macro scalar_function_volatility_sql() %}\n {{ return(adapter.dispatch('scalar_function_volatility_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.996522, "supported_languages": null}, "macro.dbt.scalar_function_volatility_javascript": {"name": "scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_javascript", "macro_sql": "{% macro scalar_function_volatility_javascript() %}\n {{ return(adapter.dispatch('scalar_function_volatility_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9968731, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_javascript": {"name": "default__scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_javascript", "macro_sql": "{% macro default__scalar_function_volatility_javascript() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility != none %}\n {% set msg = \"Volatility is not supported by \" ~ adapter.type() ~ \" in javascript UDF and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9975655, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_sql": {"name": "default__scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_sql", "macro_sql": "{% macro default__scalar_function_volatility_sql() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility == 'deterministic' %}\n IMMUTABLE\n {% elif volatility == 'stable' %}\n STABLE\n {% elif volatility == 'non-deterministic' %}\n VOLATILE\n {% elif volatility != none %}\n {# This shouldn't happen unless a new volatility is invented #}\n {% do unsupported_volatility_warning(volatility) %}\n {% endif %}\n {# If no volatility is set, don't add anything and let the data warehouse default it #}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034514.9984143, "supported_languages": null}, "macro.dbt.unsupported_volatility_warning": {"name": "unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.unsupported_volatility_warning", "macro_sql": "{% macro unsupported_volatility_warning(volatility) %}\n {{ return(adapter.dispatch('unsupported_volatility_warning', 'dbt')(volatility)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1786034514.9988108, "supported_languages": null}, "macro.dbt.default__unsupported_volatility_warning": {"name": "default__unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__unsupported_volatility_warning", "macro_sql": "{% macro default__unsupported_volatility_warning(volatility) %}\n {% set msg = \"Found `\" ~ volatility ~ \"` volatility specified on function `\" ~ model.name ~ \"`. This volatility is not supported by \" ~ adapter.type() ~ \", and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1786034514.999328, "supported_languages": null}, "macro.dbt.materialization_function_default": {"name": "materialization_function_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/function.sql", "original_file_path": "macros/materializations/functions/function.sql", "unique_id": "macro.dbt.materialization_function_default", "macro_sql": "{% materialization function, default, supported_languages=['sql', 'python', 'javascript'] %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.Function) %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% set function_config = this.get_function_config(model) %}\n {% set macro_name = this.get_function_macro_name(function_config) %}\n\n {# Doing this aliasing of adapter.dispatch is a hacky way to disable the static analysis of actually calling adapter.dispatch #}\n {# This is necessary because the static analysis breaks being able to dynamically pass a macro_name #}\n {% set _dispatch = adapter.dispatch %}\n\n {% set build_sql = _dispatch(macro_name, 'dbt')(target_relation) %}\n {{ function_execute_build_sql(build_sql, existing_relation, target_relation) }}\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.run_hooks", "macro.dbt.function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034515.001179, "supported_languages": ["sql", "python", "javascript"]}, "macro.dbt.function_execute_build_sql": {"name": "function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.function_execute_build_sql", "macro_sql": "{% macro function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n {{ return(adapter.dispatch('function_execute_build_sql', 'dbt')(build_sql, existing_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034515.001917, "supported_languages": null}, "macro.dbt.default__function_execute_build_sql": {"name": "default__function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.default__function_execute_build_sql", "macro_sql": "{% macro default__function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034515.0029712, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1786034515.003787, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n merge into {{ target.render() }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}\n\n when matched\n {% if config.get(\"dbt_valid_to_current\") %}\n\t{% set source_unique_key = (\"DBT_INTERNAL_DEST.\" ~ columns.dbt_valid_to) | trim %}\n\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\tand ({{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null)\n\n {% else %}\n and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null\n {% endif %}\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1786034515.0055552, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {# The model['config'] parameter below is no longer used, but passing anyway for compatibility #}\n {# It was a dictionary of config, instead of the config object from the context #}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", model['config'], target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set build_or_select_sql = build_sql %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {{ adapter.assert_valid_snapshot_target_given_strategy(target_relation, columns, strategy) }}\n\n {% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set remove_columns = ['dbt_change_type', 'DBT_CHANGE_TYPE', 'dbt_unique_key', 'DBT_UNIQUE_KEY'] %}\n {% if unique_key | is_list %}\n {% for key in strategy.unique_key %}\n {{ remove_columns.append('dbt_unique_key_' + loop.index|string) }}\n {{ remove_columns.append('DBT_UNIQUE_KEY_' + loop.index|string) }}\n {% endfor %}\n {% endif %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n\n {{ check_time_data_types(build_or_select_sql) }}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_staging_table", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.check_time_data_types", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786034515.0134318, "supported_languages": ["sql"]}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}], "created_at": 1786034515.0174592, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1786034515.0178373, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1786034515.018294, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set primary_key = config.get('unique_key') %}\n {% set updated_at = config.get('updated_at') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.{{ columns.dbt_valid_from }} < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1786034515.0202074, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1786034515.0205455, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1786034515.0209105, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n select {{ check_cols_config | join(', ') }} from (\n {{ node['compiled_code'] }}\n ) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}, {"name": "check_cols_config", "type": null, "description": ""}], "created_at": 1786034515.0236335, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set check_cols_config = config.get('check_cols') %}\n {% set primary_key = config.get('unique_key') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set updated_at = config.get('updated_at') or snapshot_get_time() %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1786034515.0266368, "supported_languages": null}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.0305912, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation.render() }} add column {{ adapter.quote(column.name) }} {{ column.expanded_data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.0312655, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1786034515.0316048, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1786034515.0318196, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.0321176, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.0323586, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034515.0327902, "supported_languages": null}, "macro.dbt.get_snapshot_table_column_names": {"name": "get_snapshot_table_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_snapshot_table_column_names", "macro_sql": "{% macro get_snapshot_table_column_names() %}\n {{ return({'dbt_valid_to': 'dbt_valid_to', 'dbt_valid_from': 'dbt_valid_from', 'dbt_scd_id': 'dbt_scd_id', 'dbt_updated_at': 'dbt_updated_at', 'dbt_is_deleted': 'dbt_is_deleted'}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.0332818, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n {% if strategy.hard_deletes == 'new_record' %}\n {% set new_scd_id = snapshot_hash_arguments([columns.dbt_scd_id, snapshot_get_time()]) %}\n {% endif %}\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from {{ target_relation }}\n where\n {% if config.get('dbt_valid_to_current') %}\n\t\t{% set source_unique_key = columns.dbt_valid_to | trim %}\n\t\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\n\t\t{# The exact equals semantics between NULL values depends on the current behavior flag set. Also, update records if the source field is null #}\n ( {{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null )\n {% else %}\n {{ columns.dbt_valid_to }} is null\n {% endif %}\n\n ),\n\n insertions_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }},\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }}\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_to }}\n\n from snapshot_query\n ),\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n\n deletes_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n {%- if strategy.hard_deletes == 'new_record' -%}\n ,'False' as {{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"snapshotted_data\") }}\n or ({{ unique_key_is_not_null(strategy.unique_key, \"snapshotted_data\") }} and (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from updates_source_data as source_data\n join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n )\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n ,\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_to }},\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n and not (\n --avoid updating the record's valid_to if the latest entry is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n {%- endif %}\n )\n {%- endif %}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n {% set snapshotted_cols = get_list_of_column_names(get_columns_in_relation(target_relation)) %}\n {% set source_col_names = get_columns_in_query(source_sql) %}\n ,\n deletion_records as (\n\n select\n 'insert' as dbt_change_type,\n {%- for col_name in source_col_names -%}\n {%- if col_name in snapshotted_cols -%}\n snapshotted_data.{{ adapter.quote(col_name) }},\n {%- else -%}\n source_data.{{ adapter.quote(col_name) }},\n {%- endif -%}\n {% endfor -%}\n {%- if strategy.unique_key | is_list -%}\n {%- for key in strategy.unique_key -%}\n snapshotted_data.{{ key }} as dbt_unique_key_{{ loop.index }},\n {% endfor -%}\n {%- else -%}\n snapshotted_data.dbt_unique_key as dbt_unique_key,\n {% endif -%}\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n snapshotted_data.{{ columns.dbt_valid_to }} as {{ columns.dbt_valid_to }},\n {{ new_scd_id }} as {{ columns.dbt_scd_id }},\n 'True' as {{ columns.dbt_is_deleted }}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n and not (\n --avoid inserting a new record if the latest one is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletes\n {%- endif %}\n {%- if strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletion_records\n {%- endif %}\n\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments", "macro.dbt.snapshot_get_time", "macro.dbt.unique_key_fields", "macro.dbt.equals", "macro.dbt.get_dbt_valid_to_current", "macro.dbt.unique_key_join_on", "macro.dbt.unique_key_is_null", "macro.dbt.unique_key_is_not_null", "macro.dbt.get_list_of_column_names", "macro.dbt.get_columns_in_relation", "macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034515.0420916, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0425277, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\n select *,\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , 'False' as {{ columns.dbt_is_deleted }}\n {% endif -%}\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.get_dbt_valid_to_current"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0435724, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786034515.0444276, "supported_languages": null}, "macro.dbt.get_updated_at_column_data_type": {"name": "get_updated_at_column_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_updated_at_column_data_type", "macro_sql": "{% macro get_updated_at_column_data_type(snapshot_sql) %}\n {% set snapshot_sql_column_schema = get_column_schema_from_query(snapshot_sql) %}\n {% set dbt_updated_at_data_type = null %}\n {% set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {% set ns.dbt_updated_at_data_type = null -%}\n {% for column in snapshot_sql_column_schema %}\n {% if ((column.column == 'dbt_updated_at') or (column.column == 'DBT_UPDATED_AT')) %}\n {% set ns.dbt_updated_at_data_type = column.dtype %}\n {% endif %}\n {% endfor %}\n {{ return(ns.dbt_updated_at_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "snapshot_sql", "type": null, "description": ""}], "created_at": 1786034515.0456057, "supported_languages": null}, "macro.dbt.check_time_data_types": {"name": "check_time_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.check_time_data_types", "macro_sql": "{% macro check_time_data_types(sql) %}\n {% set dbt_updated_at_data_type = get_updated_at_column_data_type(sql) %}\n {% set snapshot_get_time_data_type = get_snapshot_get_time_data_type() %}\n {% if snapshot_get_time_data_type is not none and dbt_updated_at_data_type is not none and snapshot_get_time_data_type != dbt_updated_at_data_type %}\n {% if exceptions.warn_snapshot_timestamp_data_types %}\n {{ exceptions.warn_snapshot_timestamp_data_types(snapshot_get_time_data_type, dbt_updated_at_data_type) }}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_updated_at_column_data_type", "macro.dbt.get_snapshot_get_time_data_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0464654, "supported_languages": null}, "macro.dbt.get_dbt_valid_to_current": {"name": "get_dbt_valid_to_current", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_dbt_valid_to_current", "macro_sql": "{% macro get_dbt_valid_to_current(strategy, columns) %}\n {% set dbt_valid_to_current = config.get('dbt_valid_to_current') or \"null\" %}\n coalesce(nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}), {{dbt_valid_to_current}})\n as {{ columns.dbt_valid_to }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.0470488, "supported_languages": null}, "macro.dbt.unique_key_fields": {"name": "unique_key_fields", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_fields", "macro_sql": "{% macro unique_key_fields(unique_key) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n {{ key }} as dbt_unique_key_{{ loop.index }}\n {%- if not loop.last %} , {%- endif %}\n {% endfor %}\n {% else %}\n {{ unique_key }} as dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}], "created_at": 1786034515.0477521, "supported_languages": null}, "macro.dbt.unique_key_join_on": {"name": "unique_key_join_on", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_join_on", "macro_sql": "{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n\t {% set source_unique_key = (identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {% set target_unique_key = (from_identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {{ equals(source_unique_key, target_unique_key) }}\n {%- if not loop.last %} and {%- endif %}\n {% endfor %}\n {% else %}\n {{ identifier }}.dbt_unique_key = {{ from_identifier }}.dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "from_identifier", "type": null, "description": ""}], "created_at": 1786034515.048892, "supported_languages": null}, "macro.dbt.unique_key_is_null": {"name": "unique_key_is_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_null", "macro_sql": "{% macro unique_key_is_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is null\n {% else %}\n {{ identifier }}.dbt_unique_key is null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1786034515.0493186, "supported_languages": null}, "macro.dbt.unique_key_is_not_null": {"name": "unique_key_is_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_not_null", "macro_sql": "{% macro unique_key_is_not_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is not null\n {% else %}\n {{ identifier }}.dbt_unique_key is not null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1786034515.0497835, "supported_languages": null}, "macro.dbt.get_create_backup_sql": {"name": "get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.get_create_backup_sql", "macro_sql": "{%- macro get_create_backup_sql(relation) -%}\n {{- log('Applying CREATE BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.050404, "supported_languages": null}, "macro.dbt.default__get_create_backup_sql": {"name": "default__get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.default__get_create_backup_sql", "macro_sql": "{%- macro default__get_create_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n -- drop any pre-existing backup\n {{ get_drop_sql(backup_relation) }};\n\n {{ get_rename_sql(relation, backup_relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0509584, "supported_languages": null}, "macro.dbt.get_rename_sql": {"name": "get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.get_rename_sql", "macro_sql": "{%- macro get_rename_sql(relation, new_name) -%}\n {{- log('Applying RENAME to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.0518582, "supported_languages": null}, "macro.dbt.default__get_rename_sql": {"name": "default__get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__get_rename_sql", "macro_sql": "{%- macro default__get_rename_sql(relation, new_name) -%}\n\n {%- if relation.is_view -%}\n {{ get_rename_view_sql(relation, new_name) }}\n\n {%- elif relation.is_table -%}\n {{ get_rename_table_sql(relation, new_name) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_rename_materialized_view_sql(relation, new_name) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_rename_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.get_rename_view_sql", "macro.dbt.get_rename_table_sql", "macro.dbt.get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.052727, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1786034515.0531337, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation.render() }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1786034515.0537355, "supported_languages": null}, "macro.dbt.get_replace_sql": {"name": "get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.get_replace_sql", "macro_sql": "{% macro get_replace_sql(existing_relation, target_relation, sql) %}\n {{- log('Applying REPLACE to: ' ~ existing_relation) -}}\n {{- adapter.dispatch('get_replace_sql', 'dbt')(existing_relation, target_relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0547729, "supported_languages": null}, "macro.dbt.default__get_replace_sql": {"name": "default__get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.default__get_replace_sql", "macro_sql": "{% macro default__get_replace_sql(existing_relation, target_relation, sql) %}\n\n {# /* use a create or replace statement if possible */ #}\n\n {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}\n\n {% if is_replaceable and existing_relation.is_view %}\n {{ get_replace_view_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_table %}\n {{ get_replace_table_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_materialized_view %}\n {{ get_replace_materialized_view_sql(target_relation, sql) }}\n\n {# /* a create or replace statement is not possible, so try to stage and/or backup to be safe */ #}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one using a backup */ #}\n {%- elif target_relation.can_be_renamed and existing_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one without using a backup */ #}\n {%- elif target_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_drop_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }}\n\n {# /* create target_relation in place by first backing up the existing relation */ #}\n {%- elif existing_relation.can_be_renamed -%}\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* no renaming is allowed, so just drop and create */ #}\n {%- else -%}\n {{ get_drop_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_view_sql", "macro.dbt.get_replace_table_sql", "macro.dbt.get_replace_materialized_view_sql", "macro.dbt.get_create_intermediate_sql", "macro.dbt.get_create_backup_sql", "macro.dbt.get_rename_intermediate_sql", "macro.dbt.get_drop_backup_sql", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0572426, "supported_languages": null}, "macro.dbt.drop_schema_named": {"name": "drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.drop_schema_named", "macro_sql": "{% macro drop_schema_named(schema_name) %}\n {{ return(adapter.dispatch('drop_schema_named', 'dbt') (schema_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_schema_named"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1786034515.057804, "supported_languages": null}, "macro.dbt.default__drop_schema_named": {"name": "default__drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.default__drop_schema_named", "macro_sql": "{% macro default__drop_schema_named(schema_name) %}\n {% set schema_relation = api.Relation.create(schema=schema_name) %}\n {{ adapter.drop_schema(schema_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1786034515.0582266, "supported_languages": null}, "macro.dbt.get_rename_intermediate_sql": {"name": "get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.get_rename_intermediate_sql", "macro_sql": "{%- macro get_rename_intermediate_sql(relation) -%}\n {{- log('Applying RENAME INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_intermediate_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0588305, "supported_languages": null}, "macro.dbt.default__get_rename_intermediate_sql": {"name": "default__get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.default__get_rename_intermediate_sql", "macro_sql": "{%- macro default__get_rename_intermediate_sql(relation) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n {{ get_rename_sql(intermediate_relation, relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0592399, "supported_languages": null}, "macro.dbt.get_create_sql": {"name": "get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.get_create_sql", "macro_sql": "{%- macro get_create_sql(relation, sql) -%}\n {{- log('Applying CREATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.059969, "supported_languages": null}, "macro.dbt.default__get_create_sql": {"name": "default__get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.default__get_create_sql", "macro_sql": "{%- macro default__get_create_sql(relation, sql) -%}\n\n {%- if relation.is_view -%}\n {{ get_create_view_as_sql(relation, sql) }}\n\n {%- elif relation.is_table -%}\n {{ get_create_table_as_sql(False, relation, sql) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_create_materialized_view_as_sql(relation, sql) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_create_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.get_create_view_as_sql", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0608497, "supported_languages": null}, "macro.dbt.get_drop_backup_sql": {"name": "get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.get_drop_backup_sql", "macro_sql": "{%- macro get_drop_backup_sql(relation) -%}\n {{- log('Applying DROP BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.061421, "supported_languages": null}, "macro.dbt.default__get_drop_backup_sql": {"name": "default__get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.default__get_drop_backup_sql", "macro_sql": "{%- macro default__get_drop_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n {{ get_drop_sql(backup_relation) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0618482, "supported_languages": null}, "macro.dbt.get_create_intermediate_sql": {"name": "get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.get_create_intermediate_sql", "macro_sql": "{%- macro get_create_intermediate_sql(relation, sql) -%}\n {{- log('Applying CREATE INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_intermediate_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.062475, "supported_languages": null}, "macro.dbt.default__get_create_intermediate_sql": {"name": "default__get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.default__get_create_intermediate_sql", "macro_sql": "{%- macro default__get_create_intermediate_sql(relation, sql) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n -- drop any pre-existing intermediate\n {{ get_drop_sql(intermediate_relation) }};\n\n {{ get_create_sql(intermediate_relation, sql) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.062991, "supported_languages": null}, "macro.dbt.get_drop_sql": {"name": "get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.get_drop_sql", "macro_sql": "{%- macro get_drop_sql(relation) -%}\n {{- log('Applying DROP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0638397, "supported_languages": null}, "macro.dbt.default__get_drop_sql": {"name": "default__get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__get_drop_sql", "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation.render() }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.drop_view", "macro.dbt.drop_table", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.064597, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0649781, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n {{ get_drop_sql(relation) }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.065379, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.065891, "supported_languages": null}, "macro.dbt.get_rename_table_sql": {"name": "get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.get_rename_table_sql", "macro_sql": "{% macro get_rename_table_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_table_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.0663989, "supported_languages": null}, "macro.dbt.default__get_rename_table_sql": {"name": "default__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.default__get_rename_table_sql", "macro_sql": "{% macro default__get_rename_table_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.0667107, "supported_languages": null}, "macro.dbt.get_replace_table_sql": {"name": "get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.get_replace_table_sql", "macro_sql": "{% macro get_replace_table_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_table_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0672157, "supported_languages": null}, "macro.dbt.default__get_replace_table_sql": {"name": "default__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.default__get_replace_table_sql", "macro_sql": "{% macro default__get_replace_table_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0675101, "supported_languages": null}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0686953, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0690675, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {# backward compatibility for create_table_as that does not support language #}\n {% if language == \"sql\" %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n {% else %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "compiled_code", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1786034515.069916, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced and (not temporary) %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0712516, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n {#- loop through user_provided_columns to get column names -#}\n {%- set user_provided_columns = model['columns'] -%}\n {%- for i in user_provided_columns %}\n {%- set col = user_provided_columns[i] -%}\n {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.0721748, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0725377, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n from (\n {{ sql }}\n ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0729089, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n {{- adapter.dispatch('drop_table', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0733774, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0736227, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.075023, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.0753691, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n {# loop through user_provided_columns to create DDL with data types and constraints #}\n {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n (\n {% for c in raw_column_constraints -%}\n {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n {% endfor %}\n {% for c in raw_model_constraints -%}\n {{ c }}{{ \",\" if not loop.last }}\n {% endfor -%}\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.076433, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0767896, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0770655, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n {#-- First ensure the user has defined 'columns' in yaml specification --#}\n {%- set user_defined_columns = model['columns'] -%}\n {%- if not user_defined_columns -%}\n {{ exceptions.raise_contract_error([], []) }}\n {%- endif -%}\n\n {#-- Obtain the column schema provided by sql file. #}\n {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n {#-- create dictionaries with name and formatted data type and strings for exception #}\n {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n {%- set yaml_columns = format_columns(schema_file_provided_columns) -%}\n\n {%- if sql_columns|length != yaml_columns|length -%}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n\n {%- for sql_col in sql_columns -%}\n {%- set yaml_col = [] -%}\n {%- for this_col in yaml_columns -%}\n {%- if this_col['name'] == sql_col['name'] -%}\n {%- do yaml_col.append(this_col) -%}\n {%- break -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if not yaml_col -%}\n {#-- Column with name not found in yaml #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n {#-- Column data types don't match #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0795434, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n {% set formatted_columns = [] %}\n {% for column in columns %}\n {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n {%- do formatted_columns.append(formatted_column) -%}\n {% endfor %}\n {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.0803068, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n {% set data_type = column.dtype %}\n {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1786034515.0809789, "supported_languages": null}, "macro.dbt.get_rename_view_sql": {"name": "get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.get_rename_view_sql", "macro_sql": "{% macro get_rename_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.0814888, "supported_languages": null}, "macro.dbt.default__get_rename_view_sql": {"name": "default__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.default__get_rename_view_sql", "macro_sql": "{% macro default__get_rename_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.0818057, "supported_languages": null}, "macro.dbt.get_replace_view_sql": {"name": "get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.get_replace_view_sql", "macro_sql": "{% macro get_replace_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0827775, "supported_languages": null}, "macro.dbt.default__get_replace_view_sql": {"name": "default__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__get_replace_view_sql", "macro_sql": "{% macro default__get_replace_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.083069, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.0852048, "supported_languages": null}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1786034515.0857098, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation.render() ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1786034515.0861785, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0868928, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0872128, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0875647, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation.render() }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0884387, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n {{- adapter.dispatch('drop_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0889387, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0891874, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.refresh_materialized_view", "macro_sql": "{% macro refresh_materialized_view(relation) %}\n {{- log('Applying REFRESH to: ' ~ relation) -}}\n {{- adapter.dispatch('refresh_materialized_view', 'dbt')(relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.089779, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\n {{ exceptions.raise_compiler_error(\"`refresh_materialized_view` has not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0900505, "supported_languages": null}, "macro.dbt.get_rename_materialized_view_sql": {"name": "get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.get_rename_materialized_view_sql", "macro_sql": "{% macro get_rename_materialized_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.090551, "supported_languages": null}, "macro.dbt.default__get_rename_materialized_view_sql": {"name": "default__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.default__get_rename_materialized_view_sql", "macro_sql": "{% macro default__get_rename_materialized_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786034515.0908685, "supported_languages": null}, "macro.dbt.get_alter_materialized_view_as_sql": {"name": "get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_alter_materialized_view_as_sql", "macro_sql": "{% macro get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{- log('Applying ALTER to: ' ~ relation) -}}\n {{- adapter.dispatch('get_alter_materialized_view_as_sql', 'dbt')(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n ) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786034515.0918708, "supported_languages": null}, "macro.dbt.default__get_alter_materialized_view_as_sql": {"name": "default__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_alter_materialized_view_as_sql", "macro_sql": "{% macro default__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786034515.0922441, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_materialized_view_configuration_changes", "macro_sql": "{% macro get_materialized_view_configuration_changes(existing_relation, new_config) %}\n /* {#\n It's recommended that configuration changes be formatted as follows:\n {\"\": [{\"action\": \"\", \"context\": ...}]}\n\n For example:\n {\n \"indexes\": [\n {\"action\": \"drop\", \"context\": \"index_abc\"},\n {\"action\": \"create\", \"context\": {\"columns\": [\"column_1\", \"column_2\"], \"type\": \"hash\", \"unique\": True}},\n ],\n }\n\n Either way, `get_materialized_view_configuration_changes` needs to align with `get_alter_materialized_view_as_sql`.\n #} */\n {{- log('Determining configuration changes on: ' ~ existing_relation) -}}\n {%- do return(adapter.dispatch('get_materialized_view_configuration_changes', 'dbt')(existing_relation, new_config)) -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1786034515.092809, "supported_languages": null}, "macro.dbt.default__get_materialized_view_configuration_changes": {"name": "default__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_materialized_view_configuration_changes", "macro_sql": "{% macro default__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1786034515.0932062, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_sql": {"name": "get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.get_replace_materialized_view_sql", "macro_sql": "{% macro get_replace_materialized_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_materialized_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0937407, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_sql": {"name": "default__get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_sql", "macro_sql": "{% macro default__get_replace_materialized_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0940423, "supported_languages": null}, "macro.dbt.get_create_materialized_view_as_sql": {"name": "get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n {{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.094547, "supported_languages": null}, "macro.dbt.default__get_create_materialized_view_as_sql": {"name": "default__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.default__get_create_materialized_view_as_sql", "macro_sql": "{% macro default__get_create_materialized_view_as_sql(relation, sql) -%}\n {{ exceptions.raise_compiler_error(\n \"`get_create_materialized_view_as_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.0948577, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n {{- adapter.dispatch('drop_materialized_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.095322, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.0955713, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n {%- if execute: -%}\n {%- set compiled_code = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n {{ write(compiled_code) }}\n {%- endif -%}\n {%- if language == 'sql'-%}\n {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- elif language == 'python' -%}\n {%- set res = submit_python_job(model, compiled_code) -%}\n {#-- TODO: What should table be for python models? --#}\n {%- set table = None -%}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "fetch_result", "type": null, "description": ""}, {"name": "auto_begin", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1786034515.0980818, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "message", "type": null, "description": ""}, {"name": "code", "type": null, "description": ""}, {"name": "rows_affected", "type": null, "description": ""}, {"name": "res", "type": null, "description": ""}], "created_at": 1786034515.0992253, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.099819, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date_str", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1786034515.1012275, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partition start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date_str", "type": null, "description": ""}, {"name": "end_date_str", "type": null, "description": ""}, {"name": "in_fmt", "type": null, "description": ""}, {"name": "out_fmt", "type": null, "description": ""}], "created_at": 1786034515.1036577, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "raw_partition_date", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1786034515.105146, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1056082, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786034515.1062288, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786034515.1067138, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1786034515.1077359, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1786034515.108302, "supported_languages": null}, "macro.dbt.get_fixture_sql": {"name": "get_fixture_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_fixture_sql", "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%- set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%- set column_name_to_data_types = {} -%}\n{%- set column_name_to_quoted = {} -%}\n{%- for column in columns_in_relation -%}\n\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n{%- endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n{{ validate_fixture_rows(rows, row_number) }}\n\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%- set default_row_copy = default_row.copy() -%}\n{%- do default_row_copy.update(formatted_row) -%}\nselect\n{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n select\n {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%},{%- endif %}\n {%- endfor %}\n limit 0\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.safe_cast", "macro.dbt.validate_fixture_rows", "macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1786034515.1133468, "supported_languages": null}, "macro.dbt.get_expected_sql": {"name": "get_expected_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_expected_sql", "macro_sql": "{% macro get_expected_sql(rows, column_name_to_data_types, column_name_to_quoted) %}\n\n{%- if (rows | length) == 0 -%}\n select * from dbt_internal_unit_test_actual\n limit 0\n{%- else -%}\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\nselect\n{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n{%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}, {"name": "column_name_to_quoted", "type": null, "description": ""}], "created_at": 1786034515.1148612, "supported_languages": null}, "macro.dbt.format_row": {"name": "format_row", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.format_row", "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n {#-- generate case-insensitive formatted row --#}\n {% set formatted_row = {} %}\n {%- for column_name, column_value in row.items() -%}\n {% set column_name = column_name|lower %}\n\n {%- if column_name not in column_name_to_data_types %}\n {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n {{ exceptions.raise_compiler_error(\n \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n ) }}\n {%- endif -%}\n\n {%- set column_type = column_name_to_data_types[column_name] %}\n\n {#-- For string fixture values, strip varchar length to prevent silent truncation (GH-11974) --#}\n {%- if column_value is string and 'varying' in column_type -%}\n {%- set column_type = column_type.split('(')[0] -%}\n {%- endif -%}\n\n {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n {%- set column_value_clean = column_value -%}\n {%- if column_value is string -%}\n {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n {%- elif column_value is none -%}\n {%- set column_value_clean = 'null' -%}\n {%- endif -%}\n\n {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n {%- do formatted_row.update(row_update) -%}\n {%- endfor -%}\n {{ return(formatted_row) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.string_literal", "macro.dbt.escape_single_quotes", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "row", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1786034515.1173892, "supported_languages": null}, "macro.dbt.validate_fixture_rows": {"name": "validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.validate_fixture_rows", "macro_sql": "{%- macro validate_fixture_rows(rows, row_number) -%}\n {{ return(adapter.dispatch('validate_fixture_rows', 'dbt')(rows, row_number)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__validate_fixture_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1786034515.117842, "supported_languages": null}, "macro.dbt.default__validate_fixture_rows": {"name": "default__validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.default__validate_fixture_rows", "macro_sql": "{%- macro default__validate_fixture_rows(rows, row_number) -%}\n {# This is an abstract method for adapter overrides as needed #}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1786034515.1180465, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1786034515.1195571, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n {{ input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1786034515.1198943, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n\n {#\n We want to get the string of the returned relation by calling .render() in order to skip sample/empty\n mode rendering logic. However, people override the default ref macro, and often return a string instead\n of a relation (like the ref macro does by default). Thus, to make sure we dont blow things up, we have\n to ensure the resolved relation has a .render() method.\n #}\n {%- if resolved.render is defined and resolved.render is callable -%}\n {%- set resolved = resolved.render() -%}\n {%- endif -%}\n\n {%- if _ref.get('version') -%}\n {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n {%- endif -%}\n {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef ref(*args, **kwargs):\n refs = {{ ref_dict | tojson }}\n key = '.'.join(args)\n version = kwargs.get(\"v\") or kwargs.get(\"version\")\n if version:\n key += f\".v{version}\"\n dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786034515.1217744, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n {%- set source_dict = {} -%}\n {%- for _source in model.sources -%}\n {%- set resolved = source(*_source) -%}\n {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n sources = {{ source_dict | tojson }}\n key = '.'.join(args)\n return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786034515.122571, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n {%- for key, default in config_dbt_used -%}\n {# weird type testing with enum, would be much easier to write this logic in Python! #}\n {%- if key == \"language\" -%}\n {%- set value = \"python\" -%}\n {%- endif -%}\n {%- set value = model.config.get(key, default) -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\n {# Handle dbt.config.meta_get() calls - use separate dict to avoid overwriting native configs #}\n {%- set meta_dict = {} -%}\n {%- if model.config.meta_keys_used -%}\n {% set meta_dbt_used = zip(model.config.meta_keys_used, model.config.meta_keys_defaults) | list %}\n {%- for key, default in meta_dbt_used -%}\n {%- if model.config.meta and key in model.config.meta -%}\n {%- set value = model.config.meta[key] -%}\n {%- else -%}\n {%- set value = default -%}\n {%- endif -%}\n {%- do meta_dict.update({key: value}) -%}\n {%- endfor -%}\n {%- endif -%}\nconfig_dict = {{ config_dict }}\nmeta_dict = {{ meta_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786034515.1248553, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n def __init__(self, *args, **kwargs):\n pass\n\n @staticmethod\n def get(key, default=None):\n return config_dict.get(key, default)\n\n @staticmethod\n def meta_get(key, default=None):\n return meta_dict.get(key, default)\n\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = \"{{ this.database }}\"\n schema = \"{{ this.schema }}\"\n identifier = \"{{ this.identifier }}\"\n {% set this_relation_name = resolve_model_name(this) %}\n def __repr__(self):\n return '{{ this_relation_name }}'\n\n\nclass dbtObj:\n def __init__(self, load_df_function) -> None:\n self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n self.config = config\n self.this = this()\n self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786034515.1257992, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.125961, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.1267607, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if node is not none and node|attr('database') -%}\n {%- set catalog_relation = adapter.build_catalog_relation(node) -%}\n {%- if catalog_relation and catalog_relation|attr('catalog_database') -%}\n {{ return(catalog_relation.catalog_database) }}\n {%- endif -%}\n {%- endif -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.1278517, "supported_languages": null}, "macro.dbt.generate_latest_version_pointer_alias": {"name": "generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.generate_latest_version_pointer_alias", "macro_sql": "{% macro generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_latest_version_pointer_alias', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_latest_version_pointer_alias"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.128542, "supported_languages": null}, "macro.dbt.default__generate_latest_version_pointer_alias": {"name": "default__generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.default__generate_latest_version_pointer_alias", "macro_sql": "{% macro default__generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {%- if custom_alias_name -%}\n {{ custom_alias_name | trim }}\n {%- else -%}\n {{ node.name }}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.12901, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.1298447, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.1303728, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.131084, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.1318357, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name -%}\n\n {{ custom_alias_name | trim }}\n\n {%- elif node.version -%}\n\n {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n {%- else -%}\n\n {{ node.name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786034515.1325893, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1334722, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1338003, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1340926, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.134307, "supported_languages": null}, "macro.dbt.get_snapshot_get_time_data_type": {"name": "get_snapshot_get_time_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.get_snapshot_get_time_data_type", "macro_sql": "{% macro get_snapshot_get_time_data_type() %}\n {% set snapshot_time = adapter.dispatch('snapshot_get_time', 'dbt')() %}\n {% set time_data_type_sql = 'select ' ~ snapshot_time ~ ' as dbt_snapshot_time' %}\n {% set snapshot_time_column_schema = get_column_schema_from_query(time_data_type_sql) %}\n {% set time_data_type = snapshot_time_column_schema[0].dtype %}\n {{ return(time_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt_postgres.postgres__snapshot_get_time", "macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.135217, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1355677, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1357582, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.136092, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1364224, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1786034515.1373558, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1786034515.1376467, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1380043, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1389267, "supported_languages": null}, "macro.dbt.get_drop_index_sql": {"name": "get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_drop_index_sql", "macro_sql": "{% macro get_drop_index_sql(relation, index_name) -%}\n {{ adapter.dispatch('get_drop_index_sql', 'dbt')(relation, index_name) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1786034515.139303, "supported_languages": null}, "macro.dbt.default__get_drop_index_sql": {"name": "default__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_drop_index_sql", "macro_sql": "{% macro default__get_drop_index_sql(relation, index_name) -%}\n {{ exceptions.raise_compiler_error(\"`get_drop_index_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1786034515.1395838, "supported_languages": null}, "macro.dbt.get_show_indexes_sql": {"name": "get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_show_indexes_sql", "macro_sql": "{% macro get_show_indexes_sql(relation) -%}\n {{ adapter.dispatch('get_show_indexes_sql', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1399276, "supported_languages": null}, "macro.dbt.default__get_show_indexes_sql": {"name": "default__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_show_indexes_sql", "macro_sql": "{% macro default__get_show_indexes_sql(relation) -%}\n {{ exceptions.raise_compiler_error(\"`get_show_indexes_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1401894, "supported_languages": null}, "macro.dbt.get_catalog_relations": {"name": "get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_relations", "macro_sql": "{% macro get_catalog_relations(information_schema, relations) -%}\n {{ return(adapter.dispatch('get_catalog_relations', 'dbt')(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786034515.141863, "supported_languages": null}, "macro.dbt.default__get_catalog_relations": {"name": "default__get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_relations", "macro_sql": "{% macro default__get_catalog_relations(information_schema, relations) -%}\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog_relations not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786034515.1423855, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1786034515.1428084, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1786034515.1433198, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786034515.1437073, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786034515.1440334, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786034515.1443892, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786034515.1448934, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1786034515.1453032, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1786034515.1459217, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786034515.1463974, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786034515.1467414, "supported_languages": null}, "macro.dbt.list_function_relations_without_caching": {"name": "list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_function_relations_without_caching", "macro_sql": "{% macro list_function_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_function_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__list_function_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786034515.1471074, "supported_languages": null}, "macro.dbt.default__list_function_relations_without_caching": {"name": "default__list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_function_relations_without_caching", "macro_sql": "{% macro default__list_function_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_function_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786034515.1474206, "supported_languages": null}, "macro.dbt.get_catalog_for_single_relation": {"name": "get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_for_single_relation", "macro_sql": "{% macro get_catalog_for_single_relation(relation) %}\n {{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_catalog_for_single_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1478465, "supported_languages": null}, "macro.dbt.default__get_catalog_for_single_relation": {"name": "default__get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_for_single_relation", "macro_sql": "{% macro default__get_catalog_for_single_relation(relation) %}\n {{ exceptions.raise_not_implemented(\n 'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1481812, "supported_languages": null}, "macro.dbt.get_relations": {"name": "get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relations", "macro_sql": "{% macro get_relations() %}\n {{ return(adapter.dispatch('get_relations', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.148524, "supported_languages": null}, "macro.dbt.default__get_relations": {"name": "default__get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relations", "macro_sql": "{% macro default__get_relations() %}\n {{ exceptions.raise_not_implemented(\n 'get_relations macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1488543, "supported_languages": null}, "macro.dbt.get_relation_last_modified": {"name": "get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relation_last_modified", "macro_sql": "{% macro get_relation_last_modified(information_schema, relations) %}\n {{ return(adapter.dispatch('get_relation_last_modified', 'dbt')(information_schema, relations)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_relation_last_modified"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786034515.1492567, "supported_languages": null}, "macro.dbt.default__get_relation_last_modified": {"name": "default__get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relation_last_modified", "macro_sql": "{% macro default__get_relation_last_modified(information_schema, relations) %}\n {{ exceptions.raise_not_implemented(\n 'get_relation_last_modified macro not implemented for adapter ' + adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786034515.149606, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1517816, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1521034, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1786034515.1527328, "supported_languages": null}, "macro.dbt.get_list_of_column_names": {"name": "get_list_of_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_list_of_column_names", "macro_sql": "\n\n{%- macro get_list_of_column_names(columns) -%}\n {% set col_names = [] %}\n {% for col in columns %}\n {% do col_names.append(col.name) %}\n {% endfor %}\n {{ return(col_names) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.1533158, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1786034515.1537628, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n {%- if select_sql_header is not none -%}\n {{ select_sql_header }}\n {%- endif -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1786034515.1541681, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.1546357, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n {%- set col_err = [] -%}\n {%- set col_naked_numeric = [] -%}\n select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {%- do col_err.append(col['name']) -%}\n {#-- If this column's type is just 'numeric' then it is missing precision/scale, raise a warning --#}\n {%- elif col['data_type'].strip().lower() in ('numeric', 'decimal', 'number') -%}\n {%- do col_naked_numeric.append(col['name']) -%}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n {{ cast('null', col['data_type']) }} as {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n {%- if (col_err | length) > 0 -%}\n {{ exceptions.column_type_missing(column_names=col_err) }}\n {%- elif (col_naked_numeric | length) > 0 -%}\n {{ exceptions.warn(\"Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: \" ~ col_naked_numeric ~ \"`\") }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786034515.1569955, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n {% set columns = [] %}\n {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1786034515.1576989, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1786034515.158071, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n {{ get_empty_subquery_sql(select_sql) }}\n {% endcall %}\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1786034515.158762, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1786034515.1592083, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation.render() }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation.render() }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation.render() }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation.render() }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1786034515.160494, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1786034515.161023, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation.render() }}\n\n {% for column in add_columns %}\n add column {{ column.quoted }} {{ column.expanded_data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.quoted }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1786034515.1625922, "supported_languages": null}, "macro.dbt.is_core_v2": {"name": "is_core_v2", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/runtime.sql", "original_file_path": "macros/adapters/runtime.sql", "unique_id": "macro.dbt.is_core_v2", "macro_sql": "{% macro is_core_v2() -%}\n {%- set major_version = (dbt_version.split('.') | first) | int -%}\n {{ return(major_version == 2) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1631715, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1638014, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1641781, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1644979, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1648877, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1786034515.166337, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1786034515.1667266, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1786034515.1672745, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1786034515.167625, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1786034515.1681771, "supported_languages": null}, "macro.dbt.validate_doc_columns": {"name": "validate_doc_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.validate_doc_columns", "macro_sql": "{% macro validate_doc_columns(relation, column_dict, existing_column_names) %}\n {% set existing_lower = existing_column_names | map(\"lower\") | list %}\n {% set missing = [] %}\n {% set filtered = {} %}\n {% for col_name in column_dict %}\n {% set is_quoted = column_dict[col_name]['quote'] %}\n {% if is_quoted %}\n {% set present = col_name in existing_column_names %}\n {% else %}\n {% set present = col_name | lower in existing_lower %}\n {% endif %}\n {% if present %}\n {% do filtered.update({col_name: column_dict[col_name]}) %}\n {% else %}\n {% do missing.append(col_name) %}\n {% endif %}\n {% endfor %}\n {% if missing | length > 0 %}\n {{ exceptions.warn(\"In relation \" ~ relation.render() ~ \": The following columns are specified in the schema but are not present in the database: \" ~ missing | join(\", \")) }}\n {% endif %}\n {{ return(filtered) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}, {"name": "existing_column_names", "type": null, "description": ""}], "created_at": 1786034515.170325, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% set filtered_columns = validate_doc_columns(relation, model.columns, existing_columns) %}\n {% set alter_comment_sql = alter_column_comment(relation, filtered_columns) %}\n {% if alter_comment_sql and alter_comment_sql | trim | length > 0 %}\n {% do run_query(alter_comment_sql) %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.validate_doc_columns", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1786034515.1719792, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786034515.1728885, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786034515.1737149, "supported_languages": null}, "macro.dbt.collect_freshness_custom_sql": {"name": "collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness_custom_sql", "macro_sql": "{% macro collect_freshness_custom_sql(source, loaded_at_query) %}\n {{ return(adapter.dispatch('collect_freshness_custom_sql', 'dbt')(source, loaded_at_query))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness_custom_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1786034515.174136, "supported_languages": null}, "macro.dbt.default__collect_freshness_custom_sql": {"name": "default__collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness_custom_sql", "macro_sql": "{% macro default__collect_freshness_custom_sql(source, loaded_at_query) %}\n {% call statement('collect_freshness_custom_sql', fetch_result=True, auto_begin=False) -%}\n with source_query as (\n {{ loaded_at_query }}\n )\n select\n (select * from source_query) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n {% endcall %}\n {{ return(load_result('collect_freshness_custom_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1786034515.1747777, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1768622, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.177107, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1774378, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1777012, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "full_refresh_mode", "type": null, "description": ""}], "created_at": 1786034515.1783855, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1788826, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1791363, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786034515.1795833, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation.render() }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786034515.1800218, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786034515.1804698, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n {%- set quoted_grantees = [] -%}\n {%- for grantee in grantees -%}\n {%- do quoted_grantees.append(adapter.quote(grantee)) -%}\n {%- endfor -%}\n revoke {{ privilege }} on {{ relation.render() }} from {{ quoted_grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786034515.1812596, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1786034515.1817513, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1786034515.1831484, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1786034515.1835322, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1786034515.1840525, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1786034515.1845102, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation.render() ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1786034515.1869056, "supported_languages": null}, "macro.dbt.get_show_sql": {"name": "get_show_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_show_sql", "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header is not none -%}\n {{ sql_header }}\n {%- endif %}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "compiled_code", "type": null, "description": ""}, {"name": "sql_header", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786034515.1876812, "supported_languages": null}, "macro.dbt.get_limit_subquery_sql": {"name": "get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_limit_subquery_sql", "macro_sql": "\n{%- macro get_limit_subquery_sql(sql, limit) -%}\n {{ adapter.dispatch('get_limit_sql', 'dbt')(sql, limit) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_limit_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786034515.1880667, "supported_languages": null}, "macro.dbt.default__get_limit_sql": {"name": "default__get_limit_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.default__get_limit_sql", "macro_sql": "{% macro default__get_limit_sql(sql, limit) %}\n {{ sql }}\n {% if limit is not none %}\n limit {{ limit }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786034515.188451, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034515.1897612, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034515.1900995, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {#-- This ensures microbatch batches get unique temp relations to avoid clobbering --#}\n {% if suffix == '__dbt_tmp' and model.batch %}\n {% set suffix = suffix ~ '_' ~ model.batch.id %}\n {% endif %}\n\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034515.1908736, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034515.1914463, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034515.1919687, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786034515.1926086, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.192997, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation.render() }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1933684, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.193873, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.195063, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1955159, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.1958272, "supported_languages": null}, "macro.dbt.validate_sql": {"name": "validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.validate_sql", "macro_sql": "{% macro validate_sql(sql) -%}\n {{ return(adapter.dispatch('validate_sql', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__validate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.1963687, "supported_languages": null}, "macro.dbt.default__validate_sql": {"name": "default__validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.default__validate_sql", "macro_sql": "{% macro default__validate_sql(sql) -%}\n {% call statement('validate_sql') -%}\n explain {{ sql }}\n {% endcall %}\n {{ return(load_result('validate_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786034515.1968424, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1976807, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1981738, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.198798, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.1993723, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"name": "fill_staging_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.fill_staging_columns", "macro_sql": "{% macro fill_staging_columns(source_columns, staging_columns) %}\n\n{%- set source_column_names = source_columns|map(attribute='name')|map('lower')|list -%}\n{%- set using_source_casing = var('fivetran_using_source_casing', false) -%}\n\n{%- for column in staging_columns %}\n {%- if column.name|lower in source_column_names %}\n {%- if using_source_casing %}\n {%- set column_alias = column.alias if 'alias' in column else column.name %}\n {{ adapter.quote(column.name) }} as {{ adapter.quote(column_alias|upper if target.type == 'snowflake' else column_alias) }}\n {%- else %}\n {{ fivetran_utils.quote_column(column) }} as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}\n {%- else %}\n cast(null as {{ column.datatype }}) as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}{{ ',' if not loop.last }}\n{%- endfor %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "staging_columns", "type": null, "description": ""}], "created_at": 1786034515.2022748, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"name": "quote_column", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.quote_column", "macro_sql": "{% macro quote_column(column) %}\n {%- if 'quote' in column %}\n {%- if column.quote %}\n {%- if target.type in ('bigquery', 'spark', 'databricks') %}\n `{{ column.name }}`\n {%- elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {%- else %}\n \"{{ column.name }}\"\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1786034515.203369, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"name": "string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', 'fivetran_utils') (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786034515.2040527, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"name": "default__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786034515.204329, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"name": "snowflake__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786034515.2045975, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"name": "redshift__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786034515.2048917, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"name": "spark__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.spark__string_agg", "macro_sql": "{% macro spark__string_agg(field_to_agg, delimiter) %}\n -- collect set will remove duplicates\n replace(replace(replace(cast( collect_set({{ field_to_agg }}) as string), '[', ''), ']', ''), ', ', {{ delimiter }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786034515.2051842, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"name": "add_dbt_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "unique_id": "macro.fivetran_utils.add_dbt_source_relation", "macro_sql": "{% macro add_dbt_source_relation() %}\n\n{% if var('union_schemas', none) or var('union_databases', none) %}\n, _dbt_source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.205722, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"name": "remove_prefix_from_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "macro_sql": "{% macro remove_prefix_from_columns(columns, prefix='', exclude=[]) %}\n\n {%- for col in columns if col.name not in exclude -%}\n {%- if col.name[:prefix|length]|lower == prefix -%}\n {{ col.name }} as {{ col.name[prefix|length:] }}\n {%- else -%}\n {{ col.name }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}], "created_at": 1786034515.2070382, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"name": "pivot_json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "unique_id": "macro.fivetran_utils.pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n{%- if property is mapping -%}\nreplace( {{ fivetran_utils.json_extract(string, property.name) }}, '\"', '') as {{ property.alias if property.alias else property.name | replace(' ', '_') | replace('.', '_') | lower }}\n\n{%- else -%}\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- endif -%}\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "list_of_properties", "type": null, "description": ""}], "created_at": 1786034515.2085154, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"name": "max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786034515.2090764, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"name": "default__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786034515.2093, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"name": "snowflake__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786034515.2095144, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"name": "bigquery__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786034515.2097697, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"name": "dummy_coalesce_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "unique_id": "macro.fivetran_utils.dummy_coalesce_value", "macro_sql": "{% macro dummy_coalesce_value(column) %}\n\n{% set coalesce_value = {\n 'STRING': \"'DUMMY_STRING'\",\n 'BOOLEAN': 'null',\n 'INT': 999999999,\n 'FLOAT': 999999999.99,\n 'TIMESTAMP': 'cast(\"2099-12-31\" as timestamp)',\n 'DATE': 'cast(\"2099-12-31\" as date)',\n} %}\n\n{% if column.is_float() %}\n{{ return(coalesce_value['FLOAT']) }}\n\n{% elif column.is_numeric() %}\n{{ return(coalesce_value['INT']) }}\n\n{% elif column.is_string() %}\n{{ return(coalesce_value['STRING']) }}\n\n{% elif column.data_type|lower == 'boolean' %}\n{{ return(coalesce_value['BOOLEAN']) }}\n\n{% elif 'timestamp' in column.data_type|lower %}\n{{ return(coalesce_value['TIMESTAMP']) }}\n\n{% elif 'date' in column.data_type|lower %}\n{{ return(coalesce_value['DATE']) }}\n\n{% elif 'int' in column.data_type|lower %}\n{{ return(coalesce_value['INT']) }}\n\n{% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1786034515.212361, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"name": "source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.source_relation", "macro_sql": "{% macro source_relation(union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('source_relation', 'fivetran_utils') (union_schema_variable, union_database_variable) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786034515.2131262, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"name": "default__source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.default__source_relation", "macro_sql": "{% macro default__source_relation(union_schema_variable, union_database_variable) %}\n\n{% if var(union_schema_variable, none) %}\n, case\n {% for schema in var(union_schema_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%.{{ schema|lower }}.%' then '{{ schema|lower }}'\n {% endfor %}\n end as source_relation\n{% elif var(union_database_variable, none) %}\n, case\n {% for database in var(union_database_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%{{ database|lower }}.%' then '{{ database|lower }}'\n {% endfor %}\n end as source_relation\n{% else %}\n, cast('' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786034515.214307, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"name": "calculated_fields", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "unique_id": "macro.fivetran_utils.calculated_fields", "macro_sql": "{% macro calculated_fields(variable) -%}\n\n{% if var(variable, none) %}\n {% for field in var(variable) %}\n , {{ field.transform_sql }} as {{ field.name }} \n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}], "created_at": 1786034515.2150645, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"name": "enabled_vars_one_true", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "unique_id": "macro.fivetran_utils.enabled_vars_one_true", "macro_sql": "{% macro enabled_vars_one_true(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, False) == True %}\n {{ return(True) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(False) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1786034515.2158415, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"name": "try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.2168071, "supported_languages": null}, "macro.fivetran_utils.default__try_cast": {"name": "default__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.default__try_cast", "macro_sql": "{% macro default__try_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.2171037, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"name": "redshift__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.redshift__try_cast", "macro_sql": "{% macro redshift__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when trim({{field}}) ~ '^(0|[1-9][0-9]*)$' then trim({{field}})\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.2176788, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"name": "postgres__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.postgres__try_cast", "macro_sql": "{% macro postgres__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar)) ~ '^(0|[1-9][0-9]*)$' \n then replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar))\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.218375, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"name": "snowflake__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.2186525, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"name": "bigquery__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.218953, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"name": "spark__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.219224, "supported_languages": null}, "macro.fivetran_utils.sqlserver__try_cast": {"name": "sqlserver__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.sqlserver__try_cast", "macro_sql": "{% macro sqlserver__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786034515.2194877, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"name": "json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.2206414, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"name": "default__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.default__json_parse", "macro_sql": "{% macro default__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.221171, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"name": "redshift__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.redshift__json_parse", "macro_sql": "{% macro redshift__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.221692, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"name": "bigquery__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.bigquery__json_parse", "macro_sql": "{% macro bigquery__json_parse(string, string_path) %}\n\n \n json_extract_scalar({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.2222054, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"name": "postgres__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.postgres__json_parse", "macro_sql": "{% macro postgres__json_parse(string, string_path) %}\n\n {{string}}::json #>> '{ {%- for s in string_path -%}{{ s }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%} }'\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.222702, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"name": "snowflake__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.snowflake__json_parse", "macro_sql": "{% macro snowflake__json_parse(string, string_path) %}\n\n parse_json( {{string}} ) {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.2232542, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"name": "spark__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.spark__json_parse", "macro_sql": "{% macro spark__json_parse(string, string_path) %}\n\n {{string}} : {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.223829, "supported_languages": null}, "macro.fivetran_utils.sqlserver__json_parse": {"name": "sqlserver__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.sqlserver__json_parse", "macro_sql": "{% macro sqlserver__json_parse(string, string_path) %}\n\n json_value({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.2243266, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"name": "fill_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.fill_pass_through_columns", "macro_sql": "{% macro fill_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable) %}\n {% for field in var(pass_through_variable) %}\n {% if field is mapping %}\n {% if field.transform_sql %}\n , {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }}\n {% else %}\n , {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% else %}\n , {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}], "created_at": 1786034515.2257266, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n {%- set source_column_name = source_column_name if source_column_name is not none else '_dbt_source_relation' -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ aliases[loop.index0] if aliases else relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1786034515.2314494, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"name": "union_tables", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_tables", "macro_sql": "{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}\n\n {%- do exceptions.warn(\"Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. Use the `union_relations` macro instead\") -%}\n\n {{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tables", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1786034515.2322052, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"name": "ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1786034515.2327268, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"name": "default__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1786034515.2329535, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"name": "snowflake__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1786034515.2331648, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"name": "json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.233952, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"name": "default__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.234275, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"name": "snowflake__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.snowflake__json_extract", "macro_sql": "{% macro snowflake__json_extract(string, string_path) %}\n\n json_extract_path_text(try_parse_json( {{string}} ), {{ \"'\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.234598, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"name": "redshift__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.redshift__json_extract", "macro_sql": "{% macro redshift__json_extract(string, string_path) %}\n\n case when is_valid_json( {{string}} ) then json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} ) else null end\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.234983, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"name": "bigquery__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.2353046, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"name": "postgres__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786034515.235621, "supported_languages": null}, "macro.fivetran_utils.partition_by_source_relation": {"name": "partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.partition_by_source_relation", "macro_sql": "{% macro partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) %}\n {{ return(adapter.dispatch('partition_by_source_relation', 'fivetran_utils')(package_name, has_other_partitions, alias, package_prefix_union_variable)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__partition_by_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1786034515.2366333, "supported_languages": null}, "macro.fivetran_utils.default__partition_by_source_relation": {"name": "default__partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.default__partition_by_source_relation", "macro_sql": "{% macro default__partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) -%}\n\n{%- if package_prefix_union_variable %}\n {%- set union_schemas_var = package_name ~ '_union_schemas' -%}\n {%- set union_databases_var = package_name ~ '_union_databases' -%}\n{%- else %}\n {%- set union_schemas_var = 'union_schemas' -%}\n {%- set union_databases_var = 'union_databases' -%}\n{%- endif -%}\n\n{%- set is_unioning = var(union_schemas_var, [])|length > 1 or var(union_databases_var, [])|length > 1 or var(package_name ~ '_sources', [])|length > 1 -%}\n{%- set prefix = '' if alias is none else alias ~ '.' -%}\n\n{%- if has_other_partitions == 'no' -%}\n {{- 'partition by ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- else -%}\n {{- ', ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1786034515.2388291, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"name": "empty_variable_warning", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "unique_id": "macro.fivetran_utils.empty_variable_warning", "macro_sql": "{% macro empty_variable_warning(variable, downstream_model) %}\n\n{% if not var(variable) %}\n{{ log(\n \"\"\"\n Warning: You have passed an empty list to the \"\"\" ~ variable ~ \"\"\".\n As a result, you won't see the history of any columns in the \"\"\" ~ downstream_model ~ \"\"\" model.\n \"\"\",\n info=True\n) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}, {"name": "downstream_model", "type": null, "description": ""}], "created_at": 1786034515.2395856, "supported_languages": null}, "macro.fivetran_utils.wrap_in_quotes": {"name": "wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.wrap_in_quotes", "macro_sql": "{%- macro wrap_in_quotes(object_to_quote) -%}\n\n{{ return(adapter.dispatch('wrap_in_quotes', 'fivetran_utils')(object_to_quote)) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.postgres__wrap_in_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786034515.2402225, "supported_languages": null}, "macro.fivetran_utils.default__wrap_in_quotes": {"name": "default__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.default__wrap_in_quotes", "macro_sql": "{%- macro default__wrap_in_quotes(object_to_quote) -%}\n{# bigquery, spark, databricks #}\n `{{ object_to_quote }}`\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786034515.2404547, "supported_languages": null}, "macro.fivetran_utils.snowflake__wrap_in_quotes": {"name": "snowflake__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.snowflake__wrap_in_quotes", "macro_sql": "{%- macro snowflake__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote | upper }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786034515.2407103, "supported_languages": null}, "macro.fivetran_utils.redshift__wrap_in_quotes": {"name": "redshift__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.redshift__wrap_in_quotes", "macro_sql": "{%- macro redshift__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786034515.2409303, "supported_languages": null}, "macro.fivetran_utils.postgres__wrap_in_quotes": {"name": "postgres__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.postgres__wrap_in_quotes", "macro_sql": "{%- macro postgres__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786034515.2411437, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"name": "array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1786034515.2416291, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"name": "default__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1786034515.2418723, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"name": "redshift__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1786034515.2420862, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"name": "timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786034515.2428718, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"name": "default__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestampadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786034515.2432067, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"name": "bigquery__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestamp_add({{ from_timestamp }}, interval {{ interval }} {{ datepart }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786034515.2435305, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"name": "redshift__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_add", "macro_sql": "{% macro redshift__timestamp_add(datepart, interval, from_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786034515.2438817, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"name": "postgres__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786034515.2442064, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"name": "spark__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786034515.2446527, "supported_languages": null}, "macro.fivetran_utils.extract_url_parameter": {"name": "extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.extract_url_parameter", "macro_sql": "{% macro extract_url_parameter(field, url_parameter) -%}\n\n{{ adapter.dispatch('extract_url_parameter', 'fivetran_utils') (field, url_parameter) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786034515.24526, "supported_languages": null}, "macro.fivetran_utils.default__extract_url_parameter": {"name": "default__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.default__extract_url_parameter", "macro_sql": "{% macro default__extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786034515.2455606, "supported_languages": null}, "macro.fivetran_utils.spark__extract_url_parameter": {"name": "spark__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.spark__extract_url_parameter", "macro_sql": "{% macro spark__extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786034515.2459877, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"name": "add_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.add_pass_through_columns", "macro_sql": "{% macro add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_var", "type": null, "description": ""}], "created_at": 1786034515.2479925, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"name": "snowflake_seed_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "unique_id": "macro.fivetran_utils.snowflake_seed_data", "macro_sql": "{% macro snowflake_seed_data(seed_name) %}\n\n{% if target.type == 'snowflake' %}\n{{ return(ref(seed_name ~ '_snowflake')) }}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}], "created_at": 1786034515.24876, "supported_languages": null}, "macro.fivetran_utils.union_data": {"name": "union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.union_data", "macro_sql": "{%- macro union_data(table_identifier, database_variable, schema_variable, default_database, default_schema, default_variable, union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('union_data', 'fivetran_utils') (\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786034515.2509675, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"name": "default__union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.default__union_data", "macro_sql": "{%- macro default__union_data(\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) -%}\n\n{%- if var(union_schema_variable, none) -%}\n\n {%- set relations = [] -%}\n \n {%- if var(union_schema_variable) is string -%}\n {%- set trimmed = var(union_schema_variable)|trim('[')|trim(']') -%}\n {%- set schemas = trimmed.split(',')|map('trim',\" \")|map('trim','\"')|map('trim',\"'\") -%}\n {%- else -%}\n {%- set schemas = var(union_schema_variable) -%}\n {%- endif -%}\n\n {%- for schema in var(union_schema_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else var(database_variable, default_database),\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else schema,\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n \n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n \n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- elif var(union_database_variable, none) -%}\n\n {%- set relations = [] -%}\n\n {%- for database in var(union_database_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else database,\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else var(schema_variable, default_schema),\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n\n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- else -%}\n {% set exception_schemas = {\"linkedin_company_pages\": \"linkedin_pages\", \"instagram_business_pages\": \"instagram_business\"} %}\n {% set relation = namespace(value=\"\") %}\n {% if default_schema in exception_schemas.keys() %}\n {% for corrected_schema_name in exception_schemas.items() %} \n {% if default_schema in corrected_schema_name %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = corrected_schema_name[1] + \"_\" + table_identifier + \"_identifier\" %}\n {%- set relation.value=adapter.get_relation(\n database=source(corrected_schema_name[1], table_identifier).database,\n schema=source(corrected_schema_name[1], table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n {% endfor %}\n {% else %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifier\" %}\n {# Unfortunately the Twitter Organic identifiers were misspelled. As such, we will need to account for this in the model. This will be adjusted in the Twitter Organic package, but to ensure backwards compatibility, this needs to be included. #}\n {% if var(identifier_var, none) is none %} \n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifer\" %}\n {% endif %}\n {%- set relation.value=adapter.get_relation(\n database=source(default_schema, table_identifier).database,\n schema=source(default_schema, table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n{%- set table_exists=relation.value is not none -%}\n\n{%- if table_exists -%}\n select * \n from {{ relation.value }}\n{%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n{%- endif -%}\n{%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786034515.25992, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"name": "enabled_vars", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "unique_id": "macro.fivetran_utils.enabled_vars", "macro_sql": "{% macro enabled_vars(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, True) == False %}\n {{ return(False) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1786034515.2607675, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"name": "timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('timestamp_diff', 'fivetran_utils')(first_date, second_date, datepart) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.26217, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"name": "default__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.2625175, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"name": "redshift__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "macro_sql": "{% macro redshift__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.2628806, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"name": "bigquery__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_date, second_date, datepart) %}\n\n timestamp_diff(\n {{second_date}},\n {{first_date}},\n {{datepart}}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.2632105, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"name": "postgres__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "macro_sql": "{% macro postgres__timestamp_diff(first_date, second_date, datepart) %}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.266532, "supported_languages": null}, "macro.fivetran_utils.union_connections": {"name": "union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.union_connections", "macro_sql": "{% macro union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{{ adapter.dispatch('union_connections', 'fivetran_utils') (connection_dictionary, single_source_name, single_table_name, default_identifier) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_connections"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1786034515.2680438, "supported_languages": null}, "macro.fivetran_utils.default__union_connections": {"name": "default__union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.default__union_connections", "macro_sql": "{% macro default__union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{%- set exception_warning = \"\\n\\nPlease be aware: The \" ~ single_source_name|upper ~ \".\" ~ single_table_name|upper ~ \" table was not found in your schema(s). The Fivetran Data Model will create a completely empty staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_connections-source for details).\\n\"%}\n{%- set using_empty_table_warnings = (execute and not var('fivetran__remove_empty_table_warnings', false)) %}\n{%- set connections = var(connection_dictionary, []) %}\n{%- set using_unioning = connections | length > 0 %}\n{%- set identifier_var = single_source_name + \"_\" + single_table_name + \"_identifier\" %}\n\n{%- if using_unioning %}\n{# For unioning #}\n {%- set relations = [] -%}\n {%- for connection in connections -%}\n\n {% if var('has_defined_sources', false) %}\n {%- set database = source(connection.name, single_table_name).database %}\n {%- set schema = source(connection.name, single_table_name).schema %}\n {%- set identifier = source(connection.name, single_table_name).identifier %}\n {%- else %}\n {%- set database = connection.database if connection.database else target.database %}\n {%- set schema = connection.schema if connection.schema else single_source_name %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n {%- endif %}\n \n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n {%- if relation is not none -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- database: ' ~ database }}\n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {%- endfor -%}\n\n {%- if relations | length > 0 -%}\n {{ fivetran_utils.union_relations_custom(relations, source_column_name='_dbt_source_relation') }}\n\n {%- else -%}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n\n{% else %}\n{# Not unioning #}\n\n {%- set database = source(single_source_name, single_table_name).database %}\n {%- set schema = source(single_source_name, single_table_name).schema %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n\n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- full-identifier_var: ' ~ identifier_var }}\n {{ '-- database: ' ~ database }} \n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {% if relation is not none -%}\n select\n {{ dbt_utils.star(from=source(single_source_name, single_table_name)) }}\n from {{ source(single_source_name, single_table_name) }} as source_table\n\n {% else %}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n{% endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.union_relations_custom", "macro.dbt.type_string", "macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1786034515.2735727, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786034515.2745533, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n\n {%- set enabled_array = [] -%}\n {% for node in graph.sources.values() %}\n {% if node.identifier == source.identifier %}\n {% if (node.meta['is_enabled'] | default(true)) %}\n {%- do enabled_array.append(1) -%}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set is_enabled = (enabled_array != []) %}\n\n select\n {% if is_enabled %}\n max({{ loaded_at_field }})\n {% else %} \n {{ current_timestamp() }} {% endif %} as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n\n {% if is_enabled %}\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endif %}\n\n {% endcall %}\n\n {% if dbt_version.split('.') | map('int') | list >= [1, 5, 0] %}\n {{ return(load_result('collect_freshness')) }}\n {% else %}\n {{ return(load_result('collect_freshness').table) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786034515.276951, "supported_languages": null}, "macro.fivetran_utils.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) -%}\n\n{{ return(adapter.dispatch('fivetran_date_spine', 'fivetran_utils') (datepart, start_date, end_date)) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034515.2779658, "supported_languages": null}, "macro.fivetran_utils.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {{ dbt_utils.date_spine(datepart, start_date, end_date) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034515.2783396, "supported_languages": null}, "macro.fivetran_utils.sqlserver__fivetran_date_spine": {"name": "sqlserver__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.sqlserver__fivetran_date_spine", "macro_sql": "{% macro sqlserver__fivetran_date_spine(datepart, start_date, end_date) -%}\n\n {% set date_spine_query %}\n with\n\n l0 as (\n\n select c\n from (select 1 union all select 1) as d(c)\n\n ),\n l1 as (\n\n select\n 1 as c\n from l0 as a\n cross join l0 as b\n\n ),\n\n l2 as (\n\n select 1 as c\n from l1 as a\n cross join l1 as b\n ),\n\n l3 as (\n\n select 1 as c\n from l2 as a\n cross join l2 as b\n ),\n\n l4 as (\n\n select 1 as c\n from l3 as a\n cross join l3 as b\n ),\n\n l5 as (\n\n select 1 as c\n from l4 as a\n cross join l4 as b\n ),\n\n nums as (\n\n select row_number() over (order by (select null)) as rownum\n from l5\n ),\n\n rawdata as (\n\n select top ({{dbt.datediff(start_date, end_date, datepart)}}) rownum -1 as n\n from nums\n order by rownum\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n 'n',\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n order by 1\n\n {% endset %}\n\n {% set results = run_query(date_spine_query) %}\n\n {% if execute %}\n\n {% set results_list = results.columns[0].values() %}\n \n {% else %}\n\n {% set results_list = [] %}\n\n {% endif %}\n\n {%- for date_field in results_list %}\n select cast('{{ date_field }}' as date) as date_{{datepart}} {{ 'union all ' if not loop.last else '' }}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.dateadd", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034515.2799838, "supported_languages": null}, "macro.fivetran_utils.apply_source_relation": {"name": "apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.apply_source_relation", "macro_sql": "{% macro apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{{ adapter.dispatch('apply_source_relation', 'fivetran_utils') (package_name, use_package_prefix) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__apply_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1786034515.2808468, "supported_languages": null}, "macro.fivetran_utils.default__apply_source_relation": {"name": "default__apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.default__apply_source_relation", "macro_sql": "{% macro default__apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{% set sources_var = package_name ~ '_sources' %}\n{% set database_var = package_name ~ '_database' %}\n{% set schema_var = package_name ~ '_schema' %}\n\n{% if use_package_prefix %}\n {% set union_schemas_var = package_name ~ '_union_schemas' %}\n {% set union_databases_var = package_name ~ '_union_databases' %}\n{% else %}\n {% set union_schemas_var = 'union_schemas' %}\n {% set union_databases_var = 'union_databases' %}\n{% endif %}\n\n{% if var(sources_var, []) | length > 0 %}\n, _dbt_source_relation as source_relation\n{% elif var(union_schemas_var, []) | length > 0 or var(union_databases_var, []) | length > 0 %}\n{{ fivetran_utils.source_relation(union_schema_variable=union_schemas_var, union_database_variable=union_databases_var) }}\n{% else %}\n{% set database = var(database_var, target.database) %}\n{% set schema = var(schema_var, package_name) %}\n, cast('{{ database ~ \".\" ~ schema }}' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.source_relation", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1786034515.2830606, "supported_languages": null}, "macro.fivetran_utils.percentile": {"name": "percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', 'fivetran_utils') (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786034515.283898, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"name": "default__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.default__percentile", "macro_sql": "{% macro default__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786034515.2842395, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"name": "redshift__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.redshift__percentile", "macro_sql": "{% macro redshift__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786034515.284572, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"name": "bigquery__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.bigquery__percentile", "macro_sql": "{% macro bigquery__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786034515.2849288, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"name": "postgres__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.postgres__percentile", "macro_sql": "{% macro postgres__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n /* have to group by partition field */\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786034515.2853045, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"name": "spark__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.spark__percentile", "macro_sql": "{% macro spark__percentile(percentile_field, partition_field, percent) %}\n\n percentile( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786034515.28568, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"name": "seed_data_helper", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "unique_id": "macro.fivetran_utils.seed_data_helper", "macro_sql": "{% macro seed_data_helper(seed_name, warehouses) %}\n\n{% if target.type in warehouses %}\n {% for w in warehouses %}\n {% if target.type == w %}\n {{ return(ref(seed_name ~ \"_\" ~ w ~ \"\")) }}\n {% endif %}\n {% endfor %}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}, {"name": "warehouses", "type": null, "description": ""}], "created_at": 1786034515.286913, "supported_languages": null}, "macro.fivetran_utils.drop_schemas_automation": {"name": "drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.drop_schemas_automation", "macro_sql": "{% macro drop_schemas_automation(drop_target_schema=true) %}\n {{ return(adapter.dispatch('drop_schemas_automation', 'fivetran_utils')(drop_target_schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__drop_schemas_automation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1786034515.287768, "supported_languages": null}, "macro.fivetran_utils.default__drop_schemas_automation": {"name": "default__drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.default__drop_schemas_automation", "macro_sql": "{% macro default__drop_schemas_automation(drop_target_schema=true) %}\n\n{% set fetch_list_sql %}\n {% if target.type not in ('databricks', 'spark') %}\n select schema_name\n from \n {{ wrap_in_quotes(target.database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like '{{ target.schema | lower }}{%- if not drop_target_schema -%}_{%- endif -%}%'\n {% else %}\n SHOW SCHEMAS LIKE '{{ target.schema }}{%- if not drop_target_schema -%}_{%- endif -%}*'\n {% endif %}\n{% endset %}\n\n{% set results = run_query(fetch_list_sql) %}\n\n{% if execute %}\n {% set results_list = results.columns[0].values() %}\n{% else %}\n {% set results_list = [] %}\n{% endif %}\n\n{% for schema_to_drop in results_list %}\n {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema_to_drop)) %}\n {{ print('Schema ' ~ schema_to_drop ~ ' successfully dropped from the ' ~ target.database ~ ' database.\\n')}}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.wrap_in_quotes", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1786034515.2897627, "supported_languages": null}, "macro.fivetran_utils.union_relations_custom": {"name": "union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.union_relations_custom", "macro_sql": "{%- macro union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations_custom', 'fivetran_utils')(relations, aliases, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_relations_custom"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786034515.291923, "supported_languages": null}, "macro.fivetran_utils.default__union_relations_custom": {"name": "default__union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.default__union_relations_custom", "macro_sql": "\n\n{%- macro default__union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations_custom') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations_custom') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n {# dbt_utils union_relations includes the table in the source_relation. For Fivetran dbt package purposes the table should not be included in the source relation. #}\n cast({{ dbt.string_literal(relation.database ~ '.' ~ relation.schema) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n \n {# This alias is a change from dbt_utils union_relations code. Avoids errors if the table is named a reserved keyword #}\n from {{ aliases[loop.index0] if aliases else relation }} as unioned_relation_{{ loop.index }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786034515.2991164, "supported_languages": null}, "macro.fivetran_utils.first_value": {"name": "first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', 'fivetran_utils') (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1786034515.2999396, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"name": "default__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.default__first_value", "macro_sql": "{% macro default__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1786034515.3003685, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"name": "redshift__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.redshift__first_value", "macro_sql": "{% macro redshift__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} , {{ partition_field }} rows unbounded preceding )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1786034515.3008518, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"name": "persist_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable, identifier=none, transform='') %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}], "created_at": 1786034515.302083, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034515.3027544, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n dbt.replace(\n dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n {{ dbt.position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt.split_part(\n dbt.right(\n stripped_url,\n dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ dbt.safe_cast(\n parsed_path,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034515.3040273, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034515.3045995, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt.split_part(\n dbt.split_part(\n dbt.replace(\n dbt.replace(\n dbt.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786034515.3055096, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786034515.3061109, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786034515.3067553, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1786034515.3072834, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1786034515.3076844, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1786034515.3091667, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786034515.3096828, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786034515.3100383, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1786034515.310911, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786034515.3114104, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786034515.311757, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{% if not string %}\n{{ return('') }}\n{% endif %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}], "created_at": 1786034515.313222, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1786034515.3137856, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1786034515.314286, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3149312, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3160071, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.3165665, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786034515.3172543, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1786034515.318042, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {%- if execute -%}\n\n {% set r = load_result('get_query_result').table.columns[0].values() %}\n {% if r | length == 0 %}\n {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n {% set sql_result = default %}\n {% else %}\n {% set sql_result = r[0] %}\n {% endif %}\n \n {%- else -%}\n \n {% set sql_result = default %}\n \n {%- endif -%}\n\n {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1786034515.319617, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1786034515.3204224, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return([]) }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1786034515.3218935, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3228116, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3244648, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.325217, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3257868, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1786034515.3264372, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1786034515.3276072, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1786034515.3291395, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1786034515.330944, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.3318887, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.3330717, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034515.3335354, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by generated_number) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786034515.334263, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786034515.335636, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786034515.3386474, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers, unquote_aliases, rename)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1786034515.3403127, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- set rename_lower = {} -%}\r\n {%- for key, val in rename.items() -%}\r\n {%- do rename_lower.update({key.lower(): val}) -%}\r\n {%- endfor -%}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet\r\nor all columns were excluded. This star is only output during\r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif unquote_aliases %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- endif -%}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1786034515.3443563, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.345044, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3461688, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1786034515.347033, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1786034515.3480537, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1786034515.3484442, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.3490813, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.3493617, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.3496368, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n case table_type\n when 'MANAGED' then 'table'\n when 'BASE TABLE' then 'table'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.3499384, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1786034515.3504705, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1786034515.350771, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3522542, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.353023, "supported_languages": null}, "macro.dbt_utils.redshift__get_tables_by_pattern_sql": {"name": "redshift__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.redshift__get_tables_by_pattern_sql", "macro_sql": "{% macro redshift__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% set sql %}\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from \"{{ database }}\".\"information_schema\".\"tables\"\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n union all\n select distinct\n schemaname as {{ adapter.quote('table_schema') }},\n tablename as {{ adapter.quote('table_name') }},\n 'external' as {{ adapter.quote('table_type') }}\n from svv_external_tables\n where redshift_database_name = '{{ database }}'\n and schemaname ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n {% endset %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3544745, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3559074, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3569038, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786034515.3589497, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n cast({{ dbt.string_literal(relation.render()) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n /* No columns from any of the relations.\n This star is only output during dbt compile, and exists to keep SQLFluff happy. */\n {% if dbt_command == 'compile' and ordered_column_names|length == 0 %}\n *\n {% endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786034515.3658957, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3665888, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3670714, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3677814, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n {%- set default_null_value = \"\" -%}\n{%- else -%}\n {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n {%- do fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786034515.3690212, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.37008, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.3705125, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }} as tt\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.370876, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.3712626, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.3716013, "supported_languages": null}, "macro.dbt_utils.databricks__deduplicate": {"name": "databricks__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.databricks__deduplicate", "macro_sql": "\n{%- macro databricks__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.3719602, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786034515.3723032, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3732147, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.3751922, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "degrees", "type": null, "description": ""}], "created_at": 1786034515.3760402, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1786034515.3765864, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1786034515.3777351, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1786034515.379381, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034515.3802497, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034515.3810904, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034515.3814657, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786034515.3824985, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1786034515.3831239, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1786034515.3838122, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, quote_identifiers)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1786034515.385269, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n {%- set current_col_name = adapter.quote(col.column) if quote_identifiers else col.column -%}\n select\n {%- for exclude_col in exclude %}\n {{ adapter.quote(exclude_col) if quote_identifiers else exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ adapter.quote(field_name) if quote_identifiers else field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(current_col_name) }}\n {% else %}\n {{ current_col_name }}\n {% endif %}\n as {{ cast_to }}) as {{ adapter.quote(value_name) if quote_identifiers else value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1786034515.389044, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.3901238, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n select\n {{ select_gb_cols }}\n {{ column_name }},\n lag({{ column_name }}) over (\n {{partition_gb_cols}}\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.3919172, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns, exclude_columns, precision)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1786034515.3940828, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n\n{%- if compare_columns and exclude_columns -%}\n {{ exceptions.raise_compiler_error(\"Both a compare and an ignore list were provided to the `equality` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{# Ensure there are no extra columns in the compare_model vs model #}\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- do dbt_utils._is_ephemeral(compare_model, 'test_equality') -%}\n\n {%- set model_columns = adapter.get_columns_in_relation(model) -%}\n {%- set compare_model_columns = adapter.get_columns_in_relation(compare_model) -%}\n\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- set include_model_columns = [] %}\n {%- for column in model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n {%- for column in compare_model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_model_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns_set = set(include_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(include_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- else -%}\n {%- set compare_columns_set = set(model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(compare_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- endif -%}\n\n {% if compare_columns_set != compare_model_columns_set %}\n {{ exceptions.raise_compiler_error(compare_model ~\" has less columns than \" ~ model ~ \", please ensure they have the same columns or use the `compare_columns` or `exclude_columns` arguments to subset them.\") }}\n {% endif %}\n\n\n{% endif %}\n\n{%- if not precision -%}\n {%- if not compare_columns -%}\n {# \n You cannot get the columns in an ephemeral model (due to not existing in the information schema),\n so if the user does not provide an explicit list of columns we must error in the case it is ephemeral\n #}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model)-%}\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- for column in compare_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns = include_columns | map(attribute='quoted') %}\n {%- else -%} {# Compare columns provided #}\n {%- set compare_columns = compare_columns | map(attribute='quoted') %}\n {%- endif -%}\n {%- endif -%}\n\n {% set compare_cols_csv = compare_columns | join(', ') %}\n\n{% else %} {# Precision required #}\n {#-\n If rounding is required, we need to get the types, so it cannot be ephemeral even if they provide column names\n -#}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set columns = adapter.get_columns_in_relation(model) -%}\n\n {% set columns_list = [] %}\n {%- for col in columns -%}\n {%- if (\n (col.name|lower in compare_columns|map('lower') or not compare_columns) and\n (col.name|lower not in exclude_columns|map('lower') or not exclude_columns)\n ) -%}\n {# Databricks double type is not picked up by any number type checks in dbt #}\n {%- if col.is_float() or col.is_numeric() or col.data_type == 'double' -%}\n {# Cast is required due to postgres not having round for a double precision number #}\n {%- do columns_list.append('round(cast(' ~ col.quoted ~ ' as ' ~ dbt.type_numeric() ~ '),' ~ precision ~ ') as ' ~ col.quoted) -%}\n {%- else -%} {# Non-numeric type #}\n {%- do columns_list.append(col.quoted) -%}\n {%- endif -%}\n {% endif %}\n {%- endfor -%}\n\n {% set compare_cols_csv = columns_list | join(', ') %}\n\n{% endif %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_numeric", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1786034515.4018662, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4030204, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_a \n from {{ model }}\n {{groupby_gb_cols}}\n\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_b \n from {{ compare_model }}\n {{groupby_gb_cols}}\n\n),\nfinal as (\n\n select\n \n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n\n from a\n full join b\n on\n a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.405169, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1786034515.4059243, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n with\n \n all_values as (\n\n select \n\n\n {% if trim_whitespace == true -%}\n\n trim({{ column_name }}) as {{ column_name }}\n\n {%- else -%}\n\n {{ column_name }}\n\n {%- endif %}\n \n from {{ model }}\n\n ),\n\n errors as (\n\n select * from all_values\n where {{ column_name }} = ''\n\n )\n\n select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1786034515.4065218, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1786034515.407349, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% do column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1786034515.4085956, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786034515.4093251, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786034515.4100552, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1786034515.410979, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1786034515.411935, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1786034515.412843, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1786034515.4135108, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4142854, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4153118, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4163666, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set empty_invocation = flags.EMPTY is defined and flags.EMPTY %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n{%- if not empty_invocation %}\n or most_recent is null\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4183822, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4195046, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_our_model \n from {{ model }}\n {{ groupby_gb_cols }}\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_comparison_model \n from {{ compare_model }}\n {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n select\n\n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_our_model,\n count_comparison_model\n from a\n full join b on \n a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n {{ join_gb_cols }}\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4215345, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1786034515.4230769, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}, {{ upper_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions more cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1786034515.4261367, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1786034515.4269164, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1786034515.4276052, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1786034515.4284732, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1786034515.4292657, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.4301858, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n {% set pruned_cols = group_by_columns %}\n\n {% if column_name not in pruned_cols %}\n {% do pruned_cols.append(column_name) %}\n {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n with pruned_rows as (\n select\n {{ select_pruned_cols }}\n from {{ model }}\n {% if group_by_columns|length() == 0 %}\n where {{ column_name }} is not null\n limit 1\n {% endif %}\n )\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count({{ column_name }}) as filler_column\n\n from pruned_rows\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.432032, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.43291, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n select\n {{select_gb_cols}}\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as {{ dbt.type_numeric() }}) as not_null_proportion\n from {{ model }}\n {{groupby_gb_cols}}\n),\nvalidation_errors as (\n select\n {{select_gb_cols}}\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786034515.434571, "supported_languages": null}, "macro.hubspot.hubspot_lookback": {"name": "hubspot_lookback", "resource_type": "macro", "package_name": "hubspot", "path": "macros/hubspot_lookback.sql", "original_file_path": "macros/hubspot_lookback.sql", "unique_id": "macro.hubspot.hubspot_lookback", "macro_sql": "{% macro hubspot_lookback(from_date, datepart, interval, safety_date='2010-01-01') %}\n\n{{ adapter.dispatch('hubspot_lookback', 'hubspot') (from_date, datepart, interval, safety_date=safety_date) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.hubspot.default__hubspot_lookback"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "safety_date", "type": null, "description": ""}], "created_at": 1786034515.4353688, "supported_languages": null}, "macro.hubspot.default__hubspot_lookback": {"name": "default__hubspot_lookback", "resource_type": "macro", "package_name": "hubspot", "path": "macros/hubspot_lookback.sql", "original_file_path": "macros/hubspot_lookback.sql", "unique_id": "macro.hubspot.default__hubspot_lookback", "macro_sql": "{% macro default__hubspot_lookback(from_date, datepart, interval, safety_date='2010-01-01') %}\n\n {% set sql_statement %}\n select coalesce({{ from_date }}, {{ \"'\" ~ safety_date ~ \"'\" }})\n from {{ this }}\n {%- endset -%}\n\n {%- set result = dbt_utils.get_single_value(sql_statement) %}\n\n {{ dbt.dateadd(datepart=datepart, interval=-interval, from_date_or_timestamp=\"cast('\" ~ result ~ \"' as date)\") }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_single_value", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "safety_date", "type": null, "description": ""}], "created_at": 1786034515.4362574, "supported_languages": null}, "macro.hubspot.merge_contacts": {"name": "merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.merge_contacts", "macro_sql": "{% macro merge_contacts() -%}\n\n{{ adapter.dispatch('merge_contacts', 'hubspot') () }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.hubspot.postgres__merge_contacts"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4369102, "supported_languages": null}, "macro.hubspot.default__merge_contacts": {"name": "default__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.default__merge_contacts", "macro_sql": "{% macro default__merge_contacts() %}\n{# bigquery #}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n\n from contacts\n cross join \n unnest(cast(split(merged_object_ids, \";\") as array)) as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4371173, "supported_languages": null}, "macro.hubspot.snowflake__merge_contacts": {"name": "snowflake__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.snowflake__merge_contacts", "macro_sql": "{% macro snowflake__merge_contacts() %}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges.value as vid_to_merge\n \n from contacts\n cross join \n table(flatten(STRTOK_TO_ARRAY(merged_object_ids, ';'))) as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.437297, "supported_languages": null}, "macro.hubspot.redshift__merge_contacts": {"name": "redshift__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.redshift__merge_contacts", "macro_sql": "{% macro redshift__merge_contacts() %}\n\tselect\n unnest_vid_array.source_relation,\n unnest_vid_array.contact_id,\n cast(vid_to_merge as {{ dbt.type_string() }}) as vid_to_merge\n from (\n select \n contacts.source_relation,\n contacts.contact_id,\n split_to_array(merged_object_ids, ';') as super_merged_object_ids\n from contacts\n ) as unnest_vid_array, unnest_vid_array.super_merged_object_ids as vid_to_merge\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4375696, "supported_languages": null}, "macro.hubspot.postgres__merge_contacts": {"name": "postgres__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.postgres__merge_contacts", "macro_sql": "{% macro postgres__merge_contacts() %}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n\n from contacts\n cross join \n unnest(string_to_array(merged_object_ids, ';')) as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4377716, "supported_languages": null}, "macro.hubspot.spark__merge_contacts": {"name": "spark__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.spark__merge_contacts", "macro_sql": "{% macro spark__merge_contacts() %}\n{# databricks and spark #}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n from contacts\n lateral view explode(split(merged_object_ids, ';')) merges_view as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4379766, "supported_languages": null}, "macro.hubspot.engagements_joined": {"name": "engagements_joined", "resource_type": "macro", "package_name": "hubspot", "path": "macros/engagements_joined.sql", "original_file_path": "macros/engagements_joined.sql", "unique_id": "macro.hubspot.engagements_joined", "macro_sql": "{% macro engagements_joined(base_model) %}\n\nwith base as (\n\n select *\n from {{ base_model }}\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), joined as (\n\n select\n {{ dbt_utils.star(from=base_model, relation_alias=\"base\", except=[\"_fivetran_deleted\"]) }},\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %} engagements.contact_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %} engagements.deal_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %} engagements.company_ids, {% endif %}\n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.fivetran_utils.enabled_vars"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_model", "type": null, "description": ""}], "created_at": 1786034515.4393122, "supported_languages": null}, "macro.hubspot.is_incremental_compatible": {"name": "is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.is_incremental_compatible", "macro_sql": "{% macro is_incremental_compatible() -%}\n {{ return(adapter.dispatch('is_incremental_compatible', 'hubspot') ()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.hubspot.postgres__is_incremental_compatible"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.440067, "supported_languages": null}, "macro.hubspot.default__is_incremental_compatible": {"name": "default__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.default__is_incremental_compatible", "macro_sql": "{% macro default__is_incremental_compatible() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.440305, "supported_languages": null}, "macro.hubspot.bigquery__is_incremental_compatible": {"name": "bigquery__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.bigquery__is_incremental_compatible", "macro_sql": "{% macro bigquery__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.440537, "supported_languages": null}, "macro.hubspot.snowflake__is_incremental_compatible": {"name": "snowflake__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.snowflake__is_incremental_compatible", "macro_sql": "{% macro snowflake__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4407997, "supported_languages": null}, "macro.hubspot.postgres__is_incremental_compatible": {"name": "postgres__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.postgres__is_incremental_compatible", "macro_sql": "{% macro postgres__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.441132, "supported_languages": null}, "macro.hubspot.redshift__is_incremental_compatible": {"name": "redshift__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.redshift__is_incremental_compatible", "macro_sql": "{% macro redshift__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4413702, "supported_languages": null}, "macro.hubspot.databricks__is_incremental_compatible": {"name": "databricks__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.databricks__is_incremental_compatible", "macro_sql": "{% macro databricks__is_incremental_compatible() %}\n {% set re = modules.re %}\n {% set path_match = target.http_path %}\n {% set regex_pattern = \"sql/protocol\" %}\n {% set match_result = re.search(regex_pattern, path_match) %}\n {% if match_result %}\n {{ return(True) }}\n {% else %}\n {{ return(False) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4422526, "supported_languages": null}, "macro.hubspot.engagements_aggregated": {"name": "engagements_aggregated", "resource_type": "macro", "package_name": "hubspot", "path": "macros/engagements_aggregated.sql", "original_file_path": "macros/engagements_aggregated.sql", "unique_id": "macro.hubspot.engagements_aggregated", "macro_sql": "{% macro engagements_aggregated(from_ref, primary_key) %}\n\n select\n source_relation,\n {{ primary_key }},\n count(case when engagement_type = 'NOTE' then {{ primary_key }} end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then {{ primary_key }} end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then {{ primary_key }} end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then {{ primary_key }} end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then {{ primary_key }} end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then {{ primary_key }} end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then {{ primary_key }} end) as count_engagement_forwarded_emails\n from {{ from_ref }}\n group by 1,2\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_ref", "type": null, "description": ""}, {"name": "primary_key", "type": null, "description": ""}], "created_at": 1786034515.4431689, "supported_languages": null}, "macro.hubspot.engagement_metrics": {"name": "engagement_metrics", "resource_type": "macro", "package_name": "hubspot", "path": "macros/engagements_aggregated.sql", "original_file_path": "macros/engagements_aggregated.sql", "unique_id": "macro.hubspot.engagement_metrics", "macro_sql": "{% macro engagement_metrics() %}\n\n{% set metrics = [\n 'count_engagement_notes',\n 'count_engagement_tasks',\n 'count_engagement_calls',\n 'count_engagement_meetings',\n 'count_engagement_emails',\n 'count_engagement_incoming_emails',\n 'count_engagement_forwarded_emails'\n] %}\n\n{{ return(metrics) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4437075, "supported_languages": null}, "macro.hubspot.adjust_email_metrics": {"name": "adjust_email_metrics", "resource_type": "macro", "package_name": "hubspot", "path": "macros/adjust_email_metrics.sql", "original_file_path": "macros/adjust_email_metrics.sql", "unique_id": "macro.hubspot.adjust_email_metrics", "macro_sql": "{% macro adjust_email_metrics(base_ref, var_name) %}\n\n{% set base_cols = dbt_utils.get_filtered_columns_in_relation(ref(base_ref))|map('lower') %}\n\n{% set default_metrics = ['bounces', 'clicks', 'deferrals', 'deliveries', 'drops', 'forwards', 'opens', 'prints', 'spam_reports', 'unsubscribes'] %}\n{% set email_metrics = var(var_name, default_metrics)|map('lower') %}\n\n{# Only keep metrics found in the base ref #}\n{% set adjusted_cols = email_metrics|select('in', base_cols)|list %}\n\n{{ return(adjusted_cols) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_ref", "type": null, "description": ""}, {"name": "var_name", "type": null, "description": ""}], "created_at": 1786034515.4451551, "supported_languages": null}, "macro.hubspot.email_events_joined": {"name": "email_events_joined", "resource_type": "macro", "package_name": "hubspot", "path": "macros/email_events_joined.sql", "original_file_path": "macros/email_events_joined.sql", "unique_id": "macro.hubspot.email_events_joined", "macro_sql": "{% macro email_events_joined(base_model) %}\n\nwith base as (\n\n select *\n from {{ base_model }}\n\n), events as (\n\n select *\n from {{ ref('stg_hubspot__email_event') }}\n\n{% if var('hubspot_contact_enabled', true) %}\n), contacts as (\n\n select *\n from {{ ref('int_hubspot__contact_merge_adjust') }} \n{% endif %}\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n{% if var('hubspot_contact_enabled', true) %}\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n{% else %}\n)\n\nselect *\nfrom events_joined\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_model", "type": null, "description": ""}], "created_at": 1786034515.4462495, "supported_languages": null}, "macro.hubspot.get_engagement_note_columns": {"name": "get_engagement_note_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_note_columns.sql", "original_file_path": "macros/staging/get_engagement_note_columns.sql", "unique_id": "macro.hubspot.get_engagement_note_columns", "macro_sql": "{% macro get_engagement_note_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"body\", \"datatype\": dbt.type_string(), \"alias\": \"note\"},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4486275, "supported_languages": null}, "macro.hubspot.get_email_event_click_columns": {"name": "get_email_event_click_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_click_columns.sql", "original_file_path": "macros/staging/get_email_event_click_columns.sql", "unique_id": "macro.hubspot.get_email_event_click_columns", "macro_sql": "{% macro get_email_event_click_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"referer\", \"datatype\": dbt.type_string()},\n {\"name\": \"url\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4504702, "supported_languages": null}, "macro.hubspot.get_email_event_open_columns": {"name": "get_email_event_open_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_open_columns.sql", "original_file_path": "macros/staging/get_email_event_open_columns.sql", "unique_id": "macro.hubspot.get_email_event_open_columns", "macro_sql": "{% macro get_email_event_open_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"duration\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.452112, "supported_languages": null}, "macro.hubspot.get_company_list_member_columns": {"name": "get_company_list_member_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_list_member_columns.sql", "original_file_path": "macros/staging/get_company_list_member_columns.sql", "unique_id": "macro.hubspot.get_company_list_member_columns", "macro_sql": "{% macro get_company_list_member_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"added_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"company_list_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4533706, "supported_languages": null}, "macro.hubspot.get_marketing_event_participant_columns": {"name": "get_marketing_event_participant_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_participant_columns.sql", "original_file_path": "macros/staging/get_marketing_event_participant_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_participant_columns", "macro_sql": "{% macro get_marketing_event_participant_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"marketing_event_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"properties_occurred_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"properties_attendance_percentage\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"properties_attendance_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"properties_attendance_duration_seconds\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.455346, "supported_languages": null}, "macro.hubspot.get_deal_pipeline_columns": {"name": "get_deal_pipeline_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_pipeline_columns.sql", "original_file_path": "macros/staging/get_deal_pipeline_columns.sql", "unique_id": "macro.hubspot.get_deal_pipeline_columns", "macro_sql": "{% macro get_deal_pipeline_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.457111, "supported_languages": null}, "macro.hubspot.get_engagement_contact_columns": {"name": "get_engagement_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_contact_columns.sql", "original_file_path": "macros/staging/get_engagement_contact_columns.sql", "unique_id": "macro.hubspot.get_engagement_contact_columns", "macro_sql": "{% macro get_engagement_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4582477, "supported_languages": null}, "macro.hubspot.get_email_event_spam_report_columns": {"name": "get_email_event_spam_report_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_spam_report_columns.sql", "original_file_path": "macros/staging/get_email_event_spam_report_columns.sql", "unique_id": "macro.hubspot.get_email_event_spam_report_columns", "macro_sql": "{% macro get_email_event_spam_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.459365, "supported_languages": null}, "macro.hubspot.get_ticket_engagement_columns": {"name": "get_ticket_engagement_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_engagement_columns.sql", "original_file_path": "macros/staging/get_ticket_engagement_columns.sql", "unique_id": "macro.hubspot.get_ticket_engagement_columns", "macro_sql": "{% macro get_ticket_engagement_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4605842, "supported_languages": null}, "macro.hubspot.get_role_columns": {"name": "get_role_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_role_columns.sql", "original_file_path": "macros/staging/get_role_columns.sql", "unique_id": "macro.hubspot.get_role_columns", "macro_sql": "{% macro get_role_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"requires_billing_write\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4619088, "supported_languages": null}, "macro.hubspot.get_company_columns": {"name": "get_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_columns.sql", "original_file_path": "macros/staging/get_company_columns.sql", "unique_id": "macro.hubspot.get_company_columns", "macro_sql": "{% macro get_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"company_id\"},\n {\"name\": \"is_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"is_company_deleted\"},\n {\"name\": \"property_name\", \"datatype\": dbt.type_string(), \"alias\": \"company_name\"},\n {\"name\": \"property_description\", \"datatype\": dbt.type_string(), \"alias\": \"description\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"},\n {\"name\": \"property_industry\", \"datatype\": dbt.type_string(), \"alias\": \"industry\"},\n {\"name\": \"property_address\", \"datatype\": dbt.type_string(), \"alias\": \"street_address\"},\n {\"name\": \"property_address_2\", \"datatype\": dbt.type_string(), \"alias\": \"street_address_2\"},\n {\"name\": \"property_city\", \"datatype\": dbt.type_string(), \"alias\": \"city\"},\n {\"name\": \"property_state\", \"datatype\": dbt.type_string(), \"alias\": \"state\"},\n {\"name\": \"property_country\", \"datatype\": dbt.type_string(), \"alias\": \"country\"},\n {\"name\": \"property_annualrevenue\", \"datatype\": dbt.type_int(), \"alias\": \"company_annual_revenue\"}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__company_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.465638, "supported_languages": null}, "macro.hubspot.get_email_event_forward_columns": {"name": "get_email_event_forward_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_forward_columns.sql", "original_file_path": "macros/staging/get_email_event_forward_columns.sql", "unique_id": "macro.hubspot.get_email_event_forward_columns", "macro_sql": "{% macro get_email_event_forward_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4671347, "supported_languages": null}, "macro.hubspot.get_email_event_bounce_columns": {"name": "get_email_event_bounce_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_bounce_columns.sql", "original_file_path": "macros/staging/get_email_event_bounce_columns.sql", "unique_id": "macro.hubspot.get_email_event_bounce_columns", "macro_sql": "{% macro get_email_event_bounce_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"response\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.46844, "supported_languages": null}, "macro.hubspot.get_conversation_message_recipient_columns": {"name": "get_conversation_message_recipient_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_message_recipient_columns.sql", "original_file_path": "macros/staging/get_conversation_message_recipient_columns.sql", "unique_id": "macro.hubspot.get_conversation_message_recipient_columns", "macro_sql": "{% macro get_conversation_message_recipient_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"actor_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"message_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"thread_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"recipient_field\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4705226, "supported_languages": null}, "macro.hubspot.get_conversation_inbox_columns": {"name": "get_conversation_inbox_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_inbox_columns.sql", "original_file_path": "macros/staging/get_conversation_inbox_columns.sql", "unique_id": "macro.hubspot.get_conversation_inbox_columns", "macro_sql": "{% macro get_conversation_inbox_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.472347, "supported_languages": null}, "macro.hubspot.get_email_event_dropped_columns": {"name": "get_email_event_dropped_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_dropped_columns.sql", "original_file_path": "macros/staging/get_email_event_dropped_columns.sql", "unique_id": "macro.hubspot.get_email_event_dropped_columns", "macro_sql": "{% macro get_email_event_dropped_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bcc\", \"datatype\": dbt.type_string()},\n {\"name\": \"cc\", \"datatype\": dbt.type_string()},\n {\"name\": \"drop_message\", \"datatype\": dbt.type_string()},\n {\"name\": \"drop_reason\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"reply_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) %}\n {{ columns.append({\"name\": \"FROM\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% else %}\n {{ columns.append({\"name\": \"from\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4752264, "supported_languages": null}, "macro.hubspot.get_engagement_deal_columns": {"name": "get_engagement_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_deal_columns.sql", "original_file_path": "macros/staging/get_engagement_deal_columns.sql", "unique_id": "macro.hubspot.get_engagement_deal_columns", "macro_sql": "{% macro get_engagement_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.476351, "supported_languages": null}, "macro.hubspot.get_ticket_columns": {"name": "get_ticket_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_columns.sql", "original_file_path": "macros/staging/get_ticket_columns.sql", "unique_id": "macro.hubspot.get_ticket_columns", "macro_sql": "{% macro get_ticket_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"ticket_id\"},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"_fivetran_ticket_deleted\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\", \"alias\": \"is_ticket_deleted\"},\n {\"name\": \"property_closed_date\", \"datatype\": dbt.type_timestamp(), \"alias\": \"closed_date\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"},\n {\"name\": \"property_first_agent_reply_date\", \"datatype\": dbt.type_timestamp(), \"alias\": \"first_agent_reply_at\"},\n {\"name\": \"property_hs_pipeline\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_pipeline_id\"},\n {\"name\": \"property_hs_pipeline_stage\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_pipeline_stage_id\"},\n {\"name\": \"property_hs_ticket_category\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_category\"},\n {\"name\": \"property_hs_ticket_priority\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_priority\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_subject\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_subject\"},\n {\"name\": \"property_content\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_content\"} \n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__ticket_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4802523, "supported_languages": null}, "macro.hubspot.get_email_event_delivered_columns": {"name": "get_email_event_delivered_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_delivered_columns.sql", "original_file_path": "macros/staging/get_email_event_delivered_columns.sql", "unique_id": "macro.hubspot.get_email_event_delivered_columns", "macro_sql": "{% macro get_email_event_delivered_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"response\", \"datatype\": dbt.type_string()},\n {\"name\": \"smtp_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4813921, "supported_languages": null}, "macro.hubspot.get_engagement_company_columns": {"name": "get_engagement_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_company_columns.sql", "original_file_path": "macros/staging/get_engagement_company_columns.sql", "unique_id": "macro.hubspot.get_engagement_company_columns", "macro_sql": "{% macro get_engagement_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.482542, "supported_languages": null}, "macro.hubspot.get_property_columns": {"name": "get_property_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_property_columns.sql", "original_file_path": "macros/staging/get_property_columns.sql", "unique_id": "macro.hubspot.get_property_columns", "macro_sql": "{% macro get_property_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"calculated\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"field_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"hubspot_defined\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"hubspot_object\", \"datatype\": dbt.type_string()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"show_currency_symbol\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4853814, "supported_languages": null}, "macro.hubspot.get_ticket_contact_columns": {"name": "get_ticket_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_contact_columns.sql", "original_file_path": "macros/staging/get_ticket_contact_columns.sql", "unique_id": "macro.hubspot.get_ticket_contact_columns", "macro_sql": "{% macro get_ticket_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4865005, "supported_languages": null}, "macro.hubspot.get_email_event_print_columns": {"name": "get_email_event_print_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_print_columns.sql", "original_file_path": "macros/staging/get_email_event_print_columns.sql", "unique_id": "macro.hubspot.get_email_event_print_columns", "macro_sql": "{% macro get_email_event_print_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4879885, "supported_languages": null}, "macro.hubspot.get_contact_columns": {"name": "get_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_columns.sql", "original_file_path": "macros/staging/get_contact_columns.sql", "unique_id": "macro.hubspot.get_contact_columns", "macro_sql": "{% macro get_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"is_contact_deleted\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"contact_id\"},\n {\"name\": \"property_hs_merged_object_ids\", \"datatype\": dbt.type_string(), \"alias\": \"merged_object_ids\"},\n {\"name\": \"property_email\", \"datatype\": dbt.type_string(), \"alias\": \"email\"},\n {\"name\": \"property_company\", \"datatype\": dbt.type_string(), \"alias\": \"contact_company\"},\n {\"name\": \"property_firstname\", \"datatype\": dbt.type_string(), \"alias\": \"first_name\"},\n {\"name\": \"property_lastname\", \"datatype\": dbt.type_string(), \"alias\": \"last_name\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"},\n {\"name\": \"property_jobtitle\", \"datatype\": dbt.type_string(), \"alias\": \"job_title\"},\n {\"name\": \"property_annualrevenue\", \"datatype\": dbt.type_int(), \"alias\": \"company_annual_revenue\"}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__contact_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_boolean", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4910676, "supported_languages": null}, "macro.hubspot.get_contact_merge_audit_columns": {"name": "get_contact_merge_audit_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_merge_audit_columns.sql", "original_file_path": "macros/staging/get_contact_merge_audit_columns.sql", "unique_id": "macro.hubspot.get_contact_merge_audit_columns", "macro_sql": "{% macro get_contact_merge_audit_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"canonical_vid\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"entity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"num_properties_moved\", \"datatype\": dbt.type_int()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"vid_to_merge\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4932082, "supported_languages": null}, "macro.hubspot.get_email_event_columns": {"name": "get_email_event_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_columns.sql", "original_file_path": "macros/staging/get_email_event_columns.sql", "unique_id": "macro.hubspot.get_email_event_columns", "macro_sql": "{% macro get_email_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"app_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"caused_by_created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"caused_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email_campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"filtered_event\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"obsoleted_by_created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"obsoleted_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"recipient\", \"datatype\": dbt.type_string()},\n {\"name\": \"sent_by_created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"sent_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.496158, "supported_languages": null}, "macro.hubspot.get_deal_stage_columns": {"name": "get_deal_stage_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_stage_columns.sql", "original_file_path": "macros/staging/get_deal_stage_columns.sql", "unique_id": "macro.hubspot.get_deal_stage_columns", "macro_sql": "{% macro get_deal_stage_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"date_entered\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4980948, "supported_languages": null}, "macro.hubspot.get_conversation_channel_columns": {"name": "get_conversation_channel_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_channel_columns.sql", "original_file_path": "macros/staging/get_conversation_channel_columns.sql", "unique_id": "macro.hubspot.get_conversation_channel_columns", "macro_sql": "{% macro get_conversation_channel_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.4992058, "supported_languages": null}, "macro.hubspot.get_deal_pipeline_stage_columns": {"name": "get_deal_pipeline_stage_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_pipeline_stage_columns.sql", "original_file_path": "macros/staging/get_deal_pipeline_stage_columns.sql", "unique_id": "macro.hubspot.get_deal_pipeline_stage_columns", "macro_sql": "{% macro get_deal_pipeline_stage_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"closed_won\", \"datatype\": \"boolean\"},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"probability\", \"datatype\": dbt.type_float()},\n {\"name\": \"stage_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5015569, "supported_languages": null}, "macro.hubspot.get_conversation_actor_columns": {"name": "get_conversation_actor_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_actor_columns.sql", "original_file_path": "macros/staging/get_conversation_actor_columns.sql", "unique_id": "macro.hubspot.get_conversation_actor_columns", "macro_sql": "{% macro get_conversation_actor_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"avatar\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5030165, "supported_languages": null}, "macro.hubspot.get_company_list_columns": {"name": "get_company_list_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_list_columns.sql", "original_file_path": "macros/staging/get_company_list_columns.sql", "unique_id": "macro.hubspot.get_company_list_columns", "macro_sql": "{% macro get_company_list_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\", \"alias\": \"is_company_list_deleted\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"company_list_id\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string(), \"alias\": \"company_list_name\"},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"filters_updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_version\", \"datatype\": dbt.type_int()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__company_list_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.506017, "supported_languages": null}, "macro.hubspot.get_ticket_property_history_columns": {"name": "get_ticket_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_property_history_columns.sql", "original_file_path": "macros/staging/get_ticket_property_history_columns.sql", "unique_id": "macro.hubspot.get_ticket_property_history_columns", "macro_sql": "{% macro get_ticket_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string(), \"alias\": \"field_name\"},\n {\"name\": \"source\", \"datatype\": dbt.type_string(), \"alias\": \"change_source\"},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string(), \"alias\": \"change_source_id\"},\n {\"name\": \"timestamp_instant\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string(), \"alias\": \"new_value\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5083106, "supported_languages": null}, "macro.hubspot.get_marketing_event_list_columns": {"name": "get_marketing_event_list_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_list_columns.sql", "original_file_path": "macros/staging/get_marketing_event_list_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_list_columns", "macro_sql": "{% macro get_marketing_event_list_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"marketing_event_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"filters_updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"processing_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"deleted_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_version\", \"datatype\": dbt.type_int()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"size\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5111706, "supported_languages": null}, "macro.hubspot.get_engagement_email_columns": {"name": "get_engagement_email_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_email_columns.sql", "original_file_path": "macros/staging/get_engagement_email_columns.sql", "unique_id": "macro.hubspot.get_engagement_email_columns", "macro_sql": "{% macro get_engagement_email_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5132937, "supported_languages": null}, "macro.hubspot.get_ticket_pipeline_columns": {"name": "get_ticket_pipeline_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_pipeline_columns.sql", "original_file_path": "macros/staging/get_ticket_pipeline_columns.sql", "unique_id": "macro.hubspot.get_ticket_pipeline_columns", "macro_sql": "{% macro get_ticket_pipeline_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.515227, "supported_languages": null}, "macro.hubspot.get_email_campaign_columns": {"name": "get_email_campaign_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_campaign_columns.sql", "original_file_path": "macros/staging/get_email_campaign_columns.sql", "unique_id": "macro.hubspot.get_email_campaign_columns", "macro_sql": "{% macro get_email_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"app_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"app_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"content_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"num_included\", \"datatype\": dbt.type_int()},\n {\"name\": \"num_queued\", \"datatype\": dbt.type_int()},\n {\"name\": \"sub_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.517548, "supported_languages": null}, "macro.hubspot.get_macro_columns": {"name": "get_macro_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_macro_columns.sql", "original_file_path": "macros/staging/get_macro_columns.sql", "unique_id": "macro.hubspot.get_macro_columns", "macro_sql": "{%- macro get_macro_columns(get_column_macro) -%}\n\n {%- set macro_column_names = [] -%}\n {%- for col in get_column_macro -%}\n {%- do macro_column_names.append(col.name | upper if target.type == 'snowflake' else col.name) -%}\n {%- endfor -%}\n\n{{ return(macro_column_names) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "get_column_macro", "type": null, "description": ""}], "created_at": 1786034515.5183783, "supported_languages": null}, "macro.hubspot.get_deal_company_columns": {"name": "get_deal_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_company_columns.sql", "original_file_path": "macros/staging/get_deal_company_columns.sql", "unique_id": "macro.hubspot.get_deal_company_columns", "macro_sql": "{% macro get_deal_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5196483, "supported_languages": null}, "macro.hubspot.get_conversation_channel_account_columns": {"name": "get_conversation_channel_account_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_channel_account_columns.sql", "original_file_path": "macros/staging/get_conversation_channel_account_columns.sql", "unique_id": "macro.hubspot.get_conversation_channel_account_columns", "macro_sql": "{% macro get_conversation_channel_account_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"authorized\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5219634, "supported_languages": null}, "macro.hubspot.get_form_columns": {"name": "get_form_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_form_columns.sql", "original_file_path": "macros/staging/get_form_columns.sql", "unique_id": "macro.hubspot.get_form_columns", "macro_sql": "{% macro get_form_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"guid\", \"datatype\": dbt.type_string()},\n {\"name\": \"action\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"css_class\", \"datatype\": dbt.type_string()},\n {\"name\": \"follow_up_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"form_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"lead_nurturing_campaign_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"method\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"notify_recipients\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"redirect\", \"datatype\": dbt.type_string()},\n {\"name\": \"submit_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_bigint", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.525109, "supported_languages": null}, "macro.hubspot.get_owner_columns": {"name": "get_owner_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_owner_columns.sql", "original_file_path": "macros/staging/get_owner_columns.sql", "unique_id": "macro.hubspot.get_owner_columns", "macro_sql": "{% macro get_owner_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active_user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.527256, "supported_languages": null}, "macro.hubspot.hubspot_add_pass_through_columns": {"name": "hubspot_add_pass_through_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/hubspot_add_pass_through_columns.sql", "original_file_path": "macros/staging/hubspot_add_pass_through_columns.sql", "unique_id": "macro.hubspot.hubspot_add_pass_through_columns", "macro_sql": "{% macro hubspot_add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"quote\": True, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"quote\": True, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"quote\": True, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_var", "type": null, "description": ""}], "created_at": 1786034515.5293686, "supported_languages": null}, "macro.hubspot.get_company_property_history_columns": {"name": "get_company_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_property_history_columns.sql", "original_file_path": "macros/staging/get_company_property_history_columns.sql", "unique_id": "macro.hubspot.get_company_property_history_columns", "macro_sql": "{% macro get_company_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5315847, "supported_languages": null}, "macro.hubspot.get_email_event_status_change_columns": {"name": "get_email_event_status_change_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_status_change_columns.sql", "original_file_path": "macros/staging/get_email_event_status_change_columns.sql", "unique_id": "macro.hubspot.get_email_event_status_change_columns", "macro_sql": "{% macro get_email_event_status_change_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bounced\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"portal_subscription_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"requested_by\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"subscriptions\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5332057, "supported_languages": null}, "macro.hubspot.all_passthrough_column_check": {"name": "all_passthrough_column_check", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/all_passthrough_column_check.sql", "original_file_path": "macros/staging/all_passthrough_column_check.sql", "unique_id": "macro.hubspot.all_passthrough_column_check", "macro_sql": "{% macro all_passthrough_column_check(relation, get_columns) %}\n\n{% set available_passthrough_columns = fivetran_utils.remove_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref(relation)), \n prefix='property_', exclude=get_macro_columns(get_columns)) \n %}\n\n{{ return(available_passthrough_columns|length) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.remove_prefix_from_columns", "macro.hubspot.get_macro_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "get_columns", "type": null, "description": ""}], "created_at": 1786034515.533969, "supported_languages": null}, "macro.hubspot.get_conversation_message_history_columns": {"name": "get_conversation_message_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_message_history_columns.sql", "original_file_path": "macros/staging/get_conversation_message_history_columns.sql", "unique_id": "macro.hubspot.get_conversation_message_history_columns", "macro_sql": "{% macro get_conversation_message_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"thread_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"channel_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"from_inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"to_inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"assigned_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"assigned_from\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_by\", \"datatype\": dbt.type_string()},\n {\"name\": \"direction\", \"datatype\": dbt.type_string()},\n {\"name\": \"in_reply_to_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"rich_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"text\", \"datatype\": dbt.type_string()},\n {\"name\": \"truncation_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"client_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status_type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.538939, "supported_languages": null}, "macro.hubspot.get_contact_list_columns": {"name": "get_contact_list_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_list_columns.sql", "original_file_path": "macros/staging/get_contact_list_columns.sql", "unique_id": "macro.hubspot.get_contact_list_columns", "macro_sql": "{% macro get_contact_list_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\", \"alias\": \"is_contact_list_deleted\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"contact_list_id\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string(), \"alias\": \"contact_list_name\"},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"filters_updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_version\", \"datatype\": dbt.type_int()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"deleteable\", \"datatype\": \"boolean\"},\n {\"name\": \"dynamic\", \"datatype\": \"boolean\"},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"metadata_error\", \"datatype\": dbt.type_string()},\n {\"name\": \"metadata_last_processing_state_change_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"metadata_last_size_change_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"metadata_processing\", \"datatype\": dbt.type_string()},\n {\"name\": \"metadata_size\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__contact_list_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5432622, "supported_languages": null}, "macro.hubspot.get_owner_team_columns": {"name": "get_owner_team_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_owner_team_columns.sql", "original_file_path": "macros/staging/get_owner_team_columns.sql", "unique_id": "macro.hubspot.get_owner_team_columns", "macro_sql": "{% macro get_owner_team_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"team_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_team_primary\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.544561, "supported_languages": null}, "macro.hubspot.get_engagement_call_columns": {"name": "get_engagement_call_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_call_columns.sql", "original_file_path": "macros/staging/get_engagement_call_columns.sql", "unique_id": "macro.hubspot.get_engagement_call_columns", "macro_sql": "{% macro get_engagement_call_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5467553, "supported_languages": null}, "macro.hubspot.get_email_event_deferred_columns": {"name": "get_email_event_deferred_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_deferred_columns.sql", "original_file_path": "macros/staging/get_email_event_deferred_columns.sql", "unique_id": "macro.hubspot.get_email_event_deferred_columns", "macro_sql": "{% macro get_email_event_deferred_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"attempt\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"response\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5478911, "supported_languages": null}, "macro.hubspot.get_users_columns": {"name": "get_users_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_users_columns.sql", "original_file_path": "macros/staging/get_users_columns.sql", "unique_id": "macro.hubspot.get_users_columns", "macro_sql": "{% macro get_users_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"primary_team_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"role_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5496817, "supported_languages": null}, "macro.hubspot.get_email_event_sent_columns": {"name": "get_email_event_sent_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_sent_columns.sql", "original_file_path": "macros/staging/get_email_event_sent_columns.sql", "unique_id": "macro.hubspot.get_email_event_sent_columns", "macro_sql": "{% macro get_email_event_sent_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bcc\", \"datatype\": dbt.type_string()},\n {\"name\": \"cc\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"reply_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) %}\n {{ columns.append({\"name\": \"FROM\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% else %}\n {{ columns.append({\"name\": \"from\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5521998, "supported_languages": null}, "macro.hubspot.get_marketing_event_columns": {"name": "get_marketing_event_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_columns.sql", "original_file_path": "macros/staging/get_marketing_event_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_columns", "macro_sql": "{% macro get_marketing_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"app_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"app_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"attendees\", \"datatype\": dbt.type_int()},\n {\"name\": \"cancellations\", \"datatype\": dbt.type_int()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"event_cancelled\", \"datatype\": \"boolean\"},\n {\"name\": \"event_completed\", \"datatype\": \"boolean\"},\n {\"name\": \"event_description\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_organizer\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"external_event_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"no_shows\", \"datatype\": dbt.type_int()},\n {\"name\": \"registrants\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5563104, "supported_languages": null}, "macro.hubspot.get_deal_contact_columns": {"name": "get_deal_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_contact_columns.sql", "original_file_path": "macros/staging/get_deal_contact_columns.sql", "unique_id": "macro.hubspot.get_deal_contact_columns", "macro_sql": "{% macro get_deal_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.557618, "supported_languages": null}, "macro.hubspot.get_contact_form_submission_columns": {"name": "get_contact_form_submission_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_form_submission_columns.sql", "original_file_path": "macros/staging/get_contact_form_submission_columns.sql", "unique_id": "macro.hubspot.get_contact_form_submission_columns", "macro_sql": "{% macro get_contact_form_submission_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"form_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"conversion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"page_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_bigint", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5595784, "supported_languages": null}, "macro.hubspot.get_engagement_communication_columns": {"name": "get_engagement_communication_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_commmunication_columns.sql", "original_file_path": "macros/staging/get_engagement_commmunication_columns.sql", "unique_id": "macro.hubspot.get_engagement_communication_columns", "macro_sql": "{% macro get_engagement_communication_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5618277, "supported_languages": null}, "macro.hubspot.remove_duplicate_and_prefix_from_columns": {"name": "remove_duplicate_and_prefix_from_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/remove_duplicate_and_prefix_from_columns.sql", "original_file_path": "macros/staging/remove_duplicate_and_prefix_from_columns.sql", "unique_id": "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro_sql": "{% macro remove_duplicate_and_prefix_from_columns(columns, prefix='', exclude=[]) %}\n \n {# Loop once to find duplicates #}\n {%- set duplicate_exclude = [] -%}\n {% for col in columns if col.name not in exclude %}\n {%- for dupe in columns if col.name[prefix|length:]|lower == dupe.name|lower -%}\n {%- do duplicate_exclude.append(col.name) -%}\n {%- do duplicate_exclude.append(dupe.name) -%}\n , {{ adapter.quote(col.name) }} as {{ dbt_utils.slugify(col.name[prefix|length:]) }}\n {%- endfor %}\n {% endfor %}\n\n {# Loop again to find non-duplicates #}\n {% for col in columns if col.name not in exclude %}\n {%- if col.name|lower not in duplicate_exclude|lower -%}\n {% if col.name[:prefix|length]|lower == prefix %}\n , {{ adapter.quote(col.name) }} as {{ dbt_utils.slugify(col.name[prefix|length:]) }}\n {%- else %}\n , {{ adapter.quote(col.name) }}\n {%- endif -%}\n {%- endif -%}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}], "created_at": 1786034515.56449, "supported_languages": null}, "macro.hubspot.get_submission_response_columns": {"name": "get_submission_response_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_submission_response_columns.sql", "original_file_path": "macros/staging/get_submission_response_columns.sql", "unique_id": "macro.hubspot.get_submission_response_columns", "macro_sql": "{% macro get_submission_response_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"conversion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"form_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"field_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"field_value\", \"datatype\": dbt.type_string()},\n {\"name\": \"submitted_at\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5663488, "supported_languages": null}, "macro.hubspot.get_property_option_columns": {"name": "get_property_option_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_property_option_columns.sql", "original_file_path": "macros/staging/get_property_option_columns.sql", "unique_id": "macro.hubspot.get_property_option_columns", "macro_sql": "{% macro get_property_option_columns() %}\n\n{% set columns = [\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"property_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"hidden\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()},\n {\"name\": \"hubspot_object\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5681863, "supported_languages": null}, "macro.hubspot.get_contact_list_member_columns": {"name": "get_contact_list_member_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_list_member_columns.sql", "original_file_path": "macros/staging/get_contact_list_member_columns.sql", "unique_id": "macro.hubspot.get_contact_list_member_columns", "macro_sql": "{% macro get_contact_list_member_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"added_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_list_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5695055, "supported_languages": null}, "macro.hubspot.get_deal_property_history_columns": {"name": "get_deal_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_property_history_columns.sql", "original_file_path": "macros/staging/get_deal_property_history_columns.sql", "unique_id": "macro.hubspot.get_deal_property_history_columns", "macro_sql": "{% macro get_deal_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5717366, "supported_languages": null}, "macro.hubspot.get_ticket_pipeline_stage_columns": {"name": "get_ticket_pipeline_stage_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_pipeline_stage_columns.sql", "original_file_path": "macros/staging/get_ticket_pipeline_stage_columns.sql", "unique_id": "macro.hubspot.get_ticket_pipeline_stage_columns", "macro_sql": "{% macro get_ticket_pipeline_stage_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"stage_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ticket_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5739796, "supported_languages": null}, "macro.hubspot.get_ticket_company_columns": {"name": "get_ticket_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_company_columns.sql", "original_file_path": "macros/staging/get_ticket_company_columns.sql", "unique_id": "macro.hubspot.get_ticket_company_columns", "macro_sql": "{% macro get_ticket_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5751324, "supported_languages": null}, "macro.hubspot.get_team_columns": {"name": "get_team_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_team_columns.sql", "original_file_path": "macros/staging/get_team_columns.sql", "unique_id": "macro.hubspot.get_team_columns", "macro_sql": "{% macro get_team_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.576294, "supported_languages": null}, "macro.hubspot.get_engagement_meeting_columns": {"name": "get_engagement_meeting_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_meeting_columns.sql", "original_file_path": "macros/staging/get_engagement_meeting_columns.sql", "unique_id": "macro.hubspot.get_engagement_meeting_columns", "macro_sql": "{% macro get_engagement_meeting_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5784576, "supported_languages": null}, "macro.hubspot.get_marketing_event_custom_property_columns": {"name": "get_marketing_event_custom_property_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_custom_property_columns.sql", "original_file_path": "macros/staging/get_marketing_event_custom_property_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_custom_property_columns", "macro_sql": "{% macro get_marketing_event_custom_property_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"marketing_event_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5795977, "supported_languages": null}, "macro.hubspot.get_ticket_deal_columns": {"name": "get_ticket_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_deal_columns.sql", "original_file_path": "macros/staging/get_ticket_deal_columns.sql", "unique_id": "macro.hubspot.get_ticket_deal_columns", "macro_sql": "{% macro get_ticket_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5807335, "supported_languages": null}, "macro.hubspot.add_property_labels": {"name": "add_property_labels", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/add_property_labels.sql", "original_file_path": "macros/staging/add_property_labels.sql", "unique_id": "macro.hubspot.add_property_labels", "macro_sql": "{% macro add_property_labels(passthrough_var_name, cte_name) %}\n\nselect {{ cte_name }}.*\n\n{% if var(passthrough_var_name, []) != [] and var('hubspot_property_enabled', True) %}\n {% set source_name = passthrough_var_name.replace('hubspot__', '').replace('_pass_through_columns', '') %}\n {%- set col_list = var(passthrough_var_name) -%}\n\n {%- for col in col_list -%} -- Create label cols\n {%- if col.add_property_label or var('hubspot__enable_all_property_labels', false) -%}\n {%- set col_alias = (col.alias | default(col.name)) %}\n , {{ col.name }}_option.property_option_label as {{ col_alias }}_label\n {% endif -%}\n {%- endfor %}\n\n from {{ cte_name }}\n\n {% for col in col_list -%} -- Create joins\n {%- if col.add_property_label or var('hubspot__enable_all_property_labels', false) -%}\n {%- set col_alias = (col.alias | default(col.name)) %}\n\n left join -- create subset of property and property_options for property in question\n (select \n property_option.source_relation,\n property_option.property_option_value, \n property_option.property_option_label\n from {{ ref('stg_hubspot__property_option') }} as property_option\n join {{ ref('stg_hubspot__property') }} as property\n on property_option.hubspot_object = property.hubspot_object\n and property_option.source_relation = property.source_relation\n where property.property_name = '{{ col.name.replace('property_', '') }}'\n and property.hubspot_object = '{{ source_name }}'\n ) as {{ col.name }}_option\n\n on cast({{ cte_name }}.{{ col_alias }} as {{ dbt.type_string() }})\n = cast({{ col.name }}_option.property_option_value as {{ dbt.type_string() }})\n and {{ cte_name }}.source_relation = {{ col.name }}_option.source_relation\n\n {% endif -%}\n {%- endfor %}\n\n{%- else -%}\n from {{ cte_name }}\n\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "passthrough_var_name", "type": null, "description": ""}, {"name": "cte_name", "type": null, "description": ""}], "created_at": 1786034515.584121, "supported_languages": null}, "macro.hubspot.get_conversation_thread_columns": {"name": "get_conversation_thread_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_thread_columns.sql", "original_file_path": "macros/staging/get_conversation_thread_columns.sql", "unique_id": "macro.hubspot.get_conversation_thread_columns", "macro_sql": "{% macro get_conversation_thread_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"associated_contact_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"associated_ticket_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"original_channel_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"original_channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"assigned_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"closed_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"latest_message_received_timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"latest_message_sent_timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"latest_message_timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"spam\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5873773, "supported_languages": null}, "macro.hubspot.get_contact_property_history_columns": {"name": "get_contact_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_property_history_columns.sql", "original_file_path": "macros/staging/get_contact_property_history_columns.sql", "unique_id": "macro.hubspot.get_contact_property_history_columns", "macro_sql": "{% macro get_contact_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5895824, "supported_languages": null}, "macro.hubspot.get_merged_deal_columns": {"name": "get_merged_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_merged_deal_columns.sql", "original_file_path": "macros/staging/get_merged_deal_columns.sql", "unique_id": "macro.hubspot.get_merged_deal_columns", "macro_sql": "{% macro get_merged_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"merged_deal_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5905428, "supported_languages": null}, "macro.hubspot.get_engagement_columns": {"name": "get_engagement_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_columns.sql", "original_file_path": "macros/staging/get_engagement_columns.sql", "unique_id": "macro.hubspot.get_engagement_columns", "macro_sql": "{% macro get_engagement_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5917475, "supported_languages": null}, "macro.hubspot.get_team_user_columns": {"name": "get_team_user_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_team_user_columns.sql", "original_file_path": "macros/staging/get_team_user_columns.sql", "unique_id": "macro.hubspot.get_team_user_columns", "macro_sql": "{% macro get_team_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"team_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_secondary_user\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5930448, "supported_languages": null}, "macro.hubspot.get_deal_columns": {"name": "get_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_columns.sql", "original_file_path": "macros/staging/get_deal_columns.sql", "unique_id": "macro.hubspot.get_deal_columns", "macro_sql": "{% macro get_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"deal_pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"deal_pipeline_stage_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"is_deal_deleted\"},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_dealname\", \"datatype\": dbt.type_string(), \"alias\": \"deal_name\"},\n {\"name\": \"property_description\", \"datatype\": dbt.type_string(), \"alias\": \"description\"},\n {\"name\": \"property_amount\", \"datatype\": dbt.type_int(), \"alias\": \"amount\"},\n {\"name\": \"property_closedate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"closed_date\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__deal_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.5962577, "supported_languages": null}, "macro.hubspot.get_engagement_task_columns": {"name": "get_engagement_task_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_task_columns.sql", "original_file_path": "macros/staging/get_engagement_task_columns.sql", "unique_id": "macro.hubspot.get_engagement_task_columns", "macro_sql": "{% macro get_engagement_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.598419, "supported_languages": null}, "macro.spark_utils.get_tables": {"name": "get_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_tables", "macro_sql": "{% macro get_tables(table_regex_pattern='.*') %}\n\n {% set tables = [] %}\n {% for database in spark__list_schemas('not_used') %}\n {% for table in spark__list_relations_without_caching(database[0]) %}\n {% set db_tablename = database[0] ~ \".\" ~ table[1] %}\n {% set is_match = modules.re.match(table_regex_pattern, db_tablename) %}\n {% if is_match %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('type', 'TYPE', 'Type'))|first %}\n {% if table_type[1]|lower != 'view' %}\n {{ tables.append(db_tablename) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% endfor %}\n {{ return(tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786034515.6018538, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"name": "get_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_delta_tables", "macro_sql": "{% macro get_delta_tables(table_regex_pattern='.*') %}\n\n {% set delta_tables = [] %}\n {% for db_tablename in get_tables(table_regex_pattern) %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('provider', 'PROVIDER', 'Provider'))|first %}\n {% if table_type[1]|lower == 'delta' %}\n {{ delta_tables.append(db_tablename) }}\n {% endif %}\n {% endfor %}\n {{ return(delta_tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786034515.6035194, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"name": "get_statistic_columns", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_statistic_columns", "macro_sql": "{% macro get_statistic_columns(table) %}\n\n {% call statement('input_columns', fetch_result=True) %}\n SHOW COLUMNS IN {{ table }}\n {% endcall %}\n {% set input_columns = load_result('input_columns').table %}\n\n {% set output_columns = [] %}\n {% for column in input_columns %}\n {% call statement('column_information', fetch_result=True) %}\n DESCRIBE TABLE {{ table }} `{{ column[0] }}`\n {% endcall %}\n {% if not load_result('column_information').table[1][1].startswith('struct') and not load_result('column_information').table[1][1].startswith('array') %}\n {{ output_columns.append('`' ~ column[0] ~ '`') }}\n {% endif %}\n {% endfor %}\n {{ return(output_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1786034515.605268, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"name": "spark_optimize_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_optimize_delta_tables", "macro_sql": "{% macro spark_optimize_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Optimizing \" ~ table) }}\n {% do run_query(\"optimize \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786034515.6066997, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"name": "spark_vacuum_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "macro_sql": "{% macro spark_vacuum_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Vacuuming \" ~ table) }}\n {% do run_query(\"vacuum \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786034515.6081123, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"name": "spark_analyze_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_analyze_tables", "macro_sql": "{% macro spark_analyze_tables(table_regex_pattern='.*') %}\n\n {% for table in get_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set columns = get_statistic_columns(table) | join(',') %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Analyzing \" ~ table) }}\n {% if columns != '' %}\n {% do run_query(\"analyze table \" ~ table ~ \" compute statistics for columns \" ~ columns) %}\n {% endif %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.spark_utils.get_statistic_columns", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786034515.609925, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"name": "assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1786034515.6105237, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"name": "default__assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.default__assert_not_null", "macro_sql": "{% macro default__assert_not_null(function, arg) %}\n\n coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1786034515.6109602, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"name": "spark__convert_timezone", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "unique_id": "macro.spark_utils.spark__convert_timezone", "macro_sql": "{% macro spark__convert_timezone(in_tz, out_tz, in_timestamp) %}\n from_utc_timestamp(to_utc_timestamp({{in_timestamp}}, {{in_tz}}), {{out_tz}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "in_tz", "type": null, "description": ""}, {"name": "out_tz", "type": null, "description": ""}, {"name": "in_timestamp", "type": null, "description": ""}], "created_at": 1786034515.6113791, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"name": "spark__get_relations_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "macro_sql": "{% macro spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n show table extended in {{ schema_pattern }} like '{{ table_pattern }}'\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=None,\n schema=row[0],\n identifier=row[1],\n type=('view' if 'Type: VIEW' in row[3] else 'table')\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.613709, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"name": "spark__get_relations_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "macro_sql": "{% macro spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {% set table_pattern = table_pattern ~ '*' %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.614377, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"name": "spark__get_tables_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "macro_sql": "{% macro spark__get_tables_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.6149492, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"name": "spark__get_tables_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "macro_sql": "{% macro spark__get_tables_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786034515.615477, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"name": "spark__current_timestamp", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.61576, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"name": "spark__current_timestamp_in_utc", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.6159227, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"name": "spark__dateadd", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "unique_id": "macro.spark_utils.spark__dateadd", "macro_sql": "{% macro spark__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {%- set clock_component -%}\n {# make sure the dates + timestamps are real, otherwise raise an error asap #}\n to_unix_timestamp({{ spark_utils.assert_not_null('to_timestamp', from_date_or_timestamp) }})\n - to_unix_timestamp({{ spark_utils.assert_not_null('date', from_date_or_timestamp) }})\n {%- endset -%}\n\n {%- if datepart in ['day', 'week'] -%}\n \n {%- set multiplier = 7 if datepart == 'week' else 1 -%}\n\n to_timestamp(\n to_unix_timestamp(\n date_add(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ['month', 'quarter', 'year'] -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'month' -%} 1\n {%- elif datepart == 'quarter' -%} 3\n {%- elif datepart == 'year' -%} 12\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n to_unix_timestamp(\n add_months(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n {{ spark_utils.assert_not_null('to_unix_timestamp', from_date_or_timestamp) }}\n + cast({{interval}} * {{multiplier}} as int)\n )\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro dateadd not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786034515.619814, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"name": "spark__type_numeric", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "unique_id": "macro.spark_utils.spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786034515.6200786, "supported_languages": null}, "macro.spark_utils.spark__concat": {"name": "spark__concat", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "unique_id": "macro.spark_utils.spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1786034515.6204238, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"name": "spark__datediff", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "unique_id": "macro.spark_utils.spark__datediff", "macro_sql": "{% macro spark__datediff(first_date, second_date, datepart) %}\n\n {%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}\n \n {# make sure the dates are real, otherwise raise an error asap #}\n {% set first_date = spark_utils.assert_not_null('date', first_date) %}\n {% set second_date = spark_utils.assert_not_null('date', second_date) %}\n \n {%- endif -%}\n \n {%- if datepart == 'day' -%}\n \n datediff({{second_date}}, {{first_date}})\n \n {%- elif datepart == 'week' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(datediff({{second_date}}, {{first_date}})/7)\n else ceil(datediff({{second_date}}, {{first_date}})/7)\n end\n \n -- did we cross a week boundary (Sunday)?\n + case\n when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1\n else 0 end\n\n {%- elif datepart == 'month' -%}\n\n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}})))\n else ceil(months_between(date({{second_date}}), date({{first_date}})))\n end\n \n -- did we cross a month boundary?\n + case\n when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1\n else 0 end\n \n {%- elif datepart == 'quarter' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}}))/3)\n else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)\n end\n \n -- did we cross a quarter boundary?\n + case\n when {{first_date}} < {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n < (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then 1\n when {{first_date}} > {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n > (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then -1\n else 0 end\n\n {%- elif datepart == 'year' -%}\n \n year({{second_date}}) - year({{first_date}})\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set divisor -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n case when {{first_date}} < {{second_date}}\n then ceil((\n {# make sure the timestamps are real, otherwise raise an error asap #}\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n else floor((\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n end\n \n {% if datepart == 'millisecond' %}\n + cast(date_format({{second_date}}, 'SSS') as int)\n - cast(date_format({{first_date}}, 'SSS') as int)\n {% endif %}\n \n {% if datepart == 'microsecond' %} \n {% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}\n -- Spark doesn't really support microseconds, so this is a massive hack!\n -- It will only work if the timestamp-string is of the format\n -- 'yyyy-MM-dd-HH mm.ss.SSSSSS'\n + cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)\n - cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int) \n {% endif %}\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro datediff not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786034515.6273649, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"name": "spark__split_part", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "unique_id": "macro.spark_utils.spark__split_part", "macro_sql": "{% macro spark__split_part(string_text, delimiter_text, part_number) %}\n\n {% set delimiter_expr %}\n \n -- escape if starts with a special character\n case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_'\n then concat('\\\\', {{ delimiter_text }})\n else {{ delimiter_text }} end\n \n {% endset %}\n\n {% set split_part_expr %}\n \n split(\n {{ string_text }},\n {{ delimiter_expr }}\n )[({{ part_number - 1 }})]\n \n {% endset %}\n \n {{ return(split_part_expr) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786034515.6283703, "supported_languages": null}}, "docs": {"doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}, "doc.hubspot.bounces": {"name": "bounces", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.bounces", "block_contents": "The total number of bounce email events."}, "doc.hubspot.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.clicks", "block_contents": "The total number of click email events."}, "doc.hubspot.deferrals": {"name": "deferrals", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.deferrals", "block_contents": "The total number of deferral email events."}, "doc.hubspot.deliveries": {"name": "deliveries", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.deliveries", "block_contents": "The total number of delivery email events."}, "doc.hubspot.drops": {"name": "drops", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.drops", "block_contents": "The total number of drop email events."}, "doc.hubspot.forwards": {"name": "forwards", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.forwards", "block_contents": "The total number of forward email events."}, "doc.hubspot.opens": {"name": "opens", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.opens", "block_contents": "The total number of open email events."}, "doc.hubspot.prints": {"name": "prints", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.prints", "block_contents": "The total number of print email events."}, "doc.hubspot.spam_reports": {"name": "spam_reports", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.spam_reports", "block_contents": "The total number of spam report email events."}, "doc.hubspot.unsubscribes": {"name": "unsubscribes", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unsubscribes", "block_contents": "The total number of unsubscribe email events."}, "doc.hubspot.unique_bounces": {"name": "unique_bounces", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_bounces", "block_contents": "The total number of unique email sends with a bounce email event."}, "doc.hubspot.unique_clicks": {"name": "unique_clicks", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_clicks", "block_contents": "The total number of unique email sends with a click email event."}, "doc.hubspot.unique_deferrals": {"name": "unique_deferrals", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_deferrals", "block_contents": "The total number of unique email sends with a deferral email event."}, "doc.hubspot.unique_deliveries": {"name": "unique_deliveries", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_deliveries", "block_contents": "The total number of unique email sends with a delivery email event."}, "doc.hubspot.unique_drops": {"name": "unique_drops", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_drops", "block_contents": "The total number of unique email sends with a drop email event."}, "doc.hubspot.unique_forwards": {"name": "unique_forwards", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_forwards", "block_contents": "The total number of unique email sends with a forward email event."}, "doc.hubspot.unique_opens": {"name": "unique_opens", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_opens", "block_contents": "The total number of unique email sends with a opens email event."}, "doc.hubspot.unique_prints": {"name": "unique_prints", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_prints", "block_contents": "The total number of unique email sends with a print email event."}, "doc.hubspot.unique_spam_reports": {"name": "unique_spam_reports", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_spam_reports", "block_contents": "The total number of unique email sends with a spam report email event."}, "doc.hubspot.unique_unsubscribes": {"name": "unique_unsubscribes", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_unsubscribes", "block_contents": "The total number of unique email sends with a unsubscribe email event."}, "doc.hubspot.count_engagement_notes": {"name": "count_engagement_notes", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_notes", "block_contents": "The total number of related note engagements."}, "doc.hubspot.count_engagement_tasks": {"name": "count_engagement_tasks", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_tasks", "block_contents": "The total number of related task engagements."}, "doc.hubspot.count_engagement_calls": {"name": "count_engagement_calls", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_calls", "block_contents": "The total number of related call engagements."}, "doc.hubspot.count_engagement_meetings": {"name": "count_engagement_meetings", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_meetings", "block_contents": "The total number of related meeting engagements."}, "doc.hubspot.count_engagement_emails": {"name": "count_engagement_emails", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_emails", "block_contents": "The total number of related email engagements."}, "doc.hubspot.count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_incoming_emails", "block_contents": "The total number of related incoming email engagements."}, "doc.hubspot.count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_forwarded_emails", "block_contents": "The total number of related forwarded email engagements."}, "doc.hubspot.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.source_relation", "block_contents": "Identifies the record's source."}, "doc.hubspot._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_synced", "block_contents": "Timestamp of when Fivetran synced a record."}, "doc.hubspot._fivetran_deleted": {"name": "_fivetran_deleted", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_deleted", "block_contents": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "doc.hubspot._fivetran_end": {"name": "_fivetran_end", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_end", "block_contents": "The (UTC DATETIME) when a record became inactive in the source database."}, "doc.hubspot._fivetran_start": {"name": "_fivetran_start", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_start", "block_contents": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database."}, "doc.hubspot.portal_id": {"name": "portal_id", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.portal_id", "block_contents": "The hub ID."}, "doc.hubspot.is_deleted": {"name": "is_deleted", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.is_deleted", "block_contents": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "doc.hubspot.history_name": {"name": "history_name", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_name", "block_contents": "The name of the field being changed."}, "doc.hubspot.history_source": {"name": "history_source", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_source", "block_contents": "The source (reason) of the change."}, "doc.hubspot.history_source_id": {"name": "history_source_id", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_source_id", "block_contents": "The ID of the object that caused the change, if applicable."}, "doc.hubspot.history_timestamp": {"name": "history_timestamp", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_timestamp", "block_contents": "The timestamp the changed occurred."}, "doc.hubspot.history_value": {"name": "history_value", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_value", "block_contents": "The new value of the field."}, "doc.hubspot.email_event_browser": {"name": "email_event_browser", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_browser", "block_contents": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "doc.hubspot.email_event_ip_address": {"name": "email_event_ip_address", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_ip_address", "block_contents": "The contact's IP address when the event occurred."}, "doc.hubspot.email_event_location": {"name": "email_event_location", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_location", "block_contents": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "doc.hubspot.email_event_user_agent": {"name": "email_event_user_agent", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_user_agent", "block_contents": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {"test.hubspot_integration_tests.consistency_engagement_communication": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_communication", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_communication.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_communication.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_communication", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_communication"], "alias": "consistency_engagement_communication", "checksum": {"name": "sha256", "checksum": "8fe3f442b802dad96c4bbb37c7e77e37e847c4fd60e4b5a719defdbb767efd75"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)"}, "created_at": 1786034516.559983, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement communication end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_communication'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_communication\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_communication'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_communication\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_communication", "package": null, "version": null}, {"name": "hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_companies": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_companies", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_companies.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_companies.sql", "unique_id": "test.hubspot_integration_tests.consistency_companies", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_companies"], "alias": "consistency_companies", "checksum": {"name": "sha256", "checksum": "233d56a26f33f97adc2cc2fc63a823895ecdfa41dfa699a40f35d1c464e80847"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_company_enabled', True)"}, "created_at": 1786034516.6167538, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_company_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the companies end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__companies'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__companies\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__companies'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__companies\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__companies", "package": null, "version": null}, {"name": "hubspot__companies", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_forward": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_forward", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_forward.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_forward.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_forward", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_forward"], "alias": "consistency_email_event_forward", "checksum": {"name": "sha256", "checksum": "9448dfaac16e2d9379e84f15e93dccf35b24949ddf8d2c572f5d40c043b0e390"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_forward_enabled', True)"}, "created_at": 1786034516.6249423, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_forward_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event forward end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_forward'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_forward\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_forward'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_forward\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_forward", "package": null, "version": null}, {"name": "hubspot__email_event_forward", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_tasks": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_tasks", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_tasks.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_tasks.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_tasks", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_tasks"], "alias": "consistency_engagement_tasks", "checksum": {"name": "sha256", "checksum": "cbc2152079962aefc84061d523242d9da53997c367cb58c4298323799f4418a5"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_task_enabled', True)"}, "created_at": 1786034516.6342077, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_task_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement tasks end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_tasks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_tasks\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_tasks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_tasks\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_tasks", "package": null, "version": null}, {"name": "hubspot__engagement_tasks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_deal_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_deal_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_deal_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_deal_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_deal_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_deal_history"], "alias": "consistency_deal_history", "checksum": {"name": "sha256", "checksum": "735d424a3ee679059592f92e9e9d8d9256f43839a738761a094cbc635ec460d8"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_deal_enabled', True) and var('hubspot_deal_property_history_enabled', True)"}, "created_at": 1786034516.644273, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_deal_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the deal history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__deal_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__deal_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}, {"name": "hubspot__deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_campaigns": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_campaigns", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_campaigns.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_campaigns.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_campaigns", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_campaigns"], "alias": "consistency_email_campaigns", "checksum": {"name": "sha256", "checksum": "a7dd48140c68eab4dbf2b08edb4cc39c74969fce94ecfa94a034ede77bbb38cc"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_sent_enabled', True)"}, "created_at": 1786034516.653451, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_sent_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email campaigns end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_campaigns'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_campaigns\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_campaigns'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_campaigns\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_campaigns", "package": null, "version": null}, {"name": "hubspot__email_campaigns", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_status_change": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_status_change", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_status_change.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_status_change.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_status_change", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_status_change"], "alias": "consistency_email_event_status_change", "checksum": {"name": "sha256", "checksum": "943bb0c7e150faf612fe849b7c3df01460c10be191792f4337db5cc39181e015"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_status_change_enabled', True)"}, "created_at": 1786034516.6626854, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_status_change_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event status change end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_status_change'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_status_change\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_status_change'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_status_change\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_status_change", "package": null, "version": null}, {"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_dropped": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_dropped", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_dropped.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_dropped.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_dropped", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_dropped"], "alias": "consistency_email_event_dropped", "checksum": {"name": "sha256", "checksum": "b71789094c2610b1bf1c3bea1592347eaeee693792e50cd2032c885d6d605857"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_dropped_enabled', True)"}, "created_at": 1786034516.6718566, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_dropped_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event dropped end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_dropped'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_dropped\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_dropped'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_dropped\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_dropped", "package": null, "version": null}, {"name": "hubspot__email_event_dropped", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_bounce": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_bounce", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_bounce.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_bounce.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_bounce", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_bounce"], "alias": "consistency_email_event_bounce", "checksum": {"name": "sha256", "checksum": "4d6d9f66318777bd1b2af8b1660f666c9308e17f0f4048c920b18abd42fd8f57"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_bounce_enabled', True)"}, "created_at": 1786034516.682564, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_bounce_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event bounce end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_bounce'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_bounce\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_bounce'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_bounce\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_bounce", "package": null, "version": null}, {"name": "hubspot__email_event_bounce", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contacts": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contacts", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_contacts.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_contacts.sql", "unique_id": "test.hubspot_integration_tests.consistency_contacts", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_contacts"], "alias": "consistency_contacts", "checksum": {"name": "sha256", "checksum": "e8be5d8adbf256299addd2ffec3b375ca58fa093d621c1433321ab518d0c095f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_enabled', True)"}, "created_at": 1786034516.6928034, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the contacts end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__contacts'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__contacts\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__contacts'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__contacts\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contacts", "package": null, "version": null}, {"name": "hubspot__contacts", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_marketing_event_performance": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_marketing_event_performance", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_marketing_event_performance.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_marketing_event_performance.sql", "unique_id": "test.hubspot_integration_tests.consistency_marketing_event_performance", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_marketing_event_performance"], "alias": "consistency_marketing_event_performance", "checksum": {"name": "sha256", "checksum": "c8574b09f501f36eadb584832d17859624c0f406f1202bbaa25f14e0d7f61136"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)"}, "created_at": 1786034516.7011435, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) + ['source_relation'] %}\n\n-- this test ensures the hubspot__marketing_event_performance end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__marketing_event_performance'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__marketing_event_performance\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__marketing_event_performance'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__marketing_event_performance\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__marketing_event_performance", "package": null, "version": null}, {"name": "hubspot__marketing_event_performance", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_print": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_print", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_print.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_print.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_print", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_print"], "alias": "consistency_email_event_print", "checksum": {"name": "sha256", "checksum": "4424597e1e9239a468de15dee6a381d25dbe964bc6155323ef6b4db1c12b37ef"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_print_enabled', True)"}, "created_at": 1786034516.7101285, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_print_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event print end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_print'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_print\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_print'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_print\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_print", "package": null, "version": null}, {"name": "hubspot__email_event_print", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_deals": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_deals", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_deals.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_deals.sql", "unique_id": "test.hubspot_integration_tests.consistency_deals", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_deals"], "alias": "consistency_deals", "checksum": {"name": "sha256", "checksum": "b8c507b899cdd67bd658a28810954f315b6ffe962e18ed2fd22422e26d1a2a04"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_deal_enabled', True)"}, "created_at": 1786034516.719344, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_deal_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the deals end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__deals'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__deals\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__deals'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__deals\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deals", "package": null, "version": null}, {"name": "hubspot__deals", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagements": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagements", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagements.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagements.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagements", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagements"], "alias": "consistency_engagements", "checksum": {"name": "sha256", "checksum": "acdb73d55903a02a13cc3f8ad8cee202b1d03e5679b70d5f2f82e14582a6912f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True)"}, "created_at": 1786034516.7276933, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagements end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagements'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagements\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagements'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagements\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagements", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_company_lists": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_company_lists", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_company_lists.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_company_lists.sql", "unique_id": "test.hubspot_integration_tests.consistency_company_lists", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_company_lists"], "alias": "consistency_company_lists", "checksum": {"name": "sha256", "checksum": "8bc1e1e956b902afa325800038ca3c31f444c09d5d9d89c9dcc73f423802c8cb"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_company_list_enabled', True) and var('hubspot_sales_enabled', True)"}, "created_at": 1786034516.7364702, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_company_list_enabled', true) and var('hubspot_sales_enabled', true)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the company_list end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__company_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__company_lists\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__company_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__company_lists\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_lists", "package": null, "version": null}, {"name": "hubspot__company_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_deal_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_deal_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_deal_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_deal_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_deal_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_deal_history"], "alias": "consistency_daily_deal_history", "checksum": {"name": "sha256", "checksum": "bcfbdb67ef0f5256c6e6a070bbf732dd59f9594bbbac6a3ba857a4e09212381f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_deal_enabled', True) and var('hubspot_deal_property_history_enabled', True)"}, "created_at": 1786034516.7451587, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_deal_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the daily deal history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_deal_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_deal_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_deal_history", "package": null, "version": null}, {"name": "hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_company_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_company_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_company_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_company_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_company_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_company_history"], "alias": "consistency_daily_company_history", "checksum": {"name": "sha256", "checksum": "31e3fa4a31bfc9fda8c42028f1438d80f85b3e97159b821e5357a1002e45ad1b"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_company_enabled', True) and var('hubspot_company_property_history_enabled', True)"}, "created_at": 1786034516.7548416, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) and var('hubspot_company_property_history_enabled', true)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the hubspot__daily_company_history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_company_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_company_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_company_history", "package": null, "version": null}, {"name": "hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_sent": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_sent", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_sent.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_sent.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_sent", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_sent"], "alias": "consistency_email_event_sent", "checksum": {"name": "sha256", "checksum": "e26ca63671dc5917b03c2c53595e65e50771533116d0e24e68ea2e1ab971d929"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_sent_enabled', True)"}, "created_at": 1786034516.7639186, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_sent_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event sent end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_sent'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_sent\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_sent'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_sent\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}, {"name": "hubspot__email_event_sent", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_deal_stages": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_deal_stages", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_deal_stages.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_deal_stages.sql", "unique_id": "test.hubspot_integration_tests.consistency_deal_stages", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_deal_stages"], "alias": "consistency_deal_stages", "checksum": {"name": "sha256", "checksum": "b09173df661eb1d243f583cd38e0b50ea09c24d562944a2aa6ab08f1eec01de5"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_deal_enabled', True) and var('hubspot_sales_enabled', True)"}, "created_at": 1786034516.7731044, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_deal_enabled', true) and var('hubspot_sales_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the deal stages end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_stages'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__deal_stages\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_stages'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__deal_stages\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_stages", "package": null, "version": null}, {"name": "hubspot__deal_stages", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_spam_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_spam_report", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_spam_report.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_spam_report.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_spam_report", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_spam_report"], "alias": "consistency_email_event_spam_report", "checksum": {"name": "sha256", "checksum": "714c2e7fc26944f88fbdd751a36fee2b30c0fc1706fb5d85ec06faadcbe3e829"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_spam_report_enabled', True)"}, "created_at": 1786034516.7818816, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_spam_report_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event spam report end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_spam_report'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_spam_report\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_spam_report'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_spam_report\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_spam_report", "package": null, "version": null}, {"name": "hubspot__email_event_spam_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_company_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_company_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_company_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_company_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_company_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_company_history"], "alias": "consistency_company_history", "checksum": {"name": "sha256", "checksum": "d3801d16f917146b45a4b5b9437679fd2b8e743b4cc0de2e40eb9e559251229b"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_company_enabled', True) and var('hubspot_company_property_history_enabled', True)"}, "created_at": 1786034516.7911446, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) and var('hubspot_company_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the company history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__company_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__company_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_history", "package": null, "version": null}, {"name": "hubspot__company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_sends": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_sends", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_sends.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_sends.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_sends", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_sends"], "alias": "consistency_email_sends", "checksum": {"name": "sha256", "checksum": "a337f157721243971125f34a3e5e201097ae0d4c79949bf61a9a5bc7538c6077"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_sent_enabled', True)"}, "created_at": 1786034516.8002543, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_sent_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email sends end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_sends'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_sends\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_sends'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_sends\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_emails": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_emails", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_emails.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_emails.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_emails", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_emails"], "alias": "consistency_engagement_emails", "checksum": {"name": "sha256", "checksum": "9d1ba40d3c3d017799c50ba07a417427ac9549328c39ae08912828ddb1e5eb03"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_email_enabled', True)"}, "created_at": 1786034516.80945, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_email_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement emails end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_emails'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_emails\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_emails'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_emails\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_emails", "package": null, "version": null}, {"name": "hubspot__engagement_emails", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_contact_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_contact_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_contact_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_contact_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_contact_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_contact_history"], "alias": "consistency_daily_contact_history", "checksum": {"name": "sha256", "checksum": "21e700f32f3be44fae52663a64bdf8db2181a34938a31124a88144ba35439ce3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_contact_property_enabled', True) and var('hubspot_contact_property_history_enabled', True)"}, "created_at": 1786034516.8186233, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_contact_property_enabled', true) and var('hubspot_contact_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the daily contact history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_contact_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_contact_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_contact_history", "package": null, "version": null}, {"name": "hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_deferred": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_deferred", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_deferred.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_deferred.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_deferred", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_deferred"], "alias": "consistency_email_event_deferred", "checksum": {"name": "sha256", "checksum": "2c38fa4f1c2d5b06589bf5e476c3d8ee3f49e1a8736072e873d4f27ab155efb8"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_deferred_enabled', True)"}, "created_at": 1786034516.8277848, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_deferred_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event deferred end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_deferred'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_deferred\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_deferred'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_deferred\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_deferred", "package": null, "version": null}, {"name": "hubspot__email_event_deferred", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_conversations": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_conversations", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_conversations.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_conversations.sql", "unique_id": "test.hubspot_integration_tests.consistency_conversations", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_conversations"], "alias": "consistency_conversations", "checksum": {"name": "sha256", "checksum": "2cb5cdce8ebeac2daffed6a97a065b0ce4e83e61b1a3aef9e85e16e86a418cf3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_conversation_enabled', True)"}, "created_at": 1786034516.8369627, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_conversation_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the conversations end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__conversations'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__conversations\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__conversations'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__conversations\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__conversations", "package": null, "version": null}, {"name": "hubspot__conversations", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contact_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contact_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_contact_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_contact_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_contact_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_contact_history"], "alias": "consistency_contact_history", "checksum": {"name": "sha256", "checksum": "e909c9035533f27a96bd7618fca47b95567bcab2e4509a397da0f5f0bb13f286"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_contact_property_enabled', True) and var('hubspot_contact_property_history_enabled', True)"}, "created_at": 1786034516.845239, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_contact_property_enabled', true) and var('hubspot_contact_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the contact history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__contact_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__contact_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_history", "package": null, "version": null}, {"name": "hubspot__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_notes": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_notes", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_notes.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_notes.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_notes", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_notes"], "alias": "consistency_engagement_notes", "checksum": {"name": "sha256", "checksum": "5607d92de53539217c8808ceaec60d92861c2428424da1b14556985738b5a2ef"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_note_enabled', True)"}, "created_at": 1786034516.85436, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_note_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement notes end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_notes'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_notes\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_notes'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_notes\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_notes", "package": null, "version": null}, {"name": "hubspot__engagement_notes", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contact_list": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contact_list", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_contact_list.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_contact_list.sql", "unique_id": "test.hubspot_integration_tests.consistency_contact_list", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_contact_list"], "alias": "consistency_contact_list", "checksum": {"name": "sha256", "checksum": "63a01aace63748d3f503071677570edb7b9f56aa16699e68376b64b0ef3539f3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_list_enabled', True)"}, "created_at": 1786034516.867884, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_list_enabled', true)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the contact_list end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__contact_lists\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__contact_lists\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_lists", "package": null, "version": null}, {"name": "hubspot__contact_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_ticket_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_ticket_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_ticket_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_ticket_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_ticket_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_ticket_history"], "alias": "consistency_daily_ticket_history", "checksum": {"name": "sha256", "checksum": "76210f2093b10c60a44806b52907c66cc7feb5fc2024d8742c88271d2469c2dd"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', False)"}, "created_at": 1786034516.876554, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', false)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the daily_activity end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_ticket_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_ticket_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_ticket_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_ticket_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_ticket_history", "package": null, "version": null}, {"name": "hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_meetings": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_meetings", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_meetings.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_meetings.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_meetings", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_meetings"], "alias": "consistency_engagement_meetings", "checksum": {"name": "sha256", "checksum": "06862321507c1324b45aadba58f5d6306b9703e94efcb9c57642fa495c79f441"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_meeting_enabled', True)"}, "created_at": 1786034516.8850782, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_meeting_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement meetings end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_meetings'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_meetings\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_meetings'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_meetings\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_meetings", "package": null, "version": null}, {"name": "hubspot__engagement_meetings", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_opens": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_opens", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_opens.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_opens.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_opens", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_opens"], "alias": "consistency_email_event_opens", "checksum": {"name": "sha256", "checksum": "dc8608901ab831d5a4c63b45fe69497db3749f9a792618a659d0cefd13ffc3e3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_open_enabled', True)"}, "created_at": 1786034516.8976104, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_open_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event opens end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_opens'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_opens\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_opens'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_opens\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_opens", "package": null, "version": null}, {"name": "hubspot__email_event_opens", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_clicks": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_clicks", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_clicks.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_clicks.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_clicks", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_clicks"], "alias": "consistency_email_event_clicks", "checksum": {"name": "sha256", "checksum": "bc50885230741583441a4cdf27e0916e49a827ed65b884e4cdb0058e1ada806a"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_click_enabled', True)"}, "created_at": 1786034516.9113057, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_click_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event clicks end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_clicks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_clicks\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_clicks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_clicks\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_clicks", "package": null, "version": null}, {"name": "hubspot__email_event_clicks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_delivered": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_delivered", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_delivered.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_delivered.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_delivered", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_delivered"], "alias": "consistency_email_event_delivered", "checksum": {"name": "sha256", "checksum": "0c9918b749edc3f2f66d58ce9a0c028d1720ad5256d500d396cdb9b3b1168432"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_delivered_enabled', True)"}, "created_at": 1786034516.9205801, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_delivered_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event delivered end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_delivered'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_delivered\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_delivered'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_delivered\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_delivered", "package": null, "version": null}, {"name": "hubspot__email_event_delivered", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_calls": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_calls", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_calls.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_calls.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_calls", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_calls"], "alias": "consistency_engagement_calls", "checksum": {"name": "sha256", "checksum": "0814018622f8dfde68ec199f329c44fdefe3cc167857f380fc5fa96df1d67b1c"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_call_enabled', True)"}, "created_at": 1786034516.9315095, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_call_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement calls end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_calls'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_calls\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_calls'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_calls\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_calls", "package": null, "version": null}, {"name": "hubspot__engagement_calls", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_tickets": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_tickets", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_tickets.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_tickets.sql", "unique_id": "test.hubspot_integration_tests.consistency_tickets", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_tickets"], "alias": "consistency_tickets", "checksum": {"name": "sha256", "checksum": "38e3533ffaa21f6e799b7d035af7a1e386fbcfc003087a4216d09565eddc368d"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', False)"}, "created_at": 1786034516.941032, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', false))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the tickets end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__tickets'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__tickets\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__tickets'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__tickets\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__tickets", "package": null, "version": null}, {"name": "hubspot__tickets", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contact_lists_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contact_lists_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_contact_lists_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_contact_lists_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_contact_lists_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_contact_lists_count"], "alias": "consistency_contact_lists_count", "checksum": {"name": "sha256", "checksum": "a8bc033dbc66e4ad47ad389d02d1319ecd650ee521da704d5b48646ec7d91226"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_list_enabled', True)"}, "created_at": 1786034516.949499, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_list_enabled', true)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__contact_lists\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__contact_lists\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\ncross join dev\nwhere prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_contact_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_contact_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_contact_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_contact_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_contact_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_contact_history_count"], "alias": "consistency_daily_contact_history_count", "checksum": {"name": "sha256", "checksum": "75a922b58c95ac9673f1067bd83e40ac5e99e4aec1fde2cd4a93716945ca97c9"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_contact_property_enabled', True) and var('hubspot_contact_property_history_enabled', True)"}, "created_at": 1786034516.9551687, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_contact_property_enabled', true) and var('hubspot_contact_property_history_enabled', true)\n) }}\n\n-- this test is to make sure the row counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_contact_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_contact_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_ticket_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_ticket_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_ticket_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_ticket_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_ticket_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_ticket_history_count"], "alias": "consistency_daily_ticket_history_count", "checksum": {"name": "sha256", "checksum": "d4b88e92cbbbb4ad9c6b9fb91438ae95ee16e1a6d9544feb778408fbaa2f8c28"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', False)"}, "created_at": 1786034516.9614167, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', false)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_ticket_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_ticket_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_deal_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_deal_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_deal_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_deal_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_deal_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_deal_history_count"], "alias": "consistency_daily_deal_history_count", "checksum": {"name": "sha256", "checksum": "f4e44ac01cf455a25b7fd2ad1923d04ee27b2a0e4a06c58765d58ab7b4d5f713"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_deal_enabled', True) and var('hubspot_deal_property_history_enabled', True)"}, "created_at": 1786034516.9670067, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_deal_property_history_enabled', true)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_deal_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_deal_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_company_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_company_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_company_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_company_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_company_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_company_history_count"], "alias": "consistency_daily_company_history_count", "checksum": {"name": "sha256", "checksum": "620e41da9aeeeeb89c5bed2168b8a294e03be819b6701ee31ac579e35946c7f9"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_company_enabled', True) and var('hubspot_company_property_history_enabled', True)"}, "created_at": 1786034516.9734457, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) and var('hubspot_company_property_history_enabled', true)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_company_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_company_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_company_lists_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_company_lists_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_company_lists_count.sql", "original_file_path": "tests/integrity/integrity_company_lists_count.sql", "unique_id": "test.hubspot_integration_tests.integrity_company_lists_count", "fqn": ["hubspot_integration_tests", "integrity", "integrity_company_lists_count"], "alias": "integrity_company_lists_count", "checksum": {"name": "sha256", "checksum": "d279be0f07a45e2342c940a0bf3dd095605cc2509f2c6b39c0e0990914bd9a17"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_company_list_enabled', True) and var('hubspot_sales_enabled', True)"}, "created_at": 1786034516.9798238, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_company_list_enabled', true) and var('hubspot_sales_enabled', true)\n) }}\n\n-- This test will ensure the total count of records from the company_list staging model matches the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__company_lists') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__company_list') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_lists", "package": null, "version": null}, {"name": "stg_hubspot__company_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_contact_lists_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_contact_lists_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_contact_lists_count.sql", "original_file_path": "tests/integrity/integrity_contact_lists_count.sql", "unique_id": "test.hubspot_integration_tests.integrity_contact_lists_count", "fqn": ["hubspot_integration_tests", "integrity", "integrity_contact_lists_count"], "alias": "integrity_contact_lists_count", "checksum": {"name": "sha256", "checksum": "840adaf10503c371d141224a5d3ff79665dcb3240bae4f0e345f3b405f38e98e"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_list_enabled', True)"}, "created_at": 1786034516.9866126, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_list_enabled', true)\n) }}\n\n-- This test will ensure the total count of records from the contact_list staging model matches the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__contact_lists') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__contact_list') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_lists", "package": null, "version": null}, {"name": "stg_hubspot__contact_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_conversations": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_conversations", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_conversations.sql", "original_file_path": "tests/integrity/integrity_conversations.sql", "unique_id": "test.hubspot_integration_tests.integrity_conversations", "fqn": ["hubspot_integration_tests", "integrity", "integrity_conversations"], "alias": "integrity_conversations", "checksum": {"name": "sha256", "checksum": "3b83cd9b974fe369e7ca63a6ee6d305b9767b6464fc0153e2a6c3d6f9e5e90af"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_conversation_enabled', True)"}, "created_at": 1786034516.9925168, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_conversation_enabled', true)\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__conversations') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__conversation_thread') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__conversations", "package": null, "version": null}, {"name": "stg_hubspot__conversation_thread", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_deals": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_deals", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_deals.sql", "original_file_path": "tests/integrity/integrity_deals.sql", "unique_id": "test.hubspot_integration_tests.integrity_deals", "fqn": ["hubspot_integration_tests", "integrity", "integrity_deals"], "alias": "integrity_deals", "checksum": {"name": "sha256", "checksum": "45433336dbff66976edbb546e632e00e10f5d249fe466d47487dfe935787b345"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "False"}, "created_at": 1786034516.9982407, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=false\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__deals') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__deal') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deals", "package": null, "version": null}, {"name": "stg_hubspot__deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_contacts": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_contacts", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_contacts.sql", "original_file_path": "tests/integrity/integrity_contacts.sql", "unique_id": "test.hubspot_integration_tests.integrity_contacts", "fqn": ["hubspot_integration_tests", "integrity", "integrity_contacts"], "alias": "integrity_contacts", "checksum": {"name": "sha256", "checksum": "3ae2b059a165bb58a8bc7191741624f7e2339772d9881a511b6525617249b80f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_enabled', True)"}, "created_at": 1786034517.0034244, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_enabled', true)\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__contacts') }}\n),\n\nint_model as (\n select count(*) as int_model_rows\n from {{ ref('int_hubspot__contact_merge_adjust') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__contact') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\ncross join int_model\nwhere end_model_rows > staging_model_rows -- changed from = to > becasuse of merges\n or end_model_rows != int_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contacts", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_tickets": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_tickets", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_tickets.sql", "original_file_path": "tests/integrity/integrity_tickets.sql", "unique_id": "test.hubspot_integration_tests.integrity_tickets", "fqn": ["hubspot_integration_tests", "integrity", "integrity_tickets"], "alias": "integrity_tickets", "checksum": {"name": "sha256", "checksum": "b66c6c882c06ff76d6e8647bd0516cf59c4399c44d24fef6571c2ca2c5f4d843"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', True)"}, "created_at": 1786034517.009632, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', true)\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__tickets') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__ticket') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__tickets", "package": null, "version": null}, {"name": "stg_hubspot__ticket", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "seed.hubspot_integration_tests.company_data_snowflake": [{"database": "postgres", "schema": "public", "name": "company_data_snowflake", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data_snowflake.csv", "original_file_path": "seeds/company_data_snowflake.csv", "unique_id": "seed.hubspot_integration_tests.company_data_snowflake", "fqn": ["hubspot_integration_tests", "company_data_snowflake"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "adb19af8584d6645003538159aa71673ae1729dd71ed03b64f5e99bd807c6f1a"}, "config": {"enabled": false, "alias": "company_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "company_data", "enabled": "{{ true if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.2115567, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.company_data": [{"database": "postgres", "schema": "public", "name": "company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data.csv", "original_file_path": "seeds/company_data.csv", "unique_id": "seed.hubspot_integration_tests.company_data", "fqn": ["hubspot_integration_tests", "company_data"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "cdf5ee52f093fe3f6cd4cae26bb84a77cb25d73b845fa0f25dd042eb8fc32b5a"}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "enabled": "{{ true if target.type not in ('postgres','snowflake','databricks') or var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.2702072, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_sent_data": [{"database": "postgres", "schema": "public", "name": "email_event_sent_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_sent_data.csv", "original_file_path": "seeds/email_event_sent_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_sent_data", "fqn": ["hubspot_integration_tests", "email_event_sent_data"], "alias": "email_event_sent_data", "checksum": {"name": "sha256", "checksum": "ee30dbd9f5d7c3682906127212df1b6177a43f16ac7f018f72ab8bfd0f9a7ede"}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "enabled": "{{ true if target.type not in ('snowflake', 'postgres') or var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786034517.2849615, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_dropped_data": [{"database": "postgres", "schema": "public", "name": "email_event_dropped_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_dropped_data.csv", "original_file_path": "seeds/email_event_dropped_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data", "fqn": ["hubspot_integration_tests", "email_event_dropped_data"], "alias": "email_event_dropped_data", "checksum": {"name": "sha256", "checksum": "533c39c745eda4d1b5c61cdb23ce8a635f7c99313bfe64c9f282ab8130866abb"}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "enabled": "{{ true if target.type not in ('snowflake', 'postgres') or var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786034517.3649168, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.company_data_databricks": [{"database": "postgres", "schema": "public", "name": "company_data_databricks", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data_databricks.csv", "original_file_path": "seeds/company_data_databricks.csv", "unique_id": "seed.hubspot_integration_tests.company_data_databricks", "fqn": ["hubspot_integration_tests", "company_data_databricks"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "691f2ba4c793596d6fe600c8e43567abf38a726e400c4be751f693845e0764e2"}, "config": {"enabled": false, "alias": "company_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "company_data", "enabled": "{{ true if target.type in ('databricks','databricks-sql') and not var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786034517.3829002, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_dropped_data_snowflake": [{"database": "postgres", "schema": "public", "name": "email_event_dropped_data_snowflake", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_dropped_data_snowflake.csv", "original_file_path": "seeds/email_event_dropped_data_snowflake.csv", "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data_snowflake", "fqn": ["hubspot_integration_tests", "email_event_dropped_data_snowflake"], "alias": "email_event_dropped_data", "checksum": {"name": "sha256", "checksum": "c76b93930ac4bcd2a6cb4b26b5c8ce021900a19c67d996195aa8e298d365cd3a"}, "config": {"enabled": false, "alias": "email_event_dropped_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "email_event_dropped_data", "enabled": "{{ true if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786034517.4387984, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_sent_data_snowflake": [{"database": "postgres", "schema": "public", "name": "email_event_sent_data_snowflake", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_sent_data_snowflake.csv", "original_file_path": "seeds/email_event_sent_data_snowflake.csv", "unique_id": "seed.hubspot_integration_tests.email_event_sent_data_snowflake", "fqn": ["hubspot_integration_tests", "email_event_sent_data_snowflake"], "alias": "email_event_sent_data", "checksum": {"name": "sha256", "checksum": "89cba14bad6a125b898c0e45a52214590c01bf7422756eab50ea39c68009e5ce"}, "config": {"enabled": false, "alias": "email_event_sent_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type == 'redshift' or var('fivetran_using_source_casing', false) }}", "alias": "email_event_sent_data", "enabled": "{{ true if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786034517.457436, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}]}, "parent_map": {"seed.hubspot_integration_tests.engagement_call_data": [], "seed.hubspot_integration_tests.owner_data": [], "seed.hubspot_integration_tests.engagement_contact_data": [], "seed.hubspot_integration_tests.conversation_channel_data": [], "seed.hubspot_integration_tests.company_list_data": [], "seed.hubspot_integration_tests.contact_list_member_data": [], "seed.hubspot_integration_tests.contact_merge_audit_data": [], "seed.hubspot_integration_tests.company_property_history_data": [], "seed.hubspot_integration_tests.engagement_company_data": [], "seed.hubspot_integration_tests.property_option_data": [], "seed.hubspot_integration_tests.engagement_note_data": [], "seed.hubspot_integration_tests.ticket_engagement_data": [], "seed.hubspot_integration_tests.conversation_inbox_data": [], "seed.hubspot_integration_tests.conversation_channel_account_data": [], "seed.hubspot_integration_tests.email_event_dropped_data_postgres": [], "seed.hubspot_integration_tests.email_event_spam_report_data": [], "seed.hubspot_integration_tests.conversation_actor_data": [], "seed.hubspot_integration_tests.users_data": [], "seed.hubspot_integration_tests.deal_data": [], "seed.hubspot_integration_tests.ticket_company_data": [], "seed.hubspot_integration_tests.marketing_event_participant_data": [], "seed.hubspot_integration_tests.submission_response_data": [], "seed.hubspot_integration_tests.engagement_email_data": [], "seed.hubspot_integration_tests.marketing_event_list_data": [], "seed.hubspot_integration_tests.contact_data": [], "seed.hubspot_integration_tests.deal_contact_data": [], "seed.hubspot_integration_tests.team_data": [], "seed.hubspot_integration_tests.contact_property_history_data": [], "seed.hubspot_integration_tests.email_campaign_data": [], "seed.hubspot_integration_tests.contact_list_data": [], "seed.hubspot_integration_tests.ticket_pipeline_data": [], "seed.hubspot_integration_tests.conversation_message_history_data": [], "seed.hubspot_integration_tests.email_event_delivered_data": [], "seed.hubspot_integration_tests.marketing_event_data": [], "seed.hubspot_integration_tests.company_data_postgres": [], "seed.hubspot_integration_tests.engagement_data": [], "seed.hubspot_integration_tests.role_data": [], "seed.hubspot_integration_tests.company_list_member_data": [], "seed.hubspot_integration_tests.conversation_thread_data": [], "seed.hubspot_integration_tests.deal_stage_data": [], "seed.hubspot_integration_tests.ticket_property_history_data": [], "seed.hubspot_integration_tests.deal_property_history_data": [], "seed.hubspot_integration_tests.ticket_data": [], "seed.hubspot_integration_tests.email_event_open_data": [], "seed.hubspot_integration_tests.property_data": [], "seed.hubspot_integration_tests.email_event_sent_data_postgres": [], "seed.hubspot_integration_tests.email_event_click_data": [], "seed.hubspot_integration_tests.email_event_deferred_data": [], "seed.hubspot_integration_tests.deal_company_data": [], "seed.hubspot_integration_tests.team_user_data": [], "seed.hubspot_integration_tests.deal_pipeline_stage_data": [], "seed.hubspot_integration_tests.owner_team_data": [], "seed.hubspot_integration_tests.engagement_meeting_data": [], "seed.hubspot_integration_tests.deal_pipeline_data": [], "seed.hubspot_integration_tests.email_event_status_change_data": [], "seed.hubspot_integration_tests.engagement_task_data": [], "seed.hubspot_integration_tests.ticket_deal_data": [], "seed.hubspot_integration_tests.engagement_deal_data": [], "seed.hubspot_integration_tests.contact_form_submission_data": [], "seed.hubspot_integration_tests.email_event_bounce_data": [], "seed.hubspot_integration_tests.ticket_pipeline_stage_data": [], "seed.hubspot_integration_tests.email_event_print_data": [], "seed.hubspot_integration_tests.merged_deal_data": [], "seed.hubspot_integration_tests.form_data": [], "seed.hubspot_integration_tests.email_event_forward_data": [], "seed.hubspot_integration_tests.ticket_contact_data": [], "seed.hubspot_integration_tests.engagement_communication_data": [], "seed.hubspot_integration_tests.marketing_event_custom_property_data": [], "seed.hubspot_integration_tests.email_event_data": [], "seed.hubspot_integration_tests.conversation_message_recipient_data": [], "model.hubspot.hubspot__contact_lists": ["model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__email_metrics__by_contact_list", "model.hubspot.stg_hubspot__contact_list"], "model.hubspot.hubspot__email_campaigns": ["model.hubspot.hubspot__email_sends", "model.hubspot.stg_hubspot__email_campaign"], "model.hubspot.hubspot__contacts": ["model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.int_hubspot__engagement_metrics__by_contact", "model.hubspot.int_hubspot__form_metrics__by_contact"], "model.hubspot.hubspot__marketing_event_performance": ["model.hubspot.stg_hubspot__marketing_event", "model.hubspot.stg_hubspot__marketing_event_list", "model.hubspot.stg_hubspot__marketing_event_participant"], "model.hubspot.hubspot__email_sends": ["model.hubspot.hubspot__email_event_sent", "model.hubspot.int_hubspot__email_aggregate_status_change", "model.hubspot.int_hubspot__email_event_aggregates"], "model.hubspot.hubspot__email_event_spam_report": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_spam_report"], "model.hubspot.hubspot__email_event_status_change": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_status_change"], "model.hubspot.hubspot__email_event_dropped": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_dropped"], "model.hubspot.hubspot__email_event_bounce": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_bounce"], "model.hubspot.hubspot__email_event_delivered": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_delivered"], "model.hubspot.hubspot__email_event_forward": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_forward"], "model.hubspot.hubspot__email_event_deferred": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_deferred"], "model.hubspot.hubspot__email_event_clicks": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_click"], "model.hubspot.hubspot__email_event_sent": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_sent"], "model.hubspot.hubspot__email_event_print": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_print"], "model.hubspot.hubspot__email_event_opens": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_open"], "model.hubspot.int_hubspot__contact_merge_adjust": ["model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__contact_merge_audit"], "model.hubspot.int_hubspot__form_metrics__by_contact": ["model.hubspot.stg_hubspot__contact_form_submission", "model.hubspot.stg_hubspot__form", "model.hubspot.stg_hubspot__submission_response"], "model.hubspot.int_hubspot__email_aggregate_status_change": ["model.hubspot.hubspot__email_event_status_change"], "model.hubspot.int_hubspot__email_metrics__by_contact_list": ["model.hubspot.hubspot__email_sends", "model.hubspot.stg_hubspot__contact_list_member"], "model.hubspot.int_hubspot__contact_calendar_spine": ["model.hubspot.stg_hubspot__contact"], "model.hubspot.int_hubspot__daily_email_metrics__by_contact": ["model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__scd_daily_contact_history": ["model.hubspot.int_hubspot__pivot_daily_contact_history"], "model.hubspot.int_hubspot__engagement_metrics__by_contact": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_contact"], "model.hubspot.int_hubspot__pivot_daily_contact_history": ["model.hubspot.int_hubspot__daily_contact_history"], "model.hubspot.int_hubspot__email_event_aggregates": ["model.hubspot.stg_hubspot__email_event"], "model.hubspot.int_hubspot__daily_contact_history": ["model.hubspot.stg_hubspot__contact_property_history"], "model.hubspot.hubspot__contact_history": ["model.hubspot.stg_hubspot__contact_property_history"], "model.hubspot.hubspot__daily_contact_history": ["model.hubspot.int_hubspot__contact_calendar_spine", "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__scd_daily_contact_history", "model.hubspot.stg_hubspot__owner"], "model.hubspot.int_hubspot__owners_enhanced": ["model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__owner_team", "model.hubspot.stg_hubspot__role", "model.hubspot.stg_hubspot__team", "model.hubspot.stg_hubspot__users"], "model.hubspot.hubspot__conversations": ["model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__conversation_actor", "model.hubspot.stg_hubspot__conversation_channel", "model.hubspot.stg_hubspot__conversation_channel_account", "model.hubspot.stg_hubspot__conversation_inbox", "model.hubspot.stg_hubspot__conversation_message_history", "model.hubspot.stg_hubspot__conversation_message_recipient", "model.hubspot.stg_hubspot__conversation_thread", "model.hubspot.stg_hubspot__ticket"], "model.hubspot.hubspot__daily_ticket_history": ["model.hubspot.int_hubspot__scd_daily_ticket_history", "model.hubspot.int_hubspot__ticket_calendar_spine", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage"], "model.hubspot.hubspot__tickets": ["model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__company", "model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__ticket", "model.hubspot.stg_hubspot__ticket_company", "model.hubspot.stg_hubspot__ticket_contact", "model.hubspot.stg_hubspot__ticket_deal", "model.hubspot.stg_hubspot__ticket_engagement", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage"], "model.hubspot.int_hubspot__daily_ticket_history": ["model.hubspot.stg_hubspot__ticket_property_history"], "model.hubspot.int_hubspot__ticket_calendar_spine": ["model.hubspot.stg_hubspot__ticket", "model.hubspot.stg_hubspot__ticket_tmp"], "model.hubspot.int_hubspot__scd_daily_ticket_history": ["model.hubspot.int_hubspot__pivot_daily_ticket_history"], "model.hubspot.int_hubspot__pivot_daily_ticket_history": ["model.hubspot.int_hubspot__daily_ticket_history"], "model.hubspot.hubspot__deal_stages": ["model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__deal_stage"], "model.hubspot.hubspot__companies": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__company", "model.hubspot.stg_hubspot__engagement_company"], "model.hubspot.hubspot__company_lists": ["model.hubspot.int_hubspot__engagement_metrics__by_company_list", "model.hubspot.stg_hubspot__company_list", "model.hubspot.stg_hubspot__company_list_member"], "model.hubspot.hubspot__deals": ["model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.stg_hubspot__engagement_deal"], "model.hubspot.hubspot__engagements": ["model.hubspot.stg_hubspot__engagement", "model.hubspot.stg_hubspot__engagement_company", "model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_deal"], "model.hubspot.hubspot__engagement_meetings": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_meeting"], "model.hubspot.hubspot__engagement_calls": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_call"], "model.hubspot.hubspot__engagement_notes": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_note"], "model.hubspot.hubspot__engagement_communication": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_communication"], "model.hubspot.hubspot__engagement_emails": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_email"], "model.hubspot.hubspot__engagement_tasks": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__daily_deal_history": ["model.hubspot.hubspot__deal_history", "model.hubspot.stg_hubspot__deal_stage"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.stg_hubspot__engagement_deal", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__scd_daily_company_history": ["model.hubspot.int_hubspot__pivot_daily_company_history"], "model.hubspot.int_hubspot__deals_enhanced": ["model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__merged_deal"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_company": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.stg_hubspot__engagement_company", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__scd_daily_deal_history": ["model.hubspot.int_hubspot__pivot_daily_deal_history"], "model.hubspot.int_hubspot__pivot_daily_deal_history": ["model.hubspot.int_hubspot__daily_deal_history"], "model.hubspot.int_hubspot__company_calendar_spine": ["model.hubspot.stg_hubspot__company"], "model.hubspot.int_hubspot__daily_company_history": ["model.hubspot.stg_hubspot__company_property_history"], "model.hubspot.int_hubspot__engagement_metrics__by_company_list": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__company_list_member", "model.hubspot.stg_hubspot__engagement_company"], "model.hubspot.int_hubspot__deal_calendar_spine": ["model.hubspot.stg_hubspot__deal"], "model.hubspot.int_hubspot__pivot_daily_company_history": ["model.hubspot.int_hubspot__daily_company_history"], "model.hubspot.hubspot__deal_history": ["model.hubspot.stg_hubspot__deal_property_history"], "model.hubspot.hubspot__daily_company_history": ["model.hubspot.int_hubspot__company_calendar_spine", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__scd_daily_company_history", "model.hubspot.stg_hubspot__owner"], "model.hubspot.hubspot__daily_deal_history": ["model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "model.hubspot.int_hubspot__deal_calendar_spine", "model.hubspot.int_hubspot__scd_daily_deal_history", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__team"], "model.hubspot.hubspot__company_history": ["model.hubspot.stg_hubspot__company_property_history"], "model.hubspot.stg_hubspot__ticket_pipeline": ["model.hubspot.stg_hubspot__ticket_pipeline_tmp"], "model.hubspot.stg_hubspot__owner": ["model.hubspot.stg_hubspot__owner_tmp"], "model.hubspot.stg_hubspot__engagement_communication": ["model.hubspot.stg_hubspot__engagement_communication_tmp"], "model.hubspot.stg_hubspot__email_event_dropped": ["model.hubspot.stg_hubspot__email_event_dropped_tmp"], "model.hubspot.stg_hubspot__engagement_company": ["model.hubspot.stg_hubspot__engagement_company_tmp"], "model.hubspot.stg_hubspot__email_event_click": ["model.hubspot.stg_hubspot__email_event_click_tmp"], "model.hubspot.stg_hubspot__email_event_delivered": ["model.hubspot.stg_hubspot__email_event_delivered_tmp"], "model.hubspot.stg_hubspot__merged_deal": ["model.hubspot.stg_hubspot__merged_deal_tmp"], "model.hubspot.stg_hubspot__users": ["model.hubspot.stg_hubspot__users_tmp"], "model.hubspot.stg_hubspot__ticket_property_history": ["model.hubspot.stg_hubspot__ticket_property_history_tmp"], "model.hubspot.stg_hubspot__ticket_contact": ["model.hubspot.stg_hubspot__ticket_contact_tmp"], "model.hubspot.stg_hubspot__role": ["model.hubspot.stg_hubspot__role_tmp"], "model.hubspot.stg_hubspot__deal_property_history": ["model.hubspot.stg_hubspot__deal_property_history_tmp"], "model.hubspot.stg_hubspot__company_list": ["model.hubspot.stg_hubspot__company_list_tmp"], "model.hubspot.stg_hubspot__team": ["model.hubspot.stg_hubspot__team_tmp"], "model.hubspot.stg_hubspot__property_option": ["model.hubspot.stg_hubspot__property_option_tmp"], "model.hubspot.stg_hubspot__deal_contact": ["model.hubspot.stg_hubspot__deal_contact_tmp"], "model.hubspot.stg_hubspot__company": ["model.hubspot.stg_hubspot__company_tmp"], "model.hubspot.stg_hubspot__ticket": ["model.hubspot.stg_hubspot__ticket_tmp"], "model.hubspot.stg_hubspot__contact_list": ["model.hubspot.stg_hubspot__contact_list_tmp"], "model.hubspot.stg_hubspot__email_event_spam_report": ["model.hubspot.stg_hubspot__email_event_spam_report_tmp"], "model.hubspot.stg_hubspot__engagement_meeting": ["model.hubspot.stg_hubspot__engagement_meeting_tmp"], "model.hubspot.stg_hubspot__contact_form_submission": ["model.hubspot.stg_hubspot__contact_form_submission_tmp"], "model.hubspot.stg_hubspot__deal_stage": ["model.hubspot.stg_hubspot__deal_stage_tmp"], "model.hubspot.stg_hubspot__email_event": ["model.hubspot.stg_hubspot__email_event_tmp"], "model.hubspot.stg_hubspot__conversation_channel": ["model.hubspot.stg_hubspot__conversation_channel_tmp"], "model.hubspot.stg_hubspot__engagement_deal": ["model.hubspot.stg_hubspot__engagement_deal_tmp"], "model.hubspot.stg_hubspot__company_list_member": ["model.hubspot.stg_hubspot__company_list_member_tmp"], "model.hubspot.stg_hubspot__email_event_bounce": ["model.hubspot.stg_hubspot__email_event_bounce_tmp"], "model.hubspot.stg_hubspot__engagement_task": ["model.hubspot.stg_hubspot__engagement_task_tmp"], "model.hubspot.stg_hubspot__marketing_event_list": ["model.hubspot.stg_hubspot__marketing_event_list_tmp"], "model.hubspot.stg_hubspot__engagement_email": ["model.hubspot.stg_hubspot__engagement_email_tmp"], "model.hubspot.stg_hubspot__form": ["model.hubspot.stg_hubspot__form_tmp"], "model.hubspot.stg_hubspot__ticket_deal": ["model.hubspot.stg_hubspot__ticket_deal_tmp"], "model.hubspot.stg_hubspot__contact_property_history": ["model.hubspot.stg_hubspot__contact_property_history_tmp"], "model.hubspot.stg_hubspot__email_event_forward": ["model.hubspot.stg_hubspot__email_event_forward_tmp"], "model.hubspot.stg_hubspot__conversation_thread": ["model.hubspot.stg_hubspot__conversation_thread_tmp"], "model.hubspot.stg_hubspot__email_event_deferred": ["model.hubspot.stg_hubspot__email_event_deferred_tmp"], "model.hubspot.stg_hubspot__email_event_open": ["model.hubspot.stg_hubspot__email_event_open_tmp"], "model.hubspot.stg_hubspot__conversation_message_recipient": ["model.hubspot.stg_hubspot__conversation_message_recipient_tmp"], "model.hubspot.stg_hubspot__marketing_event_participant": ["model.hubspot.stg_hubspot__marketing_event_participant_tmp"], "model.hubspot.stg_hubspot__email_event_sent": ["model.hubspot.stg_hubspot__email_event_sent_tmp"], "model.hubspot.stg_hubspot__marketing_event_custom_property": ["model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"], "model.hubspot.stg_hubspot__conversation_message_history": ["model.hubspot.stg_hubspot__conversation_message_history_tmp"], "model.hubspot.stg_hubspot__deal_pipeline_stage": ["model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"], "model.hubspot.stg_hubspot__engagement": ["model.hubspot.stg_hubspot__engagement_tmp"], "model.hubspot.stg_hubspot__owner_team": ["model.hubspot.stg_hubspot__owner_team_tmp"], "model.hubspot.stg_hubspot__deal_pipeline": ["model.hubspot.stg_hubspot__deal_pipeline_tmp"], "model.hubspot.stg_hubspot__conversation_channel_account": ["model.hubspot.stg_hubspot__conversation_channel_account_tmp"], "model.hubspot.stg_hubspot__company_property_history": ["model.hubspot.stg_hubspot__company_property_history_tmp"], "model.hubspot.stg_hubspot__marketing_event": ["model.hubspot.stg_hubspot__marketing_event_tmp"], "model.hubspot.stg_hubspot__contact_merge_audit": ["model.hubspot.stg_hubspot__contact_merge_audit_tmp"], "model.hubspot.stg_hubspot__deal": ["model.hubspot.stg_hubspot__deal_tmp"], "model.hubspot.stg_hubspot__email_campaign": ["model.hubspot.stg_hubspot__email_campaign_tmp"], "model.hubspot.stg_hubspot__engagement_contact": ["model.hubspot.stg_hubspot__engagement_contact_tmp"], "model.hubspot.stg_hubspot__team_user": ["model.hubspot.stg_hubspot__team_user_tmp"], "model.hubspot.stg_hubspot__email_event_status_change": ["model.hubspot.stg_hubspot__email_event_status_change_tmp"], "model.hubspot.stg_hubspot__ticket_pipeline_stage": ["model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"], "model.hubspot.stg_hubspot__conversation_actor": ["model.hubspot.stg_hubspot__conversation_actor_tmp"], "model.hubspot.stg_hubspot__contact_list_member": ["model.hubspot.stg_hubspot__contact_list_member_tmp"], "model.hubspot.stg_hubspot__engagement_note": ["model.hubspot.stg_hubspot__engagement_note_tmp"], "model.hubspot.stg_hubspot__engagement_call": ["model.hubspot.stg_hubspot__engagement_call_tmp"], "model.hubspot.stg_hubspot__submission_response": ["model.hubspot.stg_hubspot__submission_response_tmp"], "model.hubspot.stg_hubspot__property": ["model.hubspot.stg_hubspot__property_tmp"], "model.hubspot.stg_hubspot__ticket_engagement": ["model.hubspot.stg_hubspot__ticket_engagement_tmp"], "model.hubspot.stg_hubspot__conversation_inbox": ["model.hubspot.stg_hubspot__conversation_inbox_tmp"], "model.hubspot.stg_hubspot__contact": ["model.hubspot.stg_hubspot__contact_tmp"], "model.hubspot.stg_hubspot__email_event_print": ["model.hubspot.stg_hubspot__email_event_print_tmp"], "model.hubspot.stg_hubspot__deal_company": ["model.hubspot.stg_hubspot__deal_company_tmp"], "model.hubspot.stg_hubspot__ticket_company": ["model.hubspot.stg_hubspot__ticket_company_tmp"], "model.hubspot.stg_hubspot__engagement_deal_tmp": ["source.hubspot.hubspot.engagement_deal"], "model.hubspot.stg_hubspot__email_event_print_tmp": ["source.hubspot.hubspot.email_event_print"], "model.hubspot.stg_hubspot__engagement_communication_tmp": ["source.hubspot.hubspot.engagement_communication"], "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": ["source.hubspot.hubspot.ticket_pipeline_stage"], "model.hubspot.stg_hubspot__engagement_email_tmp": ["source.hubspot.hubspot.engagement_email"], "model.hubspot.stg_hubspot__engagement_tmp": ["source.hubspot.hubspot.engagement"], "model.hubspot.stg_hubspot__email_event_click_tmp": ["source.hubspot.hubspot.email_event_click"], "model.hubspot.stg_hubspot__company_property_history_tmp": ["source.hubspot.hubspot.company_property_history"], "model.hubspot.stg_hubspot__conversation_thread_tmp": ["source.hubspot.hubspot.conversation_thread"], "model.hubspot.stg_hubspot__marketing_event_list_tmp": ["source.hubspot.hubspot.marketing_event_list"], "model.hubspot.stg_hubspot__deal_pipeline_tmp": ["source.hubspot.hubspot.deal_pipeline"], "model.hubspot.stg_hubspot__merged_deal_tmp": ["source.hubspot.hubspot.merged_deal"], "model.hubspot.stg_hubspot__conversation_channel_account_tmp": ["source.hubspot.hubspot.conversation_channel_account"], "model.hubspot.stg_hubspot__deal_contact_tmp": ["source.hubspot.hubspot.deal_contact"], "model.hubspot.stg_hubspot__deal_company_tmp": ["source.hubspot.hubspot.deal_company"], "model.hubspot.stg_hubspot__role_tmp": ["source.hubspot.hubspot.role"], "model.hubspot.stg_hubspot__marketing_event_participant_tmp": ["source.hubspot.hubspot.marketing_event_participant"], "model.hubspot.stg_hubspot__ticket_engagement_tmp": ["source.hubspot.hubspot.ticket_engagement"], "model.hubspot.stg_hubspot__contact_form_submission_tmp": ["source.hubspot.hubspot.contact_form_submission"], "model.hubspot.stg_hubspot__marketing_event_tmp": ["source.hubspot.hubspot.marketing_event"], "model.hubspot.stg_hubspot__conversation_message_history_tmp": ["source.hubspot.hubspot.conversation_message_history"], "model.hubspot.stg_hubspot__engagement_call_tmp": ["source.hubspot.hubspot.engagement_call"], "model.hubspot.stg_hubspot__ticket_deal_tmp": ["source.hubspot.hubspot.ticket_deal"], "model.hubspot.stg_hubspot__company_list_member_tmp": ["source.hubspot.hubspot.company_list_member"], "model.hubspot.stg_hubspot__engagement_note_tmp": ["source.hubspot.hubspot.engagement_note"], "model.hubspot.stg_hubspot__conversation_inbox_tmp": ["source.hubspot.hubspot.conversation_inbox"], "model.hubspot.stg_hubspot__ticket_contact_tmp": ["source.hubspot.hubspot.ticket_contact"], "model.hubspot.stg_hubspot__ticket_pipeline_tmp": ["source.hubspot.hubspot.ticket_pipeline"], "model.hubspot.stg_hubspot__email_event_open_tmp": ["source.hubspot.hubspot.email_event_open"], "model.hubspot.stg_hubspot__company_tmp": ["source.hubspot.hubspot.company"], "model.hubspot.stg_hubspot__deal_stage_tmp": ["source.hubspot.hubspot.deal_stage"], "model.hubspot.stg_hubspot__deal_tmp": ["source.hubspot.hubspot.deal"], "model.hubspot.stg_hubspot__conversation_channel_tmp": ["source.hubspot.hubspot.conversation_channel"], "model.hubspot.stg_hubspot__email_event_delivered_tmp": ["source.hubspot.hubspot.email_event_delivered"], "model.hubspot.stg_hubspot__property_option_tmp": ["source.hubspot.hubspot.property_option"], "model.hubspot.stg_hubspot__email_event_sent_tmp": ["source.hubspot.hubspot.email_event_sent"], "model.hubspot.stg_hubspot__property_tmp": ["source.hubspot.hubspot.property"], "model.hubspot.stg_hubspot__ticket_tmp": ["source.hubspot.hubspot.ticket"], "model.hubspot.stg_hubspot__engagement_meeting_tmp": ["source.hubspot.hubspot.engagement_meeting"], "model.hubspot.stg_hubspot__email_event_deferred_tmp": ["source.hubspot.hubspot.email_event_deferred"], "model.hubspot.stg_hubspot__contact_property_history_tmp": ["source.hubspot.hubspot.contact_property_history"], "model.hubspot.stg_hubspot__ticket_company_tmp": ["source.hubspot.hubspot.ticket_company"], "model.hubspot.stg_hubspot__email_event_status_change_tmp": ["source.hubspot.hubspot.email_event_status_change"], "model.hubspot.stg_hubspot__contact_merge_audit_tmp": ["source.hubspot.hubspot.contact_merge_audit"], "model.hubspot.stg_hubspot__contact_list_tmp": ["source.hubspot.hubspot.contact_list"], "model.hubspot.stg_hubspot__conversation_actor_tmp": ["source.hubspot.hubspot.conversation_actor"], "model.hubspot.stg_hubspot__email_event_tmp": ["source.hubspot.hubspot.email_event"], "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": ["source.hubspot.hubspot.deal_pipeline_stage"], "model.hubspot.stg_hubspot__email_campaign_tmp": ["source.hubspot.hubspot.email_campaign"], "model.hubspot.stg_hubspot__team_user_tmp": ["source.hubspot.hubspot.team_user"], "model.hubspot.stg_hubspot__engagement_company_tmp": ["source.hubspot.hubspot.engagement_company"], "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": ["source.hubspot.hubspot.marketing_event_custom_property"], "model.hubspot.stg_hubspot__owner_team_tmp": ["source.hubspot.hubspot.owner_team"], "model.hubspot.stg_hubspot__email_event_forward_tmp": ["source.hubspot.hubspot.email_event_forward"], "model.hubspot.stg_hubspot__email_event_dropped_tmp": ["source.hubspot.hubspot.email_event_dropped"], "model.hubspot.stg_hubspot__team_tmp": ["source.hubspot.hubspot.team"], "model.hubspot.stg_hubspot__users_tmp": ["source.hubspot.hubspot.users"], "model.hubspot.stg_hubspot__engagement_task_tmp": ["source.hubspot.hubspot.engagement_task"], "model.hubspot.stg_hubspot__contact_tmp": ["source.hubspot.hubspot.contact"], "model.hubspot.stg_hubspot__submission_response_tmp": ["source.hubspot.hubspot.submission_response"], "model.hubspot.stg_hubspot__ticket_property_history_tmp": ["source.hubspot.hubspot.ticket_property_history"], "model.hubspot.stg_hubspot__email_event_bounce_tmp": ["source.hubspot.hubspot.email_event_bounce"], "model.hubspot.stg_hubspot__contact_list_member_tmp": ["source.hubspot.hubspot.contact_list_member"], "model.hubspot.stg_hubspot__company_list_tmp": ["source.hubspot.hubspot.company_list"], "model.hubspot.stg_hubspot__email_event_spam_report_tmp": ["source.hubspot.hubspot.email_event_spam_report"], "model.hubspot.stg_hubspot__deal_property_history_tmp": ["source.hubspot.hubspot.deal_property_history"], "model.hubspot.stg_hubspot__form_tmp": ["source.hubspot.hubspot.form"], "model.hubspot.stg_hubspot__engagement_contact_tmp": ["source.hubspot.hubspot.engagement_contact"], "model.hubspot.stg_hubspot__owner_tmp": ["source.hubspot.hubspot.owner"], "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": ["source.hubspot.hubspot.conversation_message_recipient"], "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb": ["model.hubspot.hubspot__marketing_event_performance"], "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712": ["model.hubspot.hubspot__marketing_event_performance"], "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3": ["model.hubspot.hubspot__email_sends"], "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0": ["model.hubspot.hubspot__email_campaigns"], "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3": ["model.hubspot.hubspot__contacts"], "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891": ["model.hubspot.hubspot__contact_lists"], "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5": ["model.hubspot.hubspot__email_event_bounce"], "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0": ["model.hubspot.hubspot__email_event_clicks"], "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91": ["model.hubspot.hubspot__email_event_deferred"], "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3": ["model.hubspot.hubspot__email_event_delivered"], "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95": ["model.hubspot.hubspot__email_event_dropped"], "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08": ["model.hubspot.hubspot__email_event_forward"], "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1": ["model.hubspot.hubspot__email_event_opens"], "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e": ["model.hubspot.hubspot__email_event_print"], "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9": ["model.hubspot.hubspot__email_event_sent"], "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a": ["model.hubspot.hubspot__email_event_spam_report"], "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3": ["model.hubspot.hubspot__email_event_status_change"], "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a": ["model.hubspot.int_hubspot__email_aggregate_status_change"], "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111": ["model.hubspot.int_hubspot__email_aggregate_status_change"], "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2": ["model.hubspot.int_hubspot__email_metrics__by_contact_list"], "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a": ["model.hubspot.int_hubspot__email_event_aggregates"], "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b": ["model.hubspot.int_hubspot__engagement_metrics__by_contact"], "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba": ["model.hubspot.hubspot__daily_contact_history"], "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d": ["model.hubspot.hubspot__daily_contact_history"], "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec": ["model.hubspot.hubspot__contact_history"], "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088": ["model.hubspot.hubspot__contact_history"], "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c": ["model.hubspot.hubspot__daily_ticket_history"], "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e": ["model.hubspot.hubspot__daily_ticket_history"], "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7": ["model.hubspot.hubspot__tickets"], "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084": ["model.hubspot.hubspot__conversations"], "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f": ["model.hubspot.hubspot__company_lists"], "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd": ["model.hubspot.hubspot__deals"], "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b": ["model.hubspot.hubspot__deal_stages"], "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97": ["model.hubspot.hubspot__companies"], "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7": ["model.hubspot.hubspot__engagements"], "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f": ["model.hubspot.hubspot__engagement_calls"], "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095": ["model.hubspot.hubspot__engagement_communication"], "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09": ["model.hubspot.hubspot__engagement_emails"], "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df": ["model.hubspot.hubspot__engagement_meetings"], "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965": ["model.hubspot.hubspot__engagement_notes"], "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae": ["model.hubspot.hubspot__engagement_tasks"], "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8": ["model.hubspot.hubspot__daily_deal_history"], "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256": ["model.hubspot.hubspot__daily_deal_history"], "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe": ["model.hubspot.hubspot__daily_company_history"], "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794": ["model.hubspot.hubspot__daily_company_history"], "test.hubspot.unique_hubspot__company_history_id.f1af964b1f": ["model.hubspot.hubspot__company_history"], "test.hubspot.not_null_hubspot__company_history_id.33035793ff": ["model.hubspot.hubspot__company_history"], "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79": ["model.hubspot.hubspot__deal_history"], "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75": ["model.hubspot.hubspot__deal_history"], "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65": ["model.hubspot.stg_hubspot__form"], "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7": ["model.hubspot.stg_hubspot__submission_response"], "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3": ["model.hubspot.stg_hubspot__email_event_bounce"], "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5": ["model.hubspot.stg_hubspot__email_event_click"], "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0": ["model.hubspot.stg_hubspot__email_event_deferred"], "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20": ["model.hubspot.stg_hubspot__email_event_delivered"], "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52": ["model.hubspot.stg_hubspot__email_event_dropped"], "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3": ["model.hubspot.stg_hubspot__email_event_forward"], "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16": ["model.hubspot.stg_hubspot__email_event_open"], "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b": ["model.hubspot.stg_hubspot__email_event_print"], "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d": ["model.hubspot.stg_hubspot__email_event_sent"], "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f": ["model.hubspot.stg_hubspot__email_event_spam_report"], "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1": ["model.hubspot.stg_hubspot__email_event_status_change"], "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531": ["model.hubspot.stg_hubspot__email_event"], "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6": ["model.hubspot.stg_hubspot__email_campaign"], "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a": ["model.hubspot.stg_hubspot__contact_list"], "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944": ["model.hubspot.stg_hubspot__contact"], "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf": ["model.hubspot.stg_hubspot__engagement_call"], "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b": ["model.hubspot.stg_hubspot__engagement_communication"], "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca": ["model.hubspot.stg_hubspot__engagement_email"], "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28": ["model.hubspot.stg_hubspot__engagement_meeting"], "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e": ["model.hubspot.stg_hubspot__engagement_note"], "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82": ["model.hubspot.stg_hubspot__engagement_task"], "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f": ["model.hubspot.stg_hubspot__engagement"], "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3": ["model.hubspot.stg_hubspot__company_list"], "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43": ["model.hubspot.stg_hubspot__company"], "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0": ["model.hubspot.stg_hubspot__marketing_event"], "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a": ["model.hubspot.stg_hubspot__marketing_event_list"], "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b": ["model.hubspot.stg_hubspot__marketing_event_participant"], "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea": ["model.hubspot.stg_hubspot__conversation_actor"], "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b": ["model.hubspot.stg_hubspot__conversation_inbox"], "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf": ["model.hubspot.stg_hubspot__conversation_channel"], "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb": ["model.hubspot.stg_hubspot__conversation_channel_account"], "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398": ["model.hubspot.stg_hubspot__conversation_thread"], "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e": ["model.hubspot.stg_hubspot__conversation_message_history"], "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b": ["model.hubspot.stg_hubspot__conversation_message_recipient"], "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53": ["model.hubspot.stg_hubspot__ticket"], "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e": ["model.hubspot.stg_hubspot__deal_pipeline_stage"], "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3": ["model.hubspot.stg_hubspot__deal_pipeline"], "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20": ["model.hubspot.stg_hubspot__deal"], "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9": ["model.hubspot.stg_hubspot__merged_deal"], "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610": ["model.hubspot.stg_hubspot__merged_deal"], "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95": ["model.hubspot.stg_hubspot__role"], "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759": ["model.hubspot.stg_hubspot__team"], "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a": ["model.hubspot.stg_hubspot__users"], "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4": ["model.hubspot.stg_hubspot__owner"], "source.hubspot.hubspot.calendar_event": [], "source.hubspot.hubspot.company": [], "source.hubspot.hubspot.company_list": [], "source.hubspot.hubspot.company_list_member": [], "source.hubspot.hubspot.company_property_history": [], "source.hubspot.hubspot.contact_merge_audit": [], "source.hubspot.hubspot.contact": [], "source.hubspot.hubspot.contact_form_submission": [], "source.hubspot.hubspot.contact_list": [], "source.hubspot.hubspot.contact_list_member": [], "source.hubspot.hubspot.contact_property_history": [], "source.hubspot.hubspot.deal": [], "source.hubspot.hubspot.deal_stage": [], "source.hubspot.hubspot.deal_company": [], "source.hubspot.hubspot.deal_contact": [], "source.hubspot.hubspot.deal_pipeline": [], "source.hubspot.hubspot.deal_pipeline_stage": [], "source.hubspot.hubspot.deal_property_history": [], "source.hubspot.hubspot.email_campaign": [], "source.hubspot.hubspot.email_event": [], "source.hubspot.hubspot.email_event_bounce": [], "source.hubspot.hubspot.email_event_click": [], "source.hubspot.hubspot.email_event_deferred": [], "source.hubspot.hubspot.email_event_delivered": [], "source.hubspot.hubspot.email_event_dropped": [], "source.hubspot.hubspot.email_event_forward": [], "source.hubspot.hubspot.email_event_open": [], "source.hubspot.hubspot.email_event_print": [], "source.hubspot.hubspot.email_event_sent": [], "source.hubspot.hubspot.email_event_spam_report": [], "source.hubspot.hubspot.email_event_status_change": [], "source.hubspot.hubspot.email_subscription": [], "source.hubspot.hubspot.email_subscription_change": [], "source.hubspot.hubspot.engagement": [], "source.hubspot.hubspot.engagement_call": [], "source.hubspot.hubspot.engagement_communication": [], "source.hubspot.hubspot.engagement_company": [], "source.hubspot.hubspot.engagement_contact": [], "source.hubspot.hubspot.engagement_deal": [], "source.hubspot.hubspot.engagement_email": [], "source.hubspot.hubspot.engagement_email_cc": [], "source.hubspot.hubspot.engagement_email_to": [], "source.hubspot.hubspot.engagement_meeting": [], "source.hubspot.hubspot.engagement_note": [], "source.hubspot.hubspot.engagement_task": [], "source.hubspot.hubspot.form": [], "source.hubspot.hubspot.submission_response": [], "source.hubspot.hubspot.owner": [], "source.hubspot.hubspot.property": [], "source.hubspot.hubspot.property_option": [], "source.hubspot.hubspot.ticket_company": [], "source.hubspot.hubspot.ticket_contact": [], "source.hubspot.hubspot.ticket_deal": [], "source.hubspot.hubspot.ticket_engagement": [], "source.hubspot.hubspot.ticket_pipeline_stage": [], "source.hubspot.hubspot.ticket_pipeline": [], "source.hubspot.hubspot.ticket_property_history": [], "source.hubspot.hubspot.ticket": [], "source.hubspot.hubspot.merged_deal": [], "source.hubspot.hubspot.owner_team": [], "source.hubspot.hubspot.role": [], "source.hubspot.hubspot.team": [], "source.hubspot.hubspot.team_user": [], "source.hubspot.hubspot.users": [], "source.hubspot.hubspot.conversation_actor": [], "source.hubspot.hubspot.conversation_inbox": [], "source.hubspot.hubspot.conversation_channel": [], "source.hubspot.hubspot.conversation_channel_account": [], "source.hubspot.hubspot.conversation_thread": [], "source.hubspot.hubspot.conversation_message_history": [], "source.hubspot.hubspot.marketing_event": [], "source.hubspot.hubspot.marketing_event_list": [], "source.hubspot.hubspot.marketing_event_participant": [], "source.hubspot.hubspot.marketing_event_custom_property": [], "source.hubspot.hubspot.conversation_message_recipient": []}, "child_map": {"seed.hubspot_integration_tests.engagement_call_data": [], "seed.hubspot_integration_tests.owner_data": [], "seed.hubspot_integration_tests.engagement_contact_data": [], "seed.hubspot_integration_tests.conversation_channel_data": [], "seed.hubspot_integration_tests.company_list_data": [], "seed.hubspot_integration_tests.contact_list_member_data": [], "seed.hubspot_integration_tests.contact_merge_audit_data": [], "seed.hubspot_integration_tests.company_property_history_data": [], "seed.hubspot_integration_tests.engagement_company_data": [], "seed.hubspot_integration_tests.property_option_data": [], "seed.hubspot_integration_tests.engagement_note_data": [], "seed.hubspot_integration_tests.ticket_engagement_data": [], "seed.hubspot_integration_tests.conversation_inbox_data": [], "seed.hubspot_integration_tests.conversation_channel_account_data": [], "seed.hubspot_integration_tests.email_event_dropped_data_postgres": [], "seed.hubspot_integration_tests.email_event_spam_report_data": [], "seed.hubspot_integration_tests.conversation_actor_data": [], "seed.hubspot_integration_tests.users_data": [], "seed.hubspot_integration_tests.deal_data": [], "seed.hubspot_integration_tests.ticket_company_data": [], "seed.hubspot_integration_tests.marketing_event_participant_data": [], "seed.hubspot_integration_tests.submission_response_data": [], "seed.hubspot_integration_tests.engagement_email_data": [], "seed.hubspot_integration_tests.marketing_event_list_data": [], "seed.hubspot_integration_tests.contact_data": [], "seed.hubspot_integration_tests.deal_contact_data": [], "seed.hubspot_integration_tests.team_data": [], "seed.hubspot_integration_tests.contact_property_history_data": [], "seed.hubspot_integration_tests.email_campaign_data": [], "seed.hubspot_integration_tests.contact_list_data": [], "seed.hubspot_integration_tests.ticket_pipeline_data": [], "seed.hubspot_integration_tests.conversation_message_history_data": [], "seed.hubspot_integration_tests.email_event_delivered_data": [], "seed.hubspot_integration_tests.marketing_event_data": [], "seed.hubspot_integration_tests.company_data_postgres": [], "seed.hubspot_integration_tests.engagement_data": [], "seed.hubspot_integration_tests.role_data": [], "seed.hubspot_integration_tests.company_list_member_data": [], "seed.hubspot_integration_tests.conversation_thread_data": [], "seed.hubspot_integration_tests.deal_stage_data": [], "seed.hubspot_integration_tests.ticket_property_history_data": [], "seed.hubspot_integration_tests.deal_property_history_data": [], "seed.hubspot_integration_tests.ticket_data": [], "seed.hubspot_integration_tests.email_event_open_data": [], "seed.hubspot_integration_tests.property_data": [], "seed.hubspot_integration_tests.email_event_sent_data_postgres": [], "seed.hubspot_integration_tests.email_event_click_data": [], "seed.hubspot_integration_tests.email_event_deferred_data": [], "seed.hubspot_integration_tests.deal_company_data": [], "seed.hubspot_integration_tests.team_user_data": [], "seed.hubspot_integration_tests.deal_pipeline_stage_data": [], "seed.hubspot_integration_tests.owner_team_data": [], "seed.hubspot_integration_tests.engagement_meeting_data": [], "seed.hubspot_integration_tests.deal_pipeline_data": [], "seed.hubspot_integration_tests.email_event_status_change_data": [], "seed.hubspot_integration_tests.engagement_task_data": [], "seed.hubspot_integration_tests.ticket_deal_data": [], "seed.hubspot_integration_tests.engagement_deal_data": [], "seed.hubspot_integration_tests.contact_form_submission_data": [], "seed.hubspot_integration_tests.email_event_bounce_data": [], "seed.hubspot_integration_tests.ticket_pipeline_stage_data": [], "seed.hubspot_integration_tests.email_event_print_data": [], "seed.hubspot_integration_tests.merged_deal_data": [], "seed.hubspot_integration_tests.form_data": [], "seed.hubspot_integration_tests.email_event_forward_data": [], "seed.hubspot_integration_tests.ticket_contact_data": [], "seed.hubspot_integration_tests.engagement_communication_data": [], "seed.hubspot_integration_tests.marketing_event_custom_property_data": [], "seed.hubspot_integration_tests.email_event_data": [], "seed.hubspot_integration_tests.conversation_message_recipient_data": [], "model.hubspot.hubspot__contact_lists": ["test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891"], "model.hubspot.hubspot__email_campaigns": ["test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0"], "model.hubspot.hubspot__contacts": ["test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3"], "model.hubspot.hubspot__marketing_event_performance": ["test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb", "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712"], "model.hubspot.hubspot__email_sends": ["model.hubspot.hubspot__contact_lists", "model.hubspot.hubspot__contacts", "model.hubspot.hubspot__email_campaigns", "model.hubspot.int_hubspot__email_metrics__by_contact_list", "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3"], "model.hubspot.hubspot__email_event_spam_report": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a"], "model.hubspot.hubspot__email_event_status_change": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "model.hubspot.int_hubspot__email_aggregate_status_change", "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3"], "model.hubspot.hubspot__email_event_dropped": ["test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95"], "model.hubspot.hubspot__email_event_bounce": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5"], "model.hubspot.hubspot__email_event_delivered": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3"], "model.hubspot.hubspot__email_event_forward": ["test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08"], "model.hubspot.hubspot__email_event_deferred": ["test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91"], "model.hubspot.hubspot__email_event_clicks": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0"], "model.hubspot.hubspot__email_event_sent": ["model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9"], "model.hubspot.hubspot__email_event_print": ["test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e"], "model.hubspot.hubspot__email_event_opens": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1"], "model.hubspot.int_hubspot__contact_merge_adjust": ["model.hubspot.hubspot__contacts", "model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_deferred", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_dropped", "model.hubspot.hubspot__email_event_forward", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_print", "model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change"], "model.hubspot.int_hubspot__form_metrics__by_contact": ["model.hubspot.hubspot__contacts"], "model.hubspot.int_hubspot__email_aggregate_status_change": ["model.hubspot.hubspot__email_sends", "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111", "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a"], "model.hubspot.int_hubspot__email_metrics__by_contact_list": ["model.hubspot.hubspot__contact_lists", "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2"], "model.hubspot.int_hubspot__contact_calendar_spine": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__daily_email_metrics__by_contact": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__scd_daily_contact_history": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__engagement_metrics__by_contact": ["model.hubspot.hubspot__contacts", "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b"], "model.hubspot.int_hubspot__pivot_daily_contact_history": ["model.hubspot.int_hubspot__scd_daily_contact_history"], "model.hubspot.int_hubspot__email_event_aggregates": ["model.hubspot.hubspot__email_sends", "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a"], "model.hubspot.int_hubspot__daily_contact_history": ["model.hubspot.int_hubspot__pivot_daily_contact_history"], "model.hubspot.hubspot__contact_history": ["test.hubspot.not_null_hubspot__contact_history_id.eaae22e088", "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec"], "model.hubspot.hubspot__daily_contact_history": ["test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d", "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba"], "model.hubspot.int_hubspot__owners_enhanced": ["model.hubspot.hubspot__conversations", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__deals_enhanced"], "model.hubspot.hubspot__conversations": ["test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084"], "model.hubspot.hubspot__daily_ticket_history": ["test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e", "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c"], "model.hubspot.hubspot__tickets": ["test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7"], "model.hubspot.int_hubspot__daily_ticket_history": ["model.hubspot.int_hubspot__pivot_daily_ticket_history"], "model.hubspot.int_hubspot__ticket_calendar_spine": ["model.hubspot.hubspot__daily_ticket_history"], "model.hubspot.int_hubspot__scd_daily_ticket_history": ["model.hubspot.hubspot__daily_ticket_history"], "model.hubspot.int_hubspot__pivot_daily_ticket_history": ["model.hubspot.int_hubspot__scd_daily_ticket_history"], "model.hubspot.hubspot__deal_stages": ["test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b"], "model.hubspot.hubspot__companies": ["test.hubspot.not_null_hubspot__companies_company_id.687ec98e97"], "model.hubspot.hubspot__company_lists": ["test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f"], "model.hubspot.hubspot__deals": ["test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd"], "model.hubspot.hubspot__engagements": ["model.hubspot.hubspot__companies", "model.hubspot.hubspot__deals", "model.hubspot.hubspot__engagement_calls", "model.hubspot.hubspot__engagement_communication", "model.hubspot.hubspot__engagement_emails", "model.hubspot.hubspot__engagement_meetings", "model.hubspot.hubspot__engagement_notes", "model.hubspot.hubspot__engagement_tasks", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "model.hubspot.int_hubspot__engagement_metrics__by_contact", "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7"], "model.hubspot.hubspot__engagement_meetings": ["test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df"], "model.hubspot.hubspot__engagement_calls": ["test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f"], "model.hubspot.hubspot__engagement_notes": ["test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965"], "model.hubspot.hubspot__engagement_communication": ["test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095"], "model.hubspot.hubspot__engagement_emails": ["test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09"], "model.hubspot.hubspot__engagement_tasks": ["test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae"], "model.hubspot.int_hubspot__daily_deal_history": ["model.hubspot.int_hubspot__pivot_daily_deal_history"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal": ["model.hubspot.hubspot__daily_deal_history"], "model.hubspot.int_hubspot__scd_daily_company_history": ["model.hubspot.hubspot__daily_company_history"], "model.hubspot.int_hubspot__deals_enhanced": ["model.hubspot.hubspot__deal_stages", "model.hubspot.hubspot__deals"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_company": ["model.hubspot.hubspot__daily_company_history"], "model.hubspot.int_hubspot__scd_daily_deal_history": ["model.hubspot.hubspot__daily_deal_history"], "model.hubspot.int_hubspot__pivot_daily_deal_history": ["model.hubspot.int_hubspot__scd_daily_deal_history"], "model.hubspot.int_hubspot__company_calendar_spine": ["model.hubspot.hubspot__daily_company_history"], "model.hubspot.int_hubspot__daily_company_history": ["model.hubspot.int_hubspot__pivot_daily_company_history"], "model.hubspot.int_hubspot__engagement_metrics__by_company_list": ["model.hubspot.hubspot__company_lists"], "model.hubspot.int_hubspot__deal_calendar_spine": ["model.hubspot.hubspot__daily_deal_history"], "model.hubspot.int_hubspot__pivot_daily_company_history": ["model.hubspot.int_hubspot__scd_daily_company_history"], "model.hubspot.hubspot__deal_history": ["model.hubspot.int_hubspot__daily_deal_history", "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75", "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79"], "model.hubspot.hubspot__daily_company_history": ["test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794", "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe"], "model.hubspot.hubspot__daily_deal_history": ["test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256", "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8"], "model.hubspot.hubspot__company_history": ["test.hubspot.not_null_hubspot__company_history_id.33035793ff", "test.hubspot.unique_hubspot__company_history_id.f1af964b1f"], "model.hubspot.stg_hubspot__ticket_pipeline": ["model.hubspot.hubspot__daily_ticket_history", "model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__owner": ["model.hubspot.hubspot__daily_company_history", "model.hubspot.hubspot__daily_contact_history", "model.hubspot.hubspot__daily_deal_history", "model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4"], "model.hubspot.stg_hubspot__engagement_communication": ["model.hubspot.hubspot__engagement_communication", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b"], "model.hubspot.stg_hubspot__email_event_dropped": ["model.hubspot.hubspot__email_event_dropped", "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52"], "model.hubspot.stg_hubspot__engagement_company": ["model.hubspot.hubspot__companies", "model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__engagement_metrics__by_company_list"], "model.hubspot.stg_hubspot__email_event_click": ["model.hubspot.hubspot__email_event_clicks", "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5"], "model.hubspot.stg_hubspot__email_event_delivered": ["model.hubspot.hubspot__email_event_delivered", "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20"], "model.hubspot.stg_hubspot__merged_deal": ["model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610", "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9"], "model.hubspot.stg_hubspot__users": ["model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a"], "model.hubspot.stg_hubspot__ticket_property_history": ["model.hubspot.int_hubspot__daily_ticket_history"], "model.hubspot.stg_hubspot__ticket_contact": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__role": ["model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95"], "model.hubspot.stg_hubspot__deal_property_history": ["model.hubspot.hubspot__deal_history"], "model.hubspot.stg_hubspot__company_list": ["model.hubspot.hubspot__company_lists", "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3"], "model.hubspot.stg_hubspot__team": ["model.hubspot.hubspot__daily_deal_history", "model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759"], "model.hubspot.stg_hubspot__property_option": [], "model.hubspot.stg_hubspot__deal_contact": [], "model.hubspot.stg_hubspot__company": ["model.hubspot.hubspot__companies", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__company_calendar_spine", "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43"], "model.hubspot.stg_hubspot__ticket": ["model.hubspot.hubspot__conversations", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__ticket_calendar_spine", "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53"], "model.hubspot.stg_hubspot__contact_list": ["model.hubspot.hubspot__contact_lists", "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a"], "model.hubspot.stg_hubspot__email_event_spam_report": ["model.hubspot.hubspot__email_event_spam_report", "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f"], "model.hubspot.stg_hubspot__engagement_meeting": ["model.hubspot.hubspot__engagement_meetings", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28"], "model.hubspot.stg_hubspot__contact_form_submission": ["model.hubspot.int_hubspot__form_metrics__by_contact"], "model.hubspot.stg_hubspot__deal_stage": ["model.hubspot.hubspot__deal_stages", "model.hubspot.int_hubspot__daily_deal_history"], "model.hubspot.stg_hubspot__email_event": ["model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_deferred", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_dropped", "model.hubspot.hubspot__email_event_forward", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_print", "model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change", "model.hubspot.int_hubspot__email_event_aggregates", "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531"], "model.hubspot.stg_hubspot__conversation_channel": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf"], "model.hubspot.stg_hubspot__engagement_deal": ["model.hubspot.hubspot__deals", "model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal"], "model.hubspot.stg_hubspot__company_list_member": ["model.hubspot.hubspot__company_lists", "model.hubspot.int_hubspot__engagement_metrics__by_company_list"], "model.hubspot.stg_hubspot__email_event_bounce": ["model.hubspot.hubspot__email_event_bounce", "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3"], "model.hubspot.stg_hubspot__engagement_task": ["model.hubspot.hubspot__engagement_tasks", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82"], "model.hubspot.stg_hubspot__marketing_event_list": ["model.hubspot.hubspot__marketing_event_performance", "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a"], "model.hubspot.stg_hubspot__engagement_email": ["model.hubspot.hubspot__engagement_emails", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca"], "model.hubspot.stg_hubspot__form": ["model.hubspot.int_hubspot__form_metrics__by_contact", "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65"], "model.hubspot.stg_hubspot__ticket_deal": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__contact_property_history": ["model.hubspot.hubspot__contact_history", "model.hubspot.int_hubspot__daily_contact_history"], "model.hubspot.stg_hubspot__email_event_forward": ["model.hubspot.hubspot__email_event_forward", "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3"], "model.hubspot.stg_hubspot__conversation_thread": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398"], "model.hubspot.stg_hubspot__email_event_deferred": ["model.hubspot.hubspot__email_event_deferred", "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0"], "model.hubspot.stg_hubspot__email_event_open": ["model.hubspot.hubspot__email_event_opens", "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16"], "model.hubspot.stg_hubspot__conversation_message_recipient": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b"], "model.hubspot.stg_hubspot__marketing_event_participant": ["model.hubspot.hubspot__marketing_event_performance", "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b"], "model.hubspot.stg_hubspot__email_event_sent": ["model.hubspot.hubspot__email_event_sent", "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d"], "model.hubspot.stg_hubspot__marketing_event_custom_property": [], "model.hubspot.stg_hubspot__conversation_message_history": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e"], "model.hubspot.stg_hubspot__deal_pipeline_stage": ["model.hubspot.hubspot__daily_deal_history", "model.hubspot.hubspot__deal_stages", "model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e"], "model.hubspot.stg_hubspot__engagement": ["model.hubspot.hubspot__engagements", "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f"], "model.hubspot.stg_hubspot__owner_team": ["model.hubspot.int_hubspot__owners_enhanced"], "model.hubspot.stg_hubspot__deal_pipeline": ["model.hubspot.hubspot__daily_deal_history", "model.hubspot.hubspot__deal_stages", "model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3"], "model.hubspot.stg_hubspot__conversation_channel_account": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb"], "model.hubspot.stg_hubspot__company_property_history": ["model.hubspot.hubspot__company_history", "model.hubspot.int_hubspot__daily_company_history"], "model.hubspot.stg_hubspot__marketing_event": ["model.hubspot.hubspot__marketing_event_performance", "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0"], "model.hubspot.stg_hubspot__contact_merge_audit": ["model.hubspot.int_hubspot__contact_merge_adjust"], "model.hubspot.stg_hubspot__deal": ["model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__deal_calendar_spine", "model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20"], "model.hubspot.stg_hubspot__email_campaign": ["model.hubspot.hubspot__email_campaigns", "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6"], "model.hubspot.stg_hubspot__engagement_contact": ["model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__engagement_metrics__by_contact"], "model.hubspot.stg_hubspot__team_user": [], "model.hubspot.stg_hubspot__email_event_status_change": ["model.hubspot.hubspot__email_event_status_change", "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1"], "model.hubspot.stg_hubspot__ticket_pipeline_stage": ["model.hubspot.hubspot__daily_ticket_history", "model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__conversation_actor": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea"], "model.hubspot.stg_hubspot__contact_list_member": ["model.hubspot.int_hubspot__email_metrics__by_contact_list"], "model.hubspot.stg_hubspot__engagement_note": ["model.hubspot.hubspot__engagement_notes", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e"], "model.hubspot.stg_hubspot__engagement_call": ["model.hubspot.hubspot__engagement_calls", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf"], "model.hubspot.stg_hubspot__submission_response": ["model.hubspot.int_hubspot__form_metrics__by_contact", "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7"], "model.hubspot.stg_hubspot__property": [], "model.hubspot.stg_hubspot__ticket_engagement": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__conversation_inbox": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b"], "model.hubspot.stg_hubspot__contact": ["model.hubspot.hubspot__conversations", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__contact_calendar_spine", "model.hubspot.int_hubspot__contact_merge_adjust", "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944"], "model.hubspot.stg_hubspot__email_event_print": ["model.hubspot.hubspot__email_event_print", "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b"], "model.hubspot.stg_hubspot__deal_company": [], "model.hubspot.stg_hubspot__ticket_company": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__engagement_deal_tmp": ["model.hubspot.stg_hubspot__engagement_deal"], "model.hubspot.stg_hubspot__email_event_print_tmp": ["model.hubspot.stg_hubspot__email_event_print"], "model.hubspot.stg_hubspot__engagement_communication_tmp": ["model.hubspot.stg_hubspot__engagement_communication"], "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": ["model.hubspot.stg_hubspot__ticket_pipeline_stage"], "model.hubspot.stg_hubspot__engagement_email_tmp": ["model.hubspot.stg_hubspot__engagement_email"], "model.hubspot.stg_hubspot__engagement_tmp": ["model.hubspot.stg_hubspot__engagement"], "model.hubspot.stg_hubspot__email_event_click_tmp": ["model.hubspot.stg_hubspot__email_event_click"], "model.hubspot.stg_hubspot__company_property_history_tmp": ["model.hubspot.stg_hubspot__company_property_history"], "model.hubspot.stg_hubspot__conversation_thread_tmp": ["model.hubspot.stg_hubspot__conversation_thread"], "model.hubspot.stg_hubspot__marketing_event_list_tmp": ["model.hubspot.stg_hubspot__marketing_event_list"], "model.hubspot.stg_hubspot__deal_pipeline_tmp": ["model.hubspot.stg_hubspot__deal_pipeline"], "model.hubspot.stg_hubspot__merged_deal_tmp": ["model.hubspot.stg_hubspot__merged_deal"], "model.hubspot.stg_hubspot__conversation_channel_account_tmp": ["model.hubspot.stg_hubspot__conversation_channel_account"], "model.hubspot.stg_hubspot__deal_contact_tmp": ["model.hubspot.stg_hubspot__deal_contact"], "model.hubspot.stg_hubspot__deal_company_tmp": ["model.hubspot.stg_hubspot__deal_company"], "model.hubspot.stg_hubspot__role_tmp": ["model.hubspot.stg_hubspot__role"], "model.hubspot.stg_hubspot__marketing_event_participant_tmp": ["model.hubspot.stg_hubspot__marketing_event_participant"], "model.hubspot.stg_hubspot__ticket_engagement_tmp": ["model.hubspot.stg_hubspot__ticket_engagement"], "model.hubspot.stg_hubspot__contact_form_submission_tmp": ["model.hubspot.stg_hubspot__contact_form_submission"], "model.hubspot.stg_hubspot__marketing_event_tmp": ["model.hubspot.stg_hubspot__marketing_event"], "model.hubspot.stg_hubspot__conversation_message_history_tmp": ["model.hubspot.stg_hubspot__conversation_message_history"], "model.hubspot.stg_hubspot__engagement_call_tmp": ["model.hubspot.stg_hubspot__engagement_call"], "model.hubspot.stg_hubspot__ticket_deal_tmp": ["model.hubspot.stg_hubspot__ticket_deal"], "model.hubspot.stg_hubspot__company_list_member_tmp": ["model.hubspot.stg_hubspot__company_list_member"], "model.hubspot.stg_hubspot__engagement_note_tmp": ["model.hubspot.stg_hubspot__engagement_note"], "model.hubspot.stg_hubspot__conversation_inbox_tmp": ["model.hubspot.stg_hubspot__conversation_inbox"], "model.hubspot.stg_hubspot__ticket_contact_tmp": ["model.hubspot.stg_hubspot__ticket_contact"], "model.hubspot.stg_hubspot__ticket_pipeline_tmp": ["model.hubspot.stg_hubspot__ticket_pipeline"], "model.hubspot.stg_hubspot__email_event_open_tmp": ["model.hubspot.stg_hubspot__email_event_open"], "model.hubspot.stg_hubspot__company_tmp": ["model.hubspot.stg_hubspot__company"], "model.hubspot.stg_hubspot__deal_stage_tmp": ["model.hubspot.stg_hubspot__deal_stage"], "model.hubspot.stg_hubspot__deal_tmp": ["model.hubspot.stg_hubspot__deal"], "model.hubspot.stg_hubspot__conversation_channel_tmp": ["model.hubspot.stg_hubspot__conversation_channel"], "model.hubspot.stg_hubspot__email_event_delivered_tmp": ["model.hubspot.stg_hubspot__email_event_delivered"], "model.hubspot.stg_hubspot__property_option_tmp": ["model.hubspot.stg_hubspot__property_option"], "model.hubspot.stg_hubspot__email_event_sent_tmp": ["model.hubspot.stg_hubspot__email_event_sent"], "model.hubspot.stg_hubspot__property_tmp": ["model.hubspot.stg_hubspot__property"], "model.hubspot.stg_hubspot__ticket_tmp": ["model.hubspot.int_hubspot__ticket_calendar_spine", "model.hubspot.stg_hubspot__ticket"], "model.hubspot.stg_hubspot__engagement_meeting_tmp": ["model.hubspot.stg_hubspot__engagement_meeting"], "model.hubspot.stg_hubspot__email_event_deferred_tmp": ["model.hubspot.stg_hubspot__email_event_deferred"], "model.hubspot.stg_hubspot__contact_property_history_tmp": ["model.hubspot.stg_hubspot__contact_property_history"], "model.hubspot.stg_hubspot__ticket_company_tmp": ["model.hubspot.stg_hubspot__ticket_company"], "model.hubspot.stg_hubspot__email_event_status_change_tmp": ["model.hubspot.stg_hubspot__email_event_status_change"], "model.hubspot.stg_hubspot__contact_merge_audit_tmp": ["model.hubspot.stg_hubspot__contact_merge_audit"], "model.hubspot.stg_hubspot__contact_list_tmp": ["model.hubspot.stg_hubspot__contact_list"], "model.hubspot.stg_hubspot__conversation_actor_tmp": ["model.hubspot.stg_hubspot__conversation_actor"], "model.hubspot.stg_hubspot__email_event_tmp": ["model.hubspot.stg_hubspot__email_event"], "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": ["model.hubspot.stg_hubspot__deal_pipeline_stage"], "model.hubspot.stg_hubspot__email_campaign_tmp": ["model.hubspot.stg_hubspot__email_campaign"], "model.hubspot.stg_hubspot__team_user_tmp": ["model.hubspot.stg_hubspot__team_user"], "model.hubspot.stg_hubspot__engagement_company_tmp": ["model.hubspot.stg_hubspot__engagement_company"], "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": ["model.hubspot.stg_hubspot__marketing_event_custom_property"], "model.hubspot.stg_hubspot__owner_team_tmp": ["model.hubspot.stg_hubspot__owner_team"], "model.hubspot.stg_hubspot__email_event_forward_tmp": ["model.hubspot.stg_hubspot__email_event_forward"], "model.hubspot.stg_hubspot__email_event_dropped_tmp": ["model.hubspot.stg_hubspot__email_event_dropped"], "model.hubspot.stg_hubspot__team_tmp": ["model.hubspot.stg_hubspot__team"], "model.hubspot.stg_hubspot__users_tmp": ["model.hubspot.stg_hubspot__users"], "model.hubspot.stg_hubspot__engagement_task_tmp": ["model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.stg_hubspot__contact_tmp": ["model.hubspot.stg_hubspot__contact"], "model.hubspot.stg_hubspot__submission_response_tmp": ["model.hubspot.stg_hubspot__submission_response"], "model.hubspot.stg_hubspot__ticket_property_history_tmp": ["model.hubspot.stg_hubspot__ticket_property_history"], "model.hubspot.stg_hubspot__email_event_bounce_tmp": ["model.hubspot.stg_hubspot__email_event_bounce"], "model.hubspot.stg_hubspot__contact_list_member_tmp": ["model.hubspot.stg_hubspot__contact_list_member"], "model.hubspot.stg_hubspot__company_list_tmp": ["model.hubspot.stg_hubspot__company_list"], "model.hubspot.stg_hubspot__email_event_spam_report_tmp": ["model.hubspot.stg_hubspot__email_event_spam_report"], "model.hubspot.stg_hubspot__deal_property_history_tmp": ["model.hubspot.stg_hubspot__deal_property_history"], "model.hubspot.stg_hubspot__form_tmp": ["model.hubspot.stg_hubspot__form"], "model.hubspot.stg_hubspot__engagement_contact_tmp": ["model.hubspot.stg_hubspot__engagement_contact"], "model.hubspot.stg_hubspot__owner_tmp": ["model.hubspot.stg_hubspot__owner"], "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": ["model.hubspot.stg_hubspot__conversation_message_recipient"], "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb": [], "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712": [], "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3": [], "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0": [], "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3": [], "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891": [], "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5": [], "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0": [], "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91": [], "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3": [], "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95": [], "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08": [], "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1": [], "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e": [], "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9": [], "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a": [], "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3": [], "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a": [], "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111": [], "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2": [], "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a": [], "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b": [], "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba": [], "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d": [], "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec": [], "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088": [], "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c": [], "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e": [], "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7": [], "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084": [], "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f": [], "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd": [], "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b": [], "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97": [], "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7": [], "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f": [], "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095": [], "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09": [], "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df": [], "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965": [], "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae": [], "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8": [], "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256": [], "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe": [], "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794": [], "test.hubspot.unique_hubspot__company_history_id.f1af964b1f": [], "test.hubspot.not_null_hubspot__company_history_id.33035793ff": [], "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79": [], "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75": [], "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65": [], "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7": [], "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3": [], "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5": [], "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0": [], "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20": [], "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52": [], "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3": [], "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16": [], "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b": [], "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d": [], "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f": [], "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1": [], "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531": [], "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6": [], "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a": [], "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944": [], "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf": [], "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b": [], "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca": [], "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28": [], "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e": [], "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82": [], "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f": [], "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3": [], "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43": [], "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0": [], "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a": [], "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b": [], "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea": [], "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b": [], "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf": [], "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb": [], "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398": [], "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e": [], "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b": [], "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53": [], "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e": [], "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3": [], "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20": [], "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9": [], "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610": [], "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95": [], "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759": [], "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a": [], "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4": [], "source.hubspot.hubspot.calendar_event": [], "source.hubspot.hubspot.company": ["model.hubspot.stg_hubspot__company_tmp"], "source.hubspot.hubspot.company_list": ["model.hubspot.stg_hubspot__company_list_tmp"], "source.hubspot.hubspot.company_list_member": ["model.hubspot.stg_hubspot__company_list_member_tmp"], "source.hubspot.hubspot.company_property_history": ["model.hubspot.stg_hubspot__company_property_history_tmp"], "source.hubspot.hubspot.contact_merge_audit": ["model.hubspot.stg_hubspot__contact_merge_audit_tmp"], "source.hubspot.hubspot.contact": ["model.hubspot.stg_hubspot__contact_tmp"], "source.hubspot.hubspot.contact_form_submission": ["model.hubspot.stg_hubspot__contact_form_submission_tmp"], "source.hubspot.hubspot.contact_list": ["model.hubspot.stg_hubspot__contact_list_tmp"], "source.hubspot.hubspot.contact_list_member": ["model.hubspot.stg_hubspot__contact_list_member_tmp"], "source.hubspot.hubspot.contact_property_history": ["model.hubspot.stg_hubspot__contact_property_history_tmp"], "source.hubspot.hubspot.deal": ["model.hubspot.stg_hubspot__deal_tmp"], "source.hubspot.hubspot.deal_stage": ["model.hubspot.stg_hubspot__deal_stage_tmp"], "source.hubspot.hubspot.deal_company": ["model.hubspot.stg_hubspot__deal_company_tmp"], "source.hubspot.hubspot.deal_contact": ["model.hubspot.stg_hubspot__deal_contact_tmp"], "source.hubspot.hubspot.deal_pipeline": ["model.hubspot.stg_hubspot__deal_pipeline_tmp"], "source.hubspot.hubspot.deal_pipeline_stage": ["model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"], "source.hubspot.hubspot.deal_property_history": ["model.hubspot.stg_hubspot__deal_property_history_tmp"], "source.hubspot.hubspot.email_campaign": ["model.hubspot.stg_hubspot__email_campaign_tmp"], "source.hubspot.hubspot.email_event": ["model.hubspot.stg_hubspot__email_event_tmp"], "source.hubspot.hubspot.email_event_bounce": ["model.hubspot.stg_hubspot__email_event_bounce_tmp"], "source.hubspot.hubspot.email_event_click": ["model.hubspot.stg_hubspot__email_event_click_tmp"], "source.hubspot.hubspot.email_event_deferred": ["model.hubspot.stg_hubspot__email_event_deferred_tmp"], "source.hubspot.hubspot.email_event_delivered": ["model.hubspot.stg_hubspot__email_event_delivered_tmp"], "source.hubspot.hubspot.email_event_dropped": ["model.hubspot.stg_hubspot__email_event_dropped_tmp"], "source.hubspot.hubspot.email_event_forward": ["model.hubspot.stg_hubspot__email_event_forward_tmp"], "source.hubspot.hubspot.email_event_open": ["model.hubspot.stg_hubspot__email_event_open_tmp"], "source.hubspot.hubspot.email_event_print": ["model.hubspot.stg_hubspot__email_event_print_tmp"], "source.hubspot.hubspot.email_event_sent": ["model.hubspot.stg_hubspot__email_event_sent_tmp"], "source.hubspot.hubspot.email_event_spam_report": ["model.hubspot.stg_hubspot__email_event_spam_report_tmp"], "source.hubspot.hubspot.email_event_status_change": ["model.hubspot.stg_hubspot__email_event_status_change_tmp"], "source.hubspot.hubspot.email_subscription": [], "source.hubspot.hubspot.email_subscription_change": [], "source.hubspot.hubspot.engagement": ["model.hubspot.stg_hubspot__engagement_tmp"], "source.hubspot.hubspot.engagement_call": ["model.hubspot.stg_hubspot__engagement_call_tmp"], "source.hubspot.hubspot.engagement_communication": ["model.hubspot.stg_hubspot__engagement_communication_tmp"], "source.hubspot.hubspot.engagement_company": ["model.hubspot.stg_hubspot__engagement_company_tmp"], "source.hubspot.hubspot.engagement_contact": ["model.hubspot.stg_hubspot__engagement_contact_tmp"], "source.hubspot.hubspot.engagement_deal": ["model.hubspot.stg_hubspot__engagement_deal_tmp"], "source.hubspot.hubspot.engagement_email": ["model.hubspot.stg_hubspot__engagement_email_tmp"], "source.hubspot.hubspot.engagement_email_cc": [], "source.hubspot.hubspot.engagement_email_to": [], "source.hubspot.hubspot.engagement_meeting": ["model.hubspot.stg_hubspot__engagement_meeting_tmp"], "source.hubspot.hubspot.engagement_note": ["model.hubspot.stg_hubspot__engagement_note_tmp"], "source.hubspot.hubspot.engagement_task": ["model.hubspot.stg_hubspot__engagement_task_tmp"], "source.hubspot.hubspot.form": ["model.hubspot.stg_hubspot__form_tmp"], "source.hubspot.hubspot.submission_response": ["model.hubspot.stg_hubspot__submission_response_tmp"], "source.hubspot.hubspot.owner": ["model.hubspot.stg_hubspot__owner_tmp"], "source.hubspot.hubspot.property": ["model.hubspot.stg_hubspot__property_tmp"], "source.hubspot.hubspot.property_option": ["model.hubspot.stg_hubspot__property_option_tmp"], "source.hubspot.hubspot.ticket_company": ["model.hubspot.stg_hubspot__ticket_company_tmp"], "source.hubspot.hubspot.ticket_contact": ["model.hubspot.stg_hubspot__ticket_contact_tmp"], "source.hubspot.hubspot.ticket_deal": ["model.hubspot.stg_hubspot__ticket_deal_tmp"], "source.hubspot.hubspot.ticket_engagement": ["model.hubspot.stg_hubspot__ticket_engagement_tmp"], "source.hubspot.hubspot.ticket_pipeline_stage": ["model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"], "source.hubspot.hubspot.ticket_pipeline": ["model.hubspot.stg_hubspot__ticket_pipeline_tmp"], "source.hubspot.hubspot.ticket_property_history": ["model.hubspot.stg_hubspot__ticket_property_history_tmp"], "source.hubspot.hubspot.ticket": ["model.hubspot.stg_hubspot__ticket_tmp"], "source.hubspot.hubspot.merged_deal": ["model.hubspot.stg_hubspot__merged_deal_tmp"], "source.hubspot.hubspot.owner_team": ["model.hubspot.stg_hubspot__owner_team_tmp"], "source.hubspot.hubspot.role": ["model.hubspot.stg_hubspot__role_tmp"], "source.hubspot.hubspot.team": ["model.hubspot.stg_hubspot__team_tmp"], "source.hubspot.hubspot.team_user": ["model.hubspot.stg_hubspot__team_user_tmp"], "source.hubspot.hubspot.users": ["model.hubspot.stg_hubspot__users_tmp"], "source.hubspot.hubspot.conversation_actor": ["model.hubspot.stg_hubspot__conversation_actor_tmp"], "source.hubspot.hubspot.conversation_inbox": ["model.hubspot.stg_hubspot__conversation_inbox_tmp"], "source.hubspot.hubspot.conversation_channel": ["model.hubspot.stg_hubspot__conversation_channel_tmp"], "source.hubspot.hubspot.conversation_channel_account": ["model.hubspot.stg_hubspot__conversation_channel_account_tmp"], "source.hubspot.hubspot.conversation_thread": ["model.hubspot.stg_hubspot__conversation_thread_tmp"], "source.hubspot.hubspot.conversation_message_history": ["model.hubspot.stg_hubspot__conversation_message_history_tmp"], "source.hubspot.hubspot.marketing_event": ["model.hubspot.stg_hubspot__marketing_event_tmp"], "source.hubspot.hubspot.marketing_event_list": ["model.hubspot.stg_hubspot__marketing_event_list_tmp"], "source.hubspot.hubspot.marketing_event_participant": ["model.hubspot.stg_hubspot__marketing_event_participant_tmp"], "source.hubspot.hubspot.marketing_event_custom_property": ["model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"], "source.hubspot.hubspot.conversation_message_recipient": ["model.hubspot.stg_hubspot__conversation_message_recipient_tmp"]}, "group_map": {}, "saved_queries": {}, "semantic_models": {}, "unit_tests": {}, "functions": {}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", "dbt_version": "1.12.0", "generated_at": "2026-08-10T21:50:12.304433Z", "invocation_id": "ac7663b1-c1c5-41ad-86ed-aabf1cabdba9", "invocation_started_at": "2026-08-10T21:49:41.060494+00:00", "env": {}, "project_name": "hubspot_integration_tests", "project_id": "5e587fba07ab8a9a57427c930291accf", "user_id": null, "send_anonymous_usage_stats": false, "adapter_type": "postgres", "quoting": {"database": true, "schema": true, "identifier": true, "column": null}, "run_started_at": "2026-08-10T21:49:41.060768+00:00"}, "nodes": {"seed.hubspot_integration_tests.engagement_call_data": {"database": "postgres", "schema": "public", "name": "engagement_call_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_call_data.csv", "original_file_path": "seeds/engagement_call_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_call_data", "fqn": ["hubspot_integration_tests", "engagement_call_data"], "alias": "engagement_call_data", "checksum": {"name": "sha256", "checksum": "cb6182d3d0902fd0b832c3c15d063ccaf81e2a62ed35e58abfc2d2acc35c6d7d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786398584.6157243, "relation_name": "\"postgres\".\"public\".\"engagement_call_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.owner_data": {"database": "postgres", "schema": "public", "name": "owner_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "owner_data.csv", "original_file_path": "seeds/owner_data.csv", "unique_id": "seed.hubspot_integration_tests.owner_data", "fqn": ["hubspot_integration_tests", "owner_data"], "alias": "owner_data", "checksum": {"name": "sha256", "checksum": "63e8faba4edb6401581d0a710751e0a7f3172c48fca277bf969eed631de3442c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"owner_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6240635, "relation_name": "\"postgres\".\"public\".\"owner_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_contact_data": {"database": "postgres", "schema": "public", "name": "engagement_contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_contact_data.csv", "original_file_path": "seeds/engagement_contact_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_contact_data", "fqn": ["hubspot_integration_tests", "engagement_contact_data"], "alias": "engagement_contact_data", "checksum": {"name": "sha256", "checksum": "ddd5be7c4fded570cf78e791c53ff7820919ebed4b97b376b68dc9d7cb88ee61"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "contact_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6278973, "relation_name": "\"postgres\".\"public\".\"engagement_contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_channel_data": {"database": "postgres", "schema": "public", "name": "conversation_channel_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_channel_data.csv", "original_file_path": "seeds/conversation_channel_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_channel_data", "fqn": ["hubspot_integration_tests", "conversation_channel_data"], "alias": "conversation_channel_data", "checksum": {"name": "sha256", "checksum": "37ceda53750f0882249e4f821600e680f254da18330acbaaaf4d3bedb2afb5e2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.6316826, "relation_name": "\"postgres\".\"public\".\"conversation_channel_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_list_data": {"database": "postgres", "schema": "public", "name": "company_list_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_list_data.csv", "original_file_path": "seeds/company_list_data.csv", "unique_id": "seed.hubspot_integration_tests.company_list_data", "fqn": ["hubspot_integration_tests", "company_list_data"], "alias": "company_list_data", "checksum": {"name": "sha256", "checksum": "838f953b882a48b5a7f9dcabb0e024d09d3046cb3a0761774d50ff9e65c3220c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "_fivetran_deleted": "boolean", "_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "name": "varchar", "created_by_id": "varchar", "object_type_id": "varchar", "processing_status": "varchar", "processing_type": "varchar", "list_version": "bigint", "filters_updated_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_synced": "timestamp", "created_at": "timestamp", "updated_at": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "created_by_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "object_type_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "processing_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "processing_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "list_version": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "filters_updated_at": "timestamp"}}, "created_at": 1786398584.6394093, "relation_name": "\"postgres\".\"public\".\"company_list_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_list_member_data": {"database": "postgres", "schema": "public", "name": "contact_list_member_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_list_member_data.csv", "original_file_path": "seeds/contact_list_member_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_list_member_data", "fqn": ["hubspot_integration_tests", "contact_list_member_data"], "alias": "contact_list_member_data", "checksum": {"name": "sha256", "checksum": "6b99af2cc326b0d01ca9e40c3f65f85dd6ed0e80f875394f6394c8d633cec35c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.643036, "relation_name": "\"postgres\".\"public\".\"contact_list_member_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_merge_audit_data": {"database": "postgres", "schema": "public", "name": "contact_merge_audit_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_merge_audit_data.csv", "original_file_path": "seeds/contact_merge_audit_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_merge_audit_data", "fqn": ["hubspot_integration_tests", "contact_merge_audit_data"], "alias": "contact_merge_audit_data", "checksum": {"name": "sha256", "checksum": "bc58ce75085b38346a5ba2589c46b10ae70f84376c2954c4f9dc9835df6334ee"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"vid_to_merge": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"vid_to_merge": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6465418, "relation_name": "\"postgres\".\"public\".\"contact_merge_audit_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_property_history_data": {"database": "postgres", "schema": "public", "name": "company_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_property_history_data.csv", "original_file_path": "seeds/company_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.company_property_history_data", "fqn": ["hubspot_integration_tests", "company_property_history_data"], "alias": "company_property_history_data", "checksum": {"name": "sha256", "checksum": "3462987f5fa08d4fb357f819c1afa015366594aa448f1fcf9edcbb5a54a53f23"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"company_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"company_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6502113, "relation_name": "\"postgres\".\"public\".\"company_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_company_data": {"database": "postgres", "schema": "public", "name": "engagement_company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_company_data.csv", "original_file_path": "seeds/engagement_company_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_company_data", "fqn": ["hubspot_integration_tests", "engagement_company_data"], "alias": "engagement_company_data", "checksum": {"name": "sha256", "checksum": "052a711fa2c1fecec78445cb28390ae31b87c48a4012deccb4c59379a18e5c3c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "company_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "company_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6538346, "relation_name": "\"postgres\".\"public\".\"engagement_company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.property_option_data": {"database": "postgres", "schema": "public", "name": "property_option_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "property_option_data.csv", "original_file_path": "seeds/property_option_data.csv", "unique_id": "seed.hubspot_integration_tests.property_option_data", "fqn": ["hubspot_integration_tests", "property_option_data"], "alias": "property_option_data", "checksum": {"name": "sha256", "checksum": "1d6abb5e2b665cef38bdc8094a52c6d9e6bf17c1da8b1944e0b5a4cebf86971c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.6573849, "relation_name": "\"postgres\".\"public\".\"property_option_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_note_data": {"database": "postgres", "schema": "public", "name": "engagement_note_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_note_data.csv", "original_file_path": "seeds/engagement_note_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_note_data", "fqn": ["hubspot_integration_tests", "engagement_note_data"], "alias": "engagement_note_data", "checksum": {"name": "sha256", "checksum": "c9c1d724b0da4e24df833b5749e7e58fd98b7076974c6a69c630f1221bec68e2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786398584.6609418, "relation_name": "\"postgres\".\"public\".\"engagement_note_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_engagement_data": {"database": "postgres", "schema": "public", "name": "ticket_engagement_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_engagement_data.csv", "original_file_path": "seeds/ticket_engagement_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_engagement_data", "fqn": ["hubspot_integration_tests", "ticket_engagement_data"], "alias": "ticket_engagement_data", "checksum": {"name": "sha256", "checksum": "e82183e02a005bef5543db4bb29b3993936bfdaf54725b87db7adde6e783fdce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.6645882, "relation_name": "\"postgres\".\"public\".\"ticket_engagement_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_inbox_data": {"database": "postgres", "schema": "public", "name": "conversation_inbox_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_inbox_data.csv", "original_file_path": "seeds/conversation_inbox_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_inbox_data", "fqn": ["hubspot_integration_tests", "conversation_inbox_data"], "alias": "conversation_inbox_data", "checksum": {"name": "sha256", "checksum": "598b1a8ddf02546496b0c568f3d6deb07870f236ba0b57a22c56b29235e1620a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "active": "boolean", "created_at": "timestamp", "name": "varchar", "type": "varchar", "updated_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "active": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "created_at": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "updated_at": "timestamp"}}, "created_at": 1786398584.6682482, "relation_name": "\"postgres\".\"public\".\"conversation_inbox_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_channel_account_data": {"database": "postgres", "schema": "public", "name": "conversation_channel_account_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_channel_account_data.csv", "original_file_path": "seeds/conversation_channel_account_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_channel_account_data", "fqn": ["hubspot_integration_tests", "conversation_channel_account_data"], "alias": "conversation_channel_account_data", "checksum": {"name": "sha256", "checksum": "ab2103ed11b4a354170f51c63d95e97549407eb9690286c82c0fc1d5942bba0c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "channel_id": "varchar", "inbox_id": "varchar", "active": "boolean", "authorized": "boolean", "created_at": "timestamp", "name": "varchar", "delivery_identifier_type": "varchar", "delivery_identifier_value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "channel_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "active": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "authorized": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "created_at": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.672071, "relation_name": "\"postgres\".\"public\".\"conversation_channel_account_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_dropped_data_postgres": {"database": "postgres", "schema": "public", "name": "email_event_dropped_data_postgres", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_dropped_data_postgres.csv", "original_file_path": "seeds/email_event_dropped_data_postgres.csv", "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data_postgres", "fqn": ["hubspot_integration_tests", "email_event_dropped_data_postgres"], "alias": "email_event_dropped_data", "checksum": {"name": "sha256", "checksum": "67533a391764bd55035ea642a7a06bdc9e96f155b33942c1fb9616fea2beb1de"}, "config": {"enabled": true, "alias": "email_event_dropped_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "email_event_dropped_data", "enabled": "{{ true if target.type == 'postgres' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786398584.6757584, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_spam_report_data": {"database": "postgres", "schema": "public", "name": "email_event_spam_report_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_spam_report_data.csv", "original_file_path": "seeds/email_event_spam_report_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_spam_report_data", "fqn": ["hubspot_integration_tests", "email_event_spam_report_data"], "alias": "email_event_spam_report_data", "checksum": {"name": "sha256", "checksum": "5b3eacc85df91b0a1c4f10e96dbedcf5c5da06e040f9a7e2f2a8cef297b8378d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.6792815, "relation_name": "\"postgres\".\"public\".\"email_event_spam_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_actor_data": {"database": "postgres", "schema": "public", "name": "conversation_actor_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_actor_data.csv", "original_file_path": "seeds/conversation_actor_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_actor_data", "fqn": ["hubspot_integration_tests", "conversation_actor_data"], "alias": "conversation_actor_data", "checksum": {"name": "sha256", "checksum": "6e1b3534bd2abe007c3883d6c0077a79930bc4521d9db03ccda17000572553a5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "id": "varchar", "avatar": "varchar", "email": "varchar", "name": "varchar", "type": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "avatar": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "email": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.6829405, "relation_name": "\"postgres\".\"public\".\"conversation_actor_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.users_data": {"database": "postgres", "schema": "public", "name": "users_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "users_data.csv", "original_file_path": "seeds/users_data.csv", "unique_id": "seed.hubspot_integration_tests.users_data", "fqn": ["hubspot_integration_tests", "users_data"], "alias": "users_data", "checksum": {"name": "sha256", "checksum": "5c2fdbed75a4bfa6f9d3baf59049ecf8327ceef56ff56d51982f2bfcc322f718"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "role_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "role_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6866179, "relation_name": "\"postgres\".\"public\".\"users_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_data": {"database": "postgres", "schema": "public", "name": "deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_data.csv", "original_file_path": "seeds/deal_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_data", "fqn": ["hubspot_integration_tests", "deal_data"], "alias": "deal_data", "checksum": {"name": "sha256", "checksum": "ef4971d5d5051776f058c50422ddb52f1f968071fae5eecaa12f3777a071c175"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint", "owner_id": "bigint", "property_closedate": "timestamp", "property_createdate": "timestamp", "deal_pipeline_id": "varchar(100)", "deal_pipeline_stage_id": "varchar(100)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "property_closedate": "timestamp", "property_createdate": "timestamp", "deal_pipeline_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}", "deal_pipeline_stage_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}"}}, "created_at": 1786398584.690356, "relation_name": "\"postgres\".\"public\".\"deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_company_data": {"database": "postgres", "schema": "public", "name": "ticket_company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_company_data.csv", "original_file_path": "seeds/ticket_company_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_company_data", "fqn": ["hubspot_integration_tests", "ticket_company_data"], "alias": "ticket_company_data", "checksum": {"name": "sha256", "checksum": "9c8017640c79e32f405290b937bac10f3aea449a6da13d213914c826a58cd6cf"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.6976483, "relation_name": "\"postgres\".\"public\".\"ticket_company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_participant_data": {"database": "postgres", "schema": "public", "name": "marketing_event_participant_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_participant_data.csv", "original_file_path": "seeds/marketing_event_participant_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_participant_data", "fqn": ["hubspot_integration_tests", "marketing_event_participant_data"], "alias": "marketing_event_participant_data", "checksum": {"name": "sha256", "checksum": "fb833bb425116b4c2739dc56b953873fa39ca50ecc5f9d73fb2f0c5fdc6963e1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "marketing_event_id": "bigint", "contact_id": "bigint", "properties_attendance_duration_seconds": "bigint", "properties_attendance_percentage": "float", "created_at": "timestamp", "properties_occurred_at": "timestamp", "_fivetran_synced": "timestamp", "properties_attendance_state": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "marketing_event_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "properties_attendance_duration_seconds": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "properties_attendance_percentage": "{{ 'float64' if target.type == 'bigquery' else 'float' }}", "created_at": "timestamp", "properties_occurred_at": "timestamp", "_fivetran_synced": "timestamp", "properties_attendance_state": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.701334, "relation_name": "\"postgres\".\"public\".\"marketing_event_participant_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.submission_response_data": {"database": "postgres", "schema": "public", "name": "submission_response_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "submission_response_data.csv", "original_file_path": "seeds/submission_response_data.csv", "unique_id": "seed.hubspot_integration_tests.submission_response_data", "fqn": ["hubspot_integration_tests", "submission_response_data"], "alias": "submission_response_data", "checksum": {"name": "sha256", "checksum": "e8d187696e4e1174535227f0d54dc332f319ced2b65c5279470a1e0b67eb9c4c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"submitted_at": "bigint", "_fivetran_synced": "timestamp", "conversion_id": "varchar", "form_id": "varchar", "field_name": "varchar", "field_value": "varchar", "page_url": "varchar", "object_type_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"submitted_at": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "conversion_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "form_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "field_name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "field_value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "page_url": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "object_type_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.7050772, "relation_name": "\"postgres\".\"public\".\"submission_response_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_email_data": {"database": "postgres", "schema": "public", "name": "engagement_email_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_email_data.csv", "original_file_path": "seeds/engagement_email_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_email_data", "fqn": ["hubspot_integration_tests", "engagement_email_data"], "alias": "engagement_email_data", "checksum": {"name": "sha256", "checksum": "92889176a07fd7ee29f64c41eb254b8bc83102cc4d5f6a5df2786a49c7bf635e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786398584.7123857, "relation_name": "\"postgres\".\"public\".\"engagement_email_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_list_data": {"database": "postgres", "schema": "public", "name": "marketing_event_list_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_list_data.csv", "original_file_path": "seeds/marketing_event_list_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_list_data", "fqn": ["hubspot_integration_tests", "marketing_event_list_data"], "alias": "marketing_event_list_data", "checksum": {"name": "sha256", "checksum": "346d6b6bbd3633c8c7bdc4a3e8c823d932a1427ccf81c6fffe452814142b2048"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "marketing_event_id": "bigint", "list_version": "bigint", "size": "bigint", "filters_updated_at": "timestamp", "created_at": "timestamp", "deleted_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "name": "varchar", "created_by_id": "varchar", "updated_by_id": "varchar", "processing_status": "varchar", "object_type_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "marketing_event_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "list_version": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "size": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "filters_updated_at": "timestamp", "created_at": "timestamp", "deleted_at": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "created_by_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "updated_by_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "processing_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "object_type_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.716292, "relation_name": "\"postgres\".\"public\".\"marketing_event_list_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_data": {"database": "postgres", "schema": "public", "name": "contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_data.csv", "original_file_path": "seeds/contact_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_data", "fqn": ["hubspot_integration_tests", "contact_data"], "alias": "contact_data", "checksum": {"name": "sha256", "checksum": "bc751862a73b90c64241bb3e0006fa01ceb00ece2a29323da49412463cf1b938"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.7199514, "relation_name": "\"postgres\".\"public\".\"contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_contact_data": {"database": "postgres", "schema": "public", "name": "deal_contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_contact_data.csv", "original_file_path": "seeds/deal_contact_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_contact_data", "fqn": ["hubspot_integration_tests", "deal_contact_data"], "alias": "deal_contact_data", "checksum": {"name": "sha256", "checksum": "55ae3e8166d78a6457118c8a46cd967e34edcc2677206855f88a204cb5346b70"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"contact_id": "bigint", "deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.7235146, "relation_name": "\"postgres\".\"public\".\"deal_contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.team_data": {"database": "postgres", "schema": "public", "name": "team_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "team_data.csv", "original_file_path": "seeds/team_data.csv", "unique_id": "seed.hubspot_integration_tests.team_data", "fqn": ["hubspot_integration_tests", "team_data"], "alias": "team_data", "checksum": {"name": "sha256", "checksum": "f5119d8441fa80e5d6ea6e95cc834825b452975d6894c03d226eeb0fcb12d804"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.7272737, "relation_name": "\"postgres\".\"public\".\"team_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_property_history_data": {"database": "postgres", "schema": "public", "name": "contact_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_property_history_data.csv", "original_file_path": "seeds/contact_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_property_history_data", "fqn": ["hubspot_integration_tests", "contact_property_history_data"], "alias": "contact_property_history_data", "checksum": {"name": "sha256", "checksum": "35d8aa810d62553192c41e6ca9f7b019fd86be4f12f19bad39d45a70ae475714"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "timestamp": "timestamp"}}, "created_at": 1786398584.7309928, "relation_name": "\"postgres\".\"public\".\"contact_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_campaign_data": {"database": "postgres", "schema": "public", "name": "email_campaign_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_campaign_data.csv", "original_file_path": "seeds/email_campaign_data.csv", "unique_id": "seed.hubspot_integration_tests.email_campaign_data", "fqn": ["hubspot_integration_tests", "email_campaign_data"], "alias": "email_campaign_data", "checksum": {"name": "sha256", "checksum": "ee721995ffb55b71eed966753908d37a1f035c990794b76144f05ad343af8550"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "content_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "content_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.7347312, "relation_name": "\"postgres\".\"public\".\"email_campaign_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_list_data": {"database": "postgres", "schema": "public", "name": "contact_list_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_list_data.csv", "original_file_path": "seeds/contact_list_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_list_data", "fqn": ["hubspot_integration_tests", "contact_list_data"], "alias": "contact_list_data", "checksum": {"name": "sha256", "checksum": "ddc7444e3de7929c78d387b60d2a6e3edbc1d52ac32b790a4a43e0d9d5829473"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.7382991, "relation_name": "\"postgres\".\"public\".\"contact_list_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_pipeline_data": {"database": "postgres", "schema": "public", "name": "ticket_pipeline_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_pipeline_data.csv", "original_file_path": "seeds/ticket_pipeline_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_data", "fqn": ["hubspot_integration_tests", "ticket_pipeline_data"], "alias": "ticket_pipeline_data", "checksum": {"name": "sha256", "checksum": "29ee49b2c5ea97be925fabdef44cc24316ad39a23ff9ee5c1ae3c35c2610486f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"pipeline_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"pipeline_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.74182, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_message_history_data": {"database": "postgres", "schema": "public", "name": "conversation_message_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_message_history_data.csv", "original_file_path": "seeds/conversation_message_history_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_message_history_data", "fqn": ["hubspot_integration_tests", "conversation_message_history_data"], "alias": "conversation_message_history_data", "checksum": {"name": "sha256", "checksum": "ae9e0d1d37a0ca1d70c7a57ddbe171638a9a8c593d675f4bc0234216e090ff83"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "_fivetran_active": "boolean", "id": "varchar", "thread_id": "varchar", "channel_account_id": "varchar", "channel_id": "varchar", "from_inbox_id": "varchar", "to_inbox_id": "varchar", "assigned_to": "varchar", "assigned_from": "varchar", "created_at": "timestamp", "created_by": "varchar", "direction": "varchar", "in_reply_to_id": "varchar", "new_status": "varchar", "rich_text": "varchar", "subject": "varchar", "text": "varchar", "truncation_status": "varchar", "type": "varchar", "updated_at": "timestamp", "client_type": "varchar", "status_type": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "_fivetran_active": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "thread_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "channel_account_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "channel_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "from_inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "to_inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "assigned_to": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "assigned_from": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "created_at": "timestamp", "created_by": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "direction": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "in_reply_to_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "new_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "rich_text": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "subject": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "text": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "truncation_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "updated_at": "timestamp", "client_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "status_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.7458432, "relation_name": "\"postgres\".\"public\".\"conversation_message_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_delivered_data": {"database": "postgres", "schema": "public", "name": "email_event_delivered_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_delivered_data.csv", "original_file_path": "seeds/email_event_delivered_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_delivered_data", "fqn": ["hubspot_integration_tests", "email_event_delivered_data"], "alias": "email_event_delivered_data", "checksum": {"name": "sha256", "checksum": "17081123e8396f7ffaba509180c463ce9684b973f6703e8b4984bba400f41dd8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.749683, "relation_name": "\"postgres\".\"public\".\"email_event_delivered_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_data": {"database": "postgres", "schema": "public", "name": "marketing_event_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_data.csv", "original_file_path": "seeds/marketing_event_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_data", "fqn": ["hubspot_integration_tests", "marketing_event_data"], "alias": "marketing_event_data", "checksum": {"name": "sha256", "checksum": "1264c16ca1391a36bb59a4893a6b57e1e00b042f63ac098170f0d5720458919a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "app_id": "varchar", "attendees": "bigint", "cancellations": "bigint", "no_shows": "bigint", "registrants": "bigint", "event_cancelled": "boolean", "event_completed": "boolean", "_fivetran_deleted": "boolean", "created_at": "timestamp", "end_date_time": "timestamp", "start_date_time": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "app_name": "varchar", "event_description": "varchar", "event_name": "varchar", "event_organizer": "varchar", "event_status": "varchar", "event_type": "varchar", "event_url": "varchar", "external_event_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "app_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "attendees": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "cancellations": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "no_shows": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "registrants": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "event_cancelled": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "event_completed": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "created_at": "timestamp", "end_date_time": "timestamp", "start_date_time": "timestamp", "updated_at": "timestamp", "_fivetran_synced": "timestamp", "app_name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_description": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_organizer": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "event_url": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "external_event_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.753667, "relation_name": "\"postgres\".\"public\".\"marketing_event_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_data_postgres": {"database": "postgres", "schema": "public", "name": "company_data_postgres", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data_postgres.csv", "original_file_path": "seeds/company_data_postgres.csv", "unique_id": "seed.hubspot_integration_tests.company_data_postgres", "fqn": ["hubspot_integration_tests", "company_data_postgres"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "73625b97c04121c6ca87ee71a6f0a68ab9e587a475c4b6c6b5e475d138980624"}, "config": {"enabled": true, "alias": "company_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "company_data", "enabled": "{{ true if target.type == 'postgres' and not var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.7574713, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_data": {"database": "postgres", "schema": "public", "name": "engagement_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_data.csv", "original_file_path": "seeds/engagement_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_data", "fqn": ["hubspot_integration_tests", "engagement_data"], "alias": "engagement_data", "checksum": {"name": "sha256", "checksum": "f988895788ec22b2131419e6e38f5f7717cc3302b2fd4914529d5f94657eb44c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp"}}, "created_at": 1786398584.7610145, "relation_name": "\"postgres\".\"public\".\"engagement_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.role_data": {"database": "postgres", "schema": "public", "name": "role_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "role_data.csv", "original_file_path": "seeds/role_data.csv", "unique_id": "seed.hubspot_integration_tests.role_data", "fqn": ["hubspot_integration_tests", "role_data"], "alias": "role_data", "checksum": {"name": "sha256", "checksum": "3cbd245835bbd8e516e6df3c7fdce611ed9b483ed186fee40a6c7fdc77743922"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.7654667, "relation_name": "\"postgres\".\"public\".\"role_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.company_list_member_data": {"database": "postgres", "schema": "public", "name": "company_list_member_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_list_member_data.csv", "original_file_path": "seeds/company_list_member_data.csv", "unique_id": "seed.hubspot_integration_tests.company_list_member_data", "fqn": ["hubspot_integration_tests", "company_list_member_data"], "alias": "company_list_member_data", "checksum": {"name": "sha256", "checksum": "edcd5971b7f86d0de68b188b7607d6a418c791a6f683c43595e0c87286cf99f4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"company_id": "bigint", "company_list_id": "bigint", "_fivetran_deleted": "boolean", "_fivetran_synced": "timestamp", "added_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"company_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "company_list_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "_fivetran_synced": "timestamp", "added_at": "timestamp"}}, "created_at": 1786398584.7691617, "relation_name": "\"postgres\".\"public\".\"company_list_member_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_thread_data": {"database": "postgres", "schema": "public", "name": "conversation_thread_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_thread_data.csv", "original_file_path": "seeds/conversation_thread_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_thread_data", "fqn": ["hubspot_integration_tests", "conversation_thread_data"], "alias": "conversation_thread_data", "checksum": {"name": "sha256", "checksum": "bb0424ea8471c7b479162a01c5c02c40f907966ddf3606e5eee4d3482e8278f2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "boolean", "id": "varchar", "inbox_id": "varchar", "associated_contact_id": "varchar", "associated_ticket_id": "varchar", "original_channel_account_id": "varchar", "original_channel_id": "varchar", "assigned_to": "varchar", "closed_at": "timestamp", "created_at": "timestamp", "latest_message_received_timestamp": "timestamp", "latest_message_sent_timestamp": "timestamp", "latest_message_timestamp": "timestamp", "spam": "varchar", "status": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_deleted": "{{ 'bool' if target.type == 'bigquery' else 'boolean' }}", "id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "inbox_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "associated_contact_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "associated_ticket_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "original_channel_account_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "original_channel_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "assigned_to": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "closed_at": "timestamp", "created_at": "timestamp", "latest_message_received_timestamp": "timestamp", "latest_message_sent_timestamp": "timestamp", "latest_message_timestamp": "timestamp", "spam": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "status": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.7730231, "relation_name": "\"postgres\".\"public\".\"conversation_thread_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_stage_data": {"database": "postgres", "schema": "public", "name": "deal_stage_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_stage_data.csv", "original_file_path": "seeds/deal_stage_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_stage_data", "fqn": ["hubspot_integration_tests", "deal_stage_data"], "alias": "deal_stage_data", "checksum": {"name": "sha256", "checksum": "b9519b383402bcdf8c66775d1d83020db2d1e33a1e2598a83109be526bd56101"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.7767975, "relation_name": "\"postgres\".\"public\".\"deal_stage_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_property_history_data": {"database": "postgres", "schema": "public", "name": "ticket_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_property_history_data.csv", "original_file_path": "seeds/ticket_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_property_history_data", "fqn": ["hubspot_integration_tests", "ticket_property_history_data"], "alias": "ticket_property_history_data", "checksum": {"name": "sha256", "checksum": "9b328e4208371a41eea11df75ce4cb7b73812ed4a13a1f8fe49595db4ec45d86"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"timestamp_instant": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"timestamp_instant": "timestamp"}}, "created_at": 1786398584.780669, "relation_name": "\"postgres\".\"public\".\"ticket_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_property_history_data": {"database": "postgres", "schema": "public", "name": "deal_property_history_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_property_history_data.csv", "original_file_path": "seeds/deal_property_history_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_property_history_data", "fqn": ["hubspot_integration_tests", "deal_property_history_data"], "alias": "deal_property_history_data", "checksum": {"name": "sha256", "checksum": "924128457b878f586f3bf9902ef6f2f17c2f74caef63fb143083c47a98728415"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.787944, "relation_name": "\"postgres\".\"public\".\"deal_property_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_data": {"database": "postgres", "schema": "public", "name": "ticket_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_data.csv", "original_file_path": "seeds/ticket_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_data", "fqn": ["hubspot_integration_tests", "ticket_data"], "alias": "ticket_data", "checksum": {"name": "sha256", "checksum": "c3edf20a13788b50e4736f1ec482bd3afa89db11b3d04650082ec5533733b2e4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"property_closed_date": "timestamp", "property_createdate": "timestamp", "property_hs_pipeline": "varchar", "property_hs_pipeline_stage": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"property_closed_date": "timestamp", "property_createdate": "timestamp", "property_hs_pipeline": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "property_hs_pipeline_stage": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.7916028, "relation_name": "\"postgres\".\"public\".\"ticket_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_open_data": {"database": "postgres", "schema": "public", "name": "email_event_open_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_open_data.csv", "original_file_path": "seeds/email_event_open_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_open_data", "fqn": ["hubspot_integration_tests", "email_event_open_data"], "alias": "email_event_open_data", "checksum": {"name": "sha256", "checksum": "19849df38ebaf01d9a044ab75123d78072936702357ede19a6c574acc569287b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.7951238, "relation_name": "\"postgres\".\"public\".\"email_event_open_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.property_data": {"database": "postgres", "schema": "public", "name": "property_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "property_data.csv", "original_file_path": "seeds/property_data.csv", "unique_id": "seed.hubspot_integration_tests.property_data", "fqn": ["hubspot_integration_tests", "property_data"], "alias": "property_data", "checksum": {"name": "sha256", "checksum": "3047ea0395efbbfbe631491917c3f974f10bee7403ac19e4140b5d7f2c08e5fe"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.79876, "relation_name": "\"postgres\".\"public\".\"property_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_sent_data_postgres": {"database": "postgres", "schema": "public", "name": "email_event_sent_data_postgres", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_sent_data_postgres.csv", "original_file_path": "seeds/email_event_sent_data_postgres.csv", "unique_id": "seed.hubspot_integration_tests.email_event_sent_data_postgres", "fqn": ["hubspot_integration_tests", "email_event_sent_data_postgres"], "alias": "email_event_sent_data", "checksum": {"name": "sha256", "checksum": "80ffa8bf0d8e99c8986e86b295e3dc1b0846adaee9e5eaf638f7603b92c0aa44"}, "config": {"enabled": true, "alias": "email_event_sent_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "email_event_sent_data", "enabled": "{{ true if target.type == 'postgres' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786398584.805944, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_click_data": {"database": "postgres", "schema": "public", "name": "email_event_click_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_click_data.csv", "original_file_path": "seeds/email_event_click_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_click_data", "fqn": ["hubspot_integration_tests", "email_event_click_data"], "alias": "email_event_click_data", "checksum": {"name": "sha256", "checksum": "43db504350a17932c8c0c3188984caaa1383a0dca5c2f1e397e6d6c6bd2a7a6f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.8094552, "relation_name": "\"postgres\".\"public\".\"email_event_click_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_deferred_data": {"database": "postgres", "schema": "public", "name": "email_event_deferred_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_deferred_data.csv", "original_file_path": "seeds/email_event_deferred_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_deferred_data", "fqn": ["hubspot_integration_tests", "email_event_deferred_data"], "alias": "email_event_deferred_data", "checksum": {"name": "sha256", "checksum": "57fdcaa6af4ab17b6c8abc9dc5202a3251b01648e931df6fa78df7c3602244b5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.8129888, "relation_name": "\"postgres\".\"public\".\"email_event_deferred_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_company_data": {"database": "postgres", "schema": "public", "name": "deal_company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_company_data.csv", "original_file_path": "seeds/deal_company_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_company_data", "fqn": ["hubspot_integration_tests", "deal_company_data"], "alias": "deal_company_data", "checksum": {"name": "sha256", "checksum": "27dace40324c3c15e24dfeaff3d8a27595feba3cc583da93ec9aec19e32aadea"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.8164744, "relation_name": "\"postgres\".\"public\".\"deal_company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.team_user_data": {"database": "postgres", "schema": "public", "name": "team_user_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "team_user_data.csv", "original_file_path": "seeds/team_user_data.csv", "unique_id": "seed.hubspot_integration_tests.team_user_data", "fqn": ["hubspot_integration_tests", "team_user_data"], "alias": "team_user_data", "checksum": {"name": "sha256", "checksum": "d5c54abec6ebea1e67b90f82f50eae4e21eadaf97837c32aa77f583a3058c685"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.819937, "relation_name": "\"postgres\".\"public\".\"team_user_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_pipeline_stage_data": {"database": "postgres", "schema": "public", "name": "deal_pipeline_stage_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_pipeline_stage_data.csv", "original_file_path": "seeds/deal_pipeline_stage_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_pipeline_stage_data", "fqn": ["hubspot_integration_tests", "deal_pipeline_stage_data"], "alias": "deal_pipeline_stage_data", "checksum": {"name": "sha256", "checksum": "8de8b661475ff929bd6648963bf1905620226a2369aa63d241985f3e9c6a2ae9"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"stage_id": "varchar(100)", "pipeline_id": "varchar(100)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"stage_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}", "pipeline_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}"}}, "created_at": 1786398584.8234959, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_stage_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.owner_team_data": {"database": "postgres", "schema": "public", "name": "owner_team_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "owner_team_data.csv", "original_file_path": "seeds/owner_team_data.csv", "unique_id": "seed.hubspot_integration_tests.owner_team_data", "fqn": ["hubspot_integration_tests", "owner_team_data"], "alias": "owner_team_data", "checksum": {"name": "sha256", "checksum": "18adef1b8697819d55c611d7e4e2a7520b0de7772553a6bb3f38d89bdea160c5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"owner_id": "bigint", "team_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"owner_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "team_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.8272128, "relation_name": "\"postgres\".\"public\".\"owner_team_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_meeting_data": {"database": "postgres", "schema": "public", "name": "engagement_meeting_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_meeting_data.csv", "original_file_path": "seeds/engagement_meeting_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_meeting_data", "fqn": ["hubspot_integration_tests", "engagement_meeting_data"], "alias": "engagement_meeting_data", "checksum": {"name": "sha256", "checksum": "87dc6217963c671ee6f0e6818ac61c63b6d6b419fc26d1aaf47bae8a7883e63b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp"}}, "created_at": 1786398584.8308408, "relation_name": "\"postgres\".\"public\".\"engagement_meeting_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.deal_pipeline_data": {"database": "postgres", "schema": "public", "name": "deal_pipeline_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "deal_pipeline_data.csv", "original_file_path": "seeds/deal_pipeline_data.csv", "unique_id": "seed.hubspot_integration_tests.deal_pipeline_data", "fqn": ["hubspot_integration_tests", "deal_pipeline_data"], "alias": "deal_pipeline_data", "checksum": {"name": "sha256", "checksum": "381289e17003be7a9c7d62974ba55a8deca3135a8a41b6482b4507188a8f12a8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"pipeline_id": "varchar(100)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"pipeline_id": "{{ 'varchar(100)' if target.type in ('redshift','postgres') else 'string'}}"}}, "created_at": 1786398584.8344827, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_status_change_data": {"database": "postgres", "schema": "public", "name": "email_event_status_change_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_status_change_data.csv", "original_file_path": "seeds/email_event_status_change_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_status_change_data", "fqn": ["hubspot_integration_tests", "email_event_status_change_data"], "alias": "email_event_status_change_data", "checksum": {"name": "sha256", "checksum": "85f07144104d2cba5c89dfcbd317aad76021f4d857965f4ed87905741249e493"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.838008, "relation_name": "\"postgres\".\"public\".\"email_event_status_change_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_task_data": {"database": "postgres", "schema": "public", "name": "engagement_task_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_task_data.csv", "original_file_path": "seeds/engagement_task_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_task_data", "fqn": ["hubspot_integration_tests", "engagement_task_data"], "alias": "engagement_task_data", "checksum": {"name": "sha256", "checksum": "3a8289e23881daaeda15f5d699f9f0096669c3e0185baf17af0a91ad4a1ed21b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "property_hs_object_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "property_hs_object_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786398584.841765, "relation_name": "\"postgres\".\"public\".\"engagement_task_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_deal_data": {"database": "postgres", "schema": "public", "name": "ticket_deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_deal_data.csv", "original_file_path": "seeds/ticket_deal_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_deal_data", "fqn": ["hubspot_integration_tests", "ticket_deal_data"], "alias": "ticket_deal_data", "checksum": {"name": "sha256", "checksum": "e88279d2fbd4d681e5950794ce98b9f01b648665e056cdc85c816e7922dfb3da"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.8454378, "relation_name": "\"postgres\".\"public\".\"ticket_deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_deal_data": {"database": "postgres", "schema": "public", "name": "engagement_deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_deal_data.csv", "original_file_path": "seeds/engagement_deal_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_deal_data", "fqn": ["hubspot_integration_tests", "engagement_deal_data"], "alias": "engagement_deal_data", "checksum": {"name": "sha256", "checksum": "b59f36bb53707860fe1167a3de8527f68792fa781312dcc83503dec863e2580a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "deal_id": "bigint", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp"}}, "created_at": 1786398584.8490005, "relation_name": "\"postgres\".\"public\".\"engagement_deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.contact_form_submission_data": {"database": "postgres", "schema": "public", "name": "contact_form_submission_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "contact_form_submission_data.csv", "original_file_path": "seeds/contact_form_submission_data.csv", "unique_id": "seed.hubspot_integration_tests.contact_form_submission_data", "fqn": ["hubspot_integration_tests", "contact_form_submission_data"], "alias": "contact_form_submission_data", "checksum": {"name": "sha256", "checksum": "1bdd6c542884b8ba1f9e074271a0420dd356d35b025ccaf2d8ae4da29838c1ec"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"form_id": "varchar", "contact_id": "bigint", "conversion_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"form_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "contact_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "conversion_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.8526812, "relation_name": "\"postgres\".\"public\".\"contact_form_submission_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_bounce_data": {"database": "postgres", "schema": "public", "name": "email_event_bounce_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_bounce_data.csv", "original_file_path": "seeds/email_event_bounce_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_bounce_data", "fqn": ["hubspot_integration_tests", "email_event_bounce_data"], "alias": "email_event_bounce_data", "checksum": {"name": "sha256", "checksum": "8fd760a7dd303a1d061e42cf27b7ffc07fc8f615807148b6c66f8408a6037b58"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.8598478, "relation_name": "\"postgres\".\"public\".\"email_event_bounce_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_pipeline_stage_data": {"database": "postgres", "schema": "public", "name": "ticket_pipeline_stage_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_pipeline_stage_data.csv", "original_file_path": "seeds/ticket_pipeline_stage_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_pipeline_stage_data", "fqn": ["hubspot_integration_tests", "ticket_pipeline_stage_data"], "alias": "ticket_pipeline_stage_data", "checksum": {"name": "sha256", "checksum": "40147d412e5ea27d5e02aab93886cd3c13f428f13aa738f3df51fd869124fc8a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"stage_id": "varchar", "pipeline_id": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"stage_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "pipeline_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.863434, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_stage_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_print_data": {"database": "postgres", "schema": "public", "name": "email_event_print_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_print_data.csv", "original_file_path": "seeds/email_event_print_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_print_data", "fqn": ["hubspot_integration_tests", "email_event_print_data"], "alias": "email_event_print_data", "checksum": {"name": "sha256", "checksum": "23c6ad69b0a5c8f207c74ffd33c7c103db023646937269ec4116f7c0d87079bd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.866963, "relation_name": "\"postgres\".\"public\".\"email_event_print_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.merged_deal_data": {"database": "postgres", "schema": "public", "name": "merged_deal_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "merged_deal_data.csv", "original_file_path": "seeds/merged_deal_data.csv", "unique_id": "seed.hubspot_integration_tests.merged_deal_data", "fqn": ["hubspot_integration_tests", "merged_deal_data"], "alias": "merged_deal_data", "checksum": {"name": "sha256", "checksum": "be973774b1f54ecfa138effa2abd1a98ac1b5976c01179c4612607203035e170"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"deal_id": "bigint", "merged_deal_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "merged_deal_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.8704646, "relation_name": "\"postgres\".\"public\".\"merged_deal_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.form_data": {"database": "postgres", "schema": "public", "name": "form_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "form_data.csv", "original_file_path": "seeds/form_data.csv", "unique_id": "seed.hubspot_integration_tests.form_data", "fqn": ["hubspot_integration_tests", "form_data"], "alias": "form_data", "checksum": {"name": "sha256", "checksum": "9ba9725c08a147e6337c5bcf088ea7c46a6f369235740398f7d2fd2a5da618e5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"guid": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"guid": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.87777, "relation_name": "\"postgres\".\"public\".\"form_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_forward_data": {"database": "postgres", "schema": "public", "name": "email_event_forward_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_forward_data.csv", "original_file_path": "seeds/email_event_forward_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_forward_data", "fqn": ["hubspot_integration_tests", "email_event_forward_data"], "alias": "email_event_forward_data", "checksum": {"name": "sha256", "checksum": "570f640292d5a4a9cc66561fb33bb49b7246f331f5b7cebf40402f164e97d381"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.8813367, "relation_name": "\"postgres\".\"public\".\"email_event_forward_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.ticket_contact_data": {"database": "postgres", "schema": "public", "name": "ticket_contact_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "ticket_contact_data.csv", "original_file_path": "seeds/ticket_contact_data.csv", "unique_id": "seed.hubspot_integration_tests.ticket_contact_data", "fqn": ["hubspot_integration_tests", "ticket_contact_data"], "alias": "ticket_contact_data", "checksum": {"name": "sha256", "checksum": "7aea0600716cf14e5a2582a4c8362b853910ae002fc6fe66b6bebe4853e00ec8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1786398584.884809, "relation_name": "\"postgres\".\"public\".\"ticket_contact_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.engagement_communication_data": {"database": "postgres", "schema": "public", "name": "engagement_communication_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "engagement_communication_data.csv", "original_file_path": "seeds/engagement_communication_data.csv", "unique_id": "seed.hubspot_integration_tests.engagement_communication_data", "fqn": ["hubspot_integration_tests", "engagement_communication_data"], "alias": "engagement_communication_data", "checksum": {"name": "sha256", "checksum": "bac50a0ecc62eab9e96d775705be03a308c42bcafd8f8cd34c07f430eea4bd64"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"engagement_id": "bigint", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"engagement_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "property_hs_createdate": "timestamp", "property_hs_timestamp": "timestamp"}}, "created_at": 1786398584.888437, "relation_name": "\"postgres\".\"public\".\"engagement_communication_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.marketing_event_custom_property_data": {"database": "postgres", "schema": "public", "name": "marketing_event_custom_property_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "marketing_event_custom_property_data.csv", "original_file_path": "seeds/marketing_event_custom_property_data.csv", "unique_id": "seed.hubspot_integration_tests.marketing_event_custom_property_data", "fqn": ["hubspot_integration_tests", "marketing_event_custom_property_data"], "alias": "marketing_event_custom_property_data", "checksum": {"name": "sha256", "checksum": "008704214cd117d05796e4504eacfdafbf117068cd513ad950974436ffc02512"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"marketing_event_id": "bigint", "_fivetran_synced": "timestamp", "name": "varchar", "value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"marketing_event_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "_fivetran_synced": "timestamp", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.8921838, "relation_name": "\"postgres\".\"public\".\"marketing_event_custom_property_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.email_event_data": {"database": "postgres", "schema": "public", "name": "email_event_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_data.csv", "original_file_path": "seeds/email_event_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_data", "fqn": ["hubspot_integration_tests", "email_event_data"], "alias": "email_event_data", "checksum": {"name": "sha256", "checksum": "ee10ab2bb6d5fae3915fcd8c903d6295684a4f26d40cd330dde3d44ed2d5712d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "caused_by_created": "timestamp", "created": "timestamp", "obsoleted_by_created": "timestamp", "sent_by_created": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "caused_by_created": "timestamp", "created": "timestamp", "obsoleted_by_created": "timestamp", "sent_by_created": "timestamp"}}, "created_at": 1786398584.8958416, "relation_name": "\"postgres\".\"public\".\"email_event_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "seed.hubspot_integration_tests.conversation_message_recipient_data": {"database": "postgres", "schema": "public", "name": "conversation_message_recipient_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "conversation_message_recipient_data.csv", "original_file_path": "seeds/conversation_message_recipient_data.csv", "unique_id": "seed.hubspot_integration_tests.conversation_message_recipient_data", "fqn": ["hubspot_integration_tests", "conversation_message_recipient_data"], "alias": "conversation_message_recipient_data", "checksum": {"name": "sha256", "checksum": "2085e1a7c69e9d3cdbf92032c4fac11aabd697ca52f355aca460343fbd31f962"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_id": "varchar", "actor_id": "varchar", "message_id": "varchar", "thread_id": "varchar", "name": "varchar", "recipient_field": "varchar", "delivery_identifier_type": "varchar", "delivery_identifier_value": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "actor_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "message_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "thread_id": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "name": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "recipient_field": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_type": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}", "delivery_identifier_value": "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"}}, "created_at": 1786398584.8995798, "relation_name": "\"postgres\".\"public\".\"conversation_message_recipient_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}, "model.hubspot.hubspot__contact_lists": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__contact_lists", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__contact_lists.sql", "original_file_path": "models/marketing/hubspot__contact_lists.sql", "unique_id": "model.hubspot.hubspot__contact_lists", "fqn": ["hubspot", "marketing", "hubspot__contact_lists"], "alias": "hubspot__contact_lists", "checksum": {"name": "sha256", "checksum": "b593e35696f3e3cf2c29908e94474d129496af452a13555f1016d374d5165238"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact list in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_name": {"name": "contact_list_name", "description": "The name of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_contact_list_deleted": {"name": "is_contact_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_bounces": {"name": "total_bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "total_clicks": {"name": "total_clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "total_deferrals": {"name": "total_deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "total_deliveries": {"name": "total_deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "total_drops": {"name": "total_drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "total_forwards": {"name": "total_forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "total_opens": {"name": "total_opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "total_prints": {"name": "total_prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "total_spam_reports": {"name": "total_spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "total_unsubscribes": {"name": "total_unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "total_unique_bounces": {"name": "total_unique_bounces", "description": "The total number of unique email sends with a bounce email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_bounces"]}, "total_unique_clicks": {"name": "total_unique_clicks", "description": "The total number of unique email sends with a click email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_clicks"]}, "total_unique_deferrals": {"name": "total_unique_deferrals", "description": "The total number of unique email sends with a deferral email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deferrals"]}, "total_unique_deliveries": {"name": "total_unique_deliveries", "description": "The total number of unique email sends with a delivery email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deliveries"]}, "total_unique_drops": {"name": "total_unique_drops", "description": "The total number of unique email sends with a drop email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_drops"]}, "total_unique_forwards": {"name": "total_unique_forwards", "description": "The total number of unique email sends with a forward email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_forwards"]}, "total_unique_opens": {"name": "total_unique_opens", "description": "The total number of unique email sends with a opens email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_opens"]}, "total_unique_prints": {"name": "total_unique_prints", "description": "The total number of unique email sends with a print email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_prints"]}, "total_unique_spam_reports": {"name": "total_unique_spam_reports", "description": "The total number of unique email sends with a spam report email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_spam_reports"]}, "total_unique_unsubscribes": {"name": "total_unique_unsubscribes", "description": "The total number of unique email sends with a unsubscribe email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_unsubscribes"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.7817886, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__contact_lists\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_contact_list_enabled'])) }}\n\nwith contact_lists as (\n\n select *\n from {{ ref('stg_hubspot__contact_list') }}\n\n{% if fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_enabled','hubspot_contact_list_member_enabled','hubspot_email_event_sent_enabled']) %}\n\n), email_metrics as (\n\n select *\n from {{ ref('int_hubspot__email_metrics__by_contact_list') }}\n\n), joined as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select \n contact_lists.*,\n {% for metric in email_metrics %}\n coalesce(email_metrics.total_{{ metric }}, 0) as total_{{ metric }},\n coalesce(email_metrics.total_unique_{{ metric }}, 0) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from contact_lists\n left join email_metrics\n on contact_lists.contact_list_id = email_metrics.contact_list_id\n and contact_lists.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined\n\n{% else %}\n\n)\n\nselect *\nfrom contact_lists\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list", "package": null, "version": null}, {"name": "int_hubspot__email_metrics__by_contact_list", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics"], "nodes": ["model.hubspot.stg_hubspot__contact_list", "model.hubspot.int_hubspot__email_metrics__by_contact_list", "model.hubspot.hubspot__email_sends"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__contact_lists.sql", "compiled": true, "compiled_code": "\n\nwith contact_lists as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list\"\n\n\n\n), email_metrics as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__email_metrics__by_contact_list\"\n\n), joined as (\n \n select \n contact_lists.*,\n \n coalesce(email_metrics.total_bounces, 0) as total_bounces,\n coalesce(email_metrics.total_unique_bounces, 0) as total_unique_bounces\n ,\n \n coalesce(email_metrics.total_clicks, 0) as total_clicks,\n coalesce(email_metrics.total_unique_clicks, 0) as total_unique_clicks\n ,\n \n coalesce(email_metrics.total_deferrals, 0) as total_deferrals,\n coalesce(email_metrics.total_unique_deferrals, 0) as total_unique_deferrals\n ,\n \n coalesce(email_metrics.total_deliveries, 0) as total_deliveries,\n coalesce(email_metrics.total_unique_deliveries, 0) as total_unique_deliveries\n ,\n \n coalesce(email_metrics.total_drops, 0) as total_drops,\n coalesce(email_metrics.total_unique_drops, 0) as total_unique_drops\n ,\n \n coalesce(email_metrics.total_forwards, 0) as total_forwards,\n coalesce(email_metrics.total_unique_forwards, 0) as total_unique_forwards\n ,\n \n coalesce(email_metrics.total_opens, 0) as total_opens,\n coalesce(email_metrics.total_unique_opens, 0) as total_unique_opens\n ,\n \n coalesce(email_metrics.total_prints, 0) as total_prints,\n coalesce(email_metrics.total_unique_prints, 0) as total_unique_prints\n ,\n \n coalesce(email_metrics.total_spam_reports, 0) as total_spam_reports,\n coalesce(email_metrics.total_unique_spam_reports, 0) as total_unique_spam_reports\n ,\n \n coalesce(email_metrics.total_unsubscribes, 0) as total_unsubscribes,\n coalesce(email_metrics.total_unique_unsubscribes, 0) as total_unique_unsubscribes\n \n \n from contact_lists\n left join email_metrics\n on contact_lists.contact_list_id = email_metrics.contact_list_id\n and contact_lists.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_campaigns": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_campaigns", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__email_campaigns.sql", "original_file_path": "models/marketing/hubspot__email_campaigns.sql", "unique_id": "model.hubspot.hubspot__email_campaigns", "fqn": ["hubspot", "marketing", "hubspot__email_campaigns"], "alias": "hubspot__email_campaigns", "checksum": {"name": "sha256", "checksum": "e631b4bcffd2f6c080803b7a733ca9a639a8789369d93062656c4148e06f39fc"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an email campaign in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The app ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The app name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "The ID of the content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_name": {"name": "email_campaign_name", "description": "The name of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_sub_type": {"name": "email_campaign_sub_type", "description": "The email campaign sub-type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_subject": {"name": "email_campaign_subject", "description": "The subject of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_type": {"name": "email_campaign_type", "description": "The email campaign type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_included": {"name": "num_included", "description": "The number of messages included as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_queued": {"name": "num_queued", "description": "The number of messages queued as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_bounces": {"name": "total_bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "total_clicks": {"name": "total_clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "total_deferrals": {"name": "total_deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "total_deliveries": {"name": "total_deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "total_drops": {"name": "total_drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "total_forwards": {"name": "total_forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "total_opens": {"name": "total_opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "total_prints": {"name": "total_prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "total_spam_reports": {"name": "total_spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "total_unsubscribes": {"name": "total_unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "total_unique_bounces": {"name": "total_unique_bounces", "description": "The total number of unique email sends with a bounce email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_bounces"]}, "total_unique_clicks": {"name": "total_unique_clicks", "description": "The total number of unique email sends with a click email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_clicks"]}, "total_unique_deferrals": {"name": "total_unique_deferrals", "description": "The total number of unique email sends with a deferral email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deferrals"]}, "total_unique_deliveries": {"name": "total_unique_deliveries", "description": "The total number of unique email sends with a delivery email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deliveries"]}, "total_unique_drops": {"name": "total_unique_drops", "description": "The total number of unique email sends with a drop email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_drops"]}, "total_unique_forwards": {"name": "total_unique_forwards", "description": "The total number of unique email sends with a forward email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_forwards"]}, "total_unique_opens": {"name": "total_unique_opens", "description": "The total number of unique email sends with a opens email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_opens"]}, "total_unique_prints": {"name": "total_unique_prints", "description": "The total number of unique email sends with a print email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_prints"]}, "total_unique_spam_reports": {"name": "total_unique_spam_reports", "description": "The total number of unique email sends with a spam report email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_spam_reports"]}, "total_unique_unsubscribes": {"name": "total_unique_unsubscribes", "description": "The total number of unique email sends with a unsubscribe email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_unsubscribes"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.7646697, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_campaigns\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\n\nwith campaigns as (\n\n select *\n from {{ ref('stg_hubspot__email_campaign') }}\n\n), email_sends as (\n\n select *\n from {{ ref('hubspot__email_sends') }}\n\n), email_metrics as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select\n email_campaign_id,\n source_relation,\n {% for metric in email_metrics %}\n sum(email_sends.{{ metric }}) as total_{{ metric }},\n count(distinct case when email_sends.{{ metric }} > 0 then email_send_id end) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from email_sends\n group by 1, 2\n\n), joined as (\n\n select \n campaigns.*,\n {% for metric in email_metrics %}\n coalesce(email_metrics.total_{{ metric }}, 0) as total_{{ metric }},\n coalesce(email_metrics.total_unique_{{ metric }}, 0) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from campaigns\n left join email_metrics\n on campaigns.email_campaign_id = email_metrics.email_campaign_id\n and campaigns.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_campaign", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics"], "nodes": ["model.hubspot.stg_hubspot__email_campaign", "model.hubspot.hubspot__email_sends"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__email_campaigns.sql", "compiled": true, "compiled_code": "\n\n\nwith campaigns as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign\"\n\n), email_sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\n\n), email_metrics as (\n \n select\n email_campaign_id,\n source_relation,\n \n sum(email_sends.bounces) as total_bounces,\n count(distinct case when email_sends.bounces > 0 then email_send_id end) as total_unique_bounces\n ,\n \n sum(email_sends.clicks) as total_clicks,\n count(distinct case when email_sends.clicks > 0 then email_send_id end) as total_unique_clicks\n ,\n \n sum(email_sends.deferrals) as total_deferrals,\n count(distinct case when email_sends.deferrals > 0 then email_send_id end) as total_unique_deferrals\n ,\n \n sum(email_sends.deliveries) as total_deliveries,\n count(distinct case when email_sends.deliveries > 0 then email_send_id end) as total_unique_deliveries\n ,\n \n sum(email_sends.drops) as total_drops,\n count(distinct case when email_sends.drops > 0 then email_send_id end) as total_unique_drops\n ,\n \n sum(email_sends.forwards) as total_forwards,\n count(distinct case when email_sends.forwards > 0 then email_send_id end) as total_unique_forwards\n ,\n \n sum(email_sends.opens) as total_opens,\n count(distinct case when email_sends.opens > 0 then email_send_id end) as total_unique_opens\n ,\n \n sum(email_sends.prints) as total_prints,\n count(distinct case when email_sends.prints > 0 then email_send_id end) as total_unique_prints\n ,\n \n sum(email_sends.spam_reports) as total_spam_reports,\n count(distinct case when email_sends.spam_reports > 0 then email_send_id end) as total_unique_spam_reports\n ,\n \n sum(email_sends.unsubscribes) as total_unsubscribes,\n count(distinct case when email_sends.unsubscribes > 0 then email_send_id end) as total_unique_unsubscribes\n \n \n from email_sends\n group by 1, 2\n\n), joined as (\n\n select \n campaigns.*,\n \n coalesce(email_metrics.total_bounces, 0) as total_bounces,\n coalesce(email_metrics.total_unique_bounces, 0) as total_unique_bounces\n ,\n \n coalesce(email_metrics.total_clicks, 0) as total_clicks,\n coalesce(email_metrics.total_unique_clicks, 0) as total_unique_clicks\n ,\n \n coalesce(email_metrics.total_deferrals, 0) as total_deferrals,\n coalesce(email_metrics.total_unique_deferrals, 0) as total_unique_deferrals\n ,\n \n coalesce(email_metrics.total_deliveries, 0) as total_deliveries,\n coalesce(email_metrics.total_unique_deliveries, 0) as total_unique_deliveries\n ,\n \n coalesce(email_metrics.total_drops, 0) as total_drops,\n coalesce(email_metrics.total_unique_drops, 0) as total_unique_drops\n ,\n \n coalesce(email_metrics.total_forwards, 0) as total_forwards,\n coalesce(email_metrics.total_unique_forwards, 0) as total_unique_forwards\n ,\n \n coalesce(email_metrics.total_opens, 0) as total_opens,\n coalesce(email_metrics.total_unique_opens, 0) as total_unique_opens\n ,\n \n coalesce(email_metrics.total_prints, 0) as total_prints,\n coalesce(email_metrics.total_unique_prints, 0) as total_unique_prints\n ,\n \n coalesce(email_metrics.total_spam_reports, 0) as total_spam_reports,\n coalesce(email_metrics.total_unique_spam_reports, 0) as total_unique_spam_reports\n ,\n \n coalesce(email_metrics.total_unsubscribes, 0) as total_unsubscribes,\n coalesce(email_metrics.total_unique_unsubscribes, 0) as total_unique_unsubscribes\n \n \n from campaigns\n left join email_metrics\n on campaigns.email_campaign_id = email_metrics.email_campaign_id\n and campaigns.source_relation = email_metrics.source_relation\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__contacts": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__contacts", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__contacts.sql", "original_file_path": "models/marketing/hubspot__contacts.sql", "unique_id": "model.hubspot.hubspot__contacts", "fqn": ["hubspot", "marketing", "hubspot__contacts"], "alias": "hubspot__contacts", "checksum": {"name": "sha256", "checksum": "d60983de19d48e4c0c032181bcf8dfc2896d7589a844d60895ff10cde8cb6a51"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_company": {"name": "contact_company", "description": "The name of the contact's company", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "The email address of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date that the contact was created in your HubSpot account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "job_title": {"name": "job_title", "description": "The contact's job title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_annual_revenue": {"name": "company_annual_revenue", "description": "The contact's annual company revenue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_bounces": {"name": "total_bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "total_clicks": {"name": "total_clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "total_deferrals": {"name": "total_deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "total_deliveries": {"name": "total_deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "total_drops": {"name": "total_drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "total_forwards": {"name": "total_forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "total_opens": {"name": "total_opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "total_prints": {"name": "total_prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "total_spam_reports": {"name": "total_spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "total_unsubscribes": {"name": "total_unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "total_unique_bounces": {"name": "total_unique_bounces", "description": "The total number of unique email sends with a bounce email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_bounces"]}, "total_unique_clicks": {"name": "total_unique_clicks", "description": "The total number of unique email sends with a click email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_clicks"]}, "total_unique_deferrals": {"name": "total_unique_deferrals", "description": "The total number of unique email sends with a deferral email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deferrals"]}, "total_unique_deliveries": {"name": "total_unique_deliveries", "description": "The total number of unique email sends with a delivery email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_deliveries"]}, "total_unique_drops": {"name": "total_unique_drops", "description": "The total number of unique email sends with a drop email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_drops"]}, "total_unique_forwards": {"name": "total_unique_forwards", "description": "The total number of unique email sends with a forward email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_forwards"]}, "total_unique_opens": {"name": "total_unique_opens", "description": "The total number of unique email sends with a opens email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_opens"]}, "total_unique_prints": {"name": "total_unique_prints", "description": "The total number of unique email sends with a print email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_prints"]}, "total_unique_spam_reports": {"name": "total_unique_spam_reports", "description": "The total number of unique email sends with a spam report email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_spam_reports"]}, "total_unique_unsubscribes": {"name": "total_unique_unsubscribes", "description": "The total number of unique email sends with a unsubscribe email event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unique_unsubscribes"]}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "merged_object_ids": {"name": "merged_object_ids", "description": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_form_id": {"name": "calculated_first_conversion_form_id", "description": "ID of the form associated with the contact's first conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_date": {"name": "calculated_first_conversion_date", "description": "Timestamp of the contact's first form submission, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_form_name": {"name": "calculated_first_conversion_form_name", "description": "Name of the form submitted during the contact's first conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_form_type": {"name": "calculated_first_conversion_form_type", "description": "Type of form submitted during the contact's first conversion (e.g., regular, pop-up), calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_form_id": {"name": "calculated_most_recent_conversion_form_id", "description": "ID of the form associated with the contact's most recent conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_date": {"name": "calculated_most_recent_conversion_date", "description": "Timestamp of the contact's most recent form submission, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_form_name": {"name": "calculated_most_recent_conversion_form_name", "description": "Name of the form submitted during the contact's most recent conversion, calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_form_type": {"name": "calculated_most_recent_conversion_form_type", "description": "Type of form submitted during the contact's most recent conversion (e.g., regular, pop-up), calculated by this package.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_fields_responded_to": {"name": "calculated_first_conversion_fields_responded_to", "description": "Comma-separated list of unique field names submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_first_conversion_total_responses": {"name": "calculated_first_conversion_total_responses", "description": "Number of fields submitted during the contact's first form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_fields_responded_to": {"name": "calculated_most_recent_conversion_fields_responded_to", "description": "Comma-separated list of unique field names submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "calculated_most_recent_conversion_total_responses": {"name": "calculated_most_recent_conversion_total_responses", "description": "Number of fields submitted during the contact's most recent form conversion. Only populated when `hubspot_submission_response_enabled` is true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_form_submissions": {"name": "total_form_submissions", "description": "Total number of form submissions made by the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_unique_form_submissions": {"name": "total_unique_form_submissions", "description": "Count of distinct forms submitted by the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.776822, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__contacts\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n{% set emails_enabled = fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled']) %}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled','hubspot_engagement_contact_enabled']) %}\n{% set forms_enabled = fivetran_utils.enabled_vars(['hubspot_contact_form_enabled']) %}\n\n{% set cte_ref = 'contacts' %}\nwith contacts as (\n\n select *\n from {{ ref('int_hubspot__contact_merge_adjust') }} \n\n{% if emails_enabled %}\n\n), email_sends as (\n\n select *\n from {{ ref('hubspot__email_sends') }}\n\n), email_metrics as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select\n recipient_email_address,\n source_relation,\n {% for metric in email_metrics %}\n sum({{ metric }}) as total_{{ metric }},\n count(distinct case when {{ metric }} > 0 then email_send_id end)\n as total_unique_{{ metric }}{{ ',' if not loop.last }}\n {% endfor %}\n from email_sends\n group by 1, 2\n\n), email_joined as (\n\n select \n contacts.*,\n {% for metric in email_metrics %}\n coalesce(email_metrics.total_{{ metric }}, 0) as total_{{ metric }},\n coalesce(email_metrics.total_unique_{{ metric }}, 0)\n as total_unique_{{ metric }}{{ ',' if not loop.last }}\n {% endfor %}\n from contacts\n left join email_metrics\n on contacts.email = email_metrics.recipient_email_address\n and contacts.source_relation = email_metrics.source_relation\n\n{% set cte_ref = 'email_joined' %}\n{% endif %}\n\n{% if engagements_enabled %}\n), engagements as (\n\n select *\n from {{ ref('int_hubspot__engagement_metrics__by_contact') }}\n\n), engagements_joined as (\n\n select \n {{ cte_ref }}.*,\n {% for metric in engagement_metrics() %}\n coalesce(engagements.{{ metric }},0) as {{ metric }}{{ ',' if not loop.last }}\n {% endfor %}\n from {{ cte_ref }}\n left join engagements\n on {{ cte_ref }}.contact_id = engagements.contact_id\n and {{ cte_ref }}.source_relation = engagements.source_relation\n\n{% set cte_ref = 'engagements_joined' %}\n{% endif %}\n\n{% if forms_enabled %}\n), conversions as (\n\n select *\n from {{ ref('int_hubspot__form_metrics__by_contact') }}\n\n), conversions_joined as (\n\n select \n {{ cte_ref }}.*,\n {% set form_metrics = ['form_id', 'date', 'form_name', 'form_type'] %}\n {% if var('hubspot_submission_response_enabled', true) %}\n {% set form_metrics = form_metrics + ['fields_responded_to', 'total_responses'] %}\n {% endif %}\n {% for first_or_last in ['first_conversion', 'most_recent_conversion'] %}\n {% for metric in form_metrics %}\n conversions.{{ first_or_last }}_{{ metric }} as calculated_{{ first_or_last }}_{{ metric }},\n {% endfor %}\n {% endfor %}\n conversions.total_form_submissions,\n conversions.total_unique_form_submissions\n from {{ cte_ref }}\n left join conversions\n on {{ cte_ref }}.contact_id = conversions.contact_id\n and {{ cte_ref }}.source_relation = conversions.source_relation\n\n{% set cte_ref = 'conversions_joined' %}\n{% endif %}\n)\n\nselect *\nfrom {{ cte_ref }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "int_hubspot__engagement_metrics__by_contact", "package": null, "version": null}, {"name": "int_hubspot__form_metrics__by_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__engagement_metrics__by_contact", "model.hubspot.int_hubspot__form_metrics__by_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__contacts.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n), __dbt__cte__int_hubspot__form_metrics__by_contact as (\n\n\nwith form as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\n\n), contact_form_submission as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"\n\n\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n \n string_agg(distinct field_name, ', ')\n\n as fields_responded_to,\n count(*) as total_responses\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\n group by 1, 2\n\n\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n \n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n \n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n \n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n \n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n \n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n \n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n\n), email_sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\n\n), email_metrics as (\n \n select\n recipient_email_address,\n source_relation,\n \n sum(bounces) as total_bounces,\n count(distinct case when bounces > 0 then email_send_id end)\n as total_unique_bounces,\n \n sum(clicks) as total_clicks,\n count(distinct case when clicks > 0 then email_send_id end)\n as total_unique_clicks,\n \n sum(deferrals) as total_deferrals,\n count(distinct case when deferrals > 0 then email_send_id end)\n as total_unique_deferrals,\n \n sum(deliveries) as total_deliveries,\n count(distinct case when deliveries > 0 then email_send_id end)\n as total_unique_deliveries,\n \n sum(drops) as total_drops,\n count(distinct case when drops > 0 then email_send_id end)\n as total_unique_drops,\n \n sum(forwards) as total_forwards,\n count(distinct case when forwards > 0 then email_send_id end)\n as total_unique_forwards,\n \n sum(opens) as total_opens,\n count(distinct case when opens > 0 then email_send_id end)\n as total_unique_opens,\n \n sum(prints) as total_prints,\n count(distinct case when prints > 0 then email_send_id end)\n as total_unique_prints,\n \n sum(spam_reports) as total_spam_reports,\n count(distinct case when spam_reports > 0 then email_send_id end)\n as total_unique_spam_reports,\n \n sum(unsubscribes) as total_unsubscribes,\n count(distinct case when unsubscribes > 0 then email_send_id end)\n as total_unique_unsubscribes\n \n from email_sends\n group by 1, 2\n\n), email_joined as (\n\n select \n contacts.*,\n \n coalesce(email_metrics.total_bounces, 0) as total_bounces,\n coalesce(email_metrics.total_unique_bounces, 0)\n as total_unique_bounces,\n \n coalesce(email_metrics.total_clicks, 0) as total_clicks,\n coalesce(email_metrics.total_unique_clicks, 0)\n as total_unique_clicks,\n \n coalesce(email_metrics.total_deferrals, 0) as total_deferrals,\n coalesce(email_metrics.total_unique_deferrals, 0)\n as total_unique_deferrals,\n \n coalesce(email_metrics.total_deliveries, 0) as total_deliveries,\n coalesce(email_metrics.total_unique_deliveries, 0)\n as total_unique_deliveries,\n \n coalesce(email_metrics.total_drops, 0) as total_drops,\n coalesce(email_metrics.total_unique_drops, 0)\n as total_unique_drops,\n \n coalesce(email_metrics.total_forwards, 0) as total_forwards,\n coalesce(email_metrics.total_unique_forwards, 0)\n as total_unique_forwards,\n \n coalesce(email_metrics.total_opens, 0) as total_opens,\n coalesce(email_metrics.total_unique_opens, 0)\n as total_unique_opens,\n \n coalesce(email_metrics.total_prints, 0) as total_prints,\n coalesce(email_metrics.total_unique_prints, 0)\n as total_unique_prints,\n \n coalesce(email_metrics.total_spam_reports, 0) as total_spam_reports,\n coalesce(email_metrics.total_unique_spam_reports, 0)\n as total_unique_spam_reports,\n \n coalesce(email_metrics.total_unsubscribes, 0) as total_unsubscribes,\n coalesce(email_metrics.total_unique_unsubscribes, 0)\n as total_unique_unsubscribes\n \n from contacts\n left join email_metrics\n on contacts.email = email_metrics.recipient_email_address\n and contacts.source_relation = email_metrics.source_relation\n\n\n\n\n\n), engagements as (\n\n select *\n from __dbt__cte__int_hubspot__engagement_metrics__by_contact\n\n), engagements_joined as (\n\n select \n email_joined.*,\n \n coalesce(engagements.count_engagement_notes,0) as count_engagement_notes,\n \n coalesce(engagements.count_engagement_tasks,0) as count_engagement_tasks,\n \n coalesce(engagements.count_engagement_calls,0) as count_engagement_calls,\n \n coalesce(engagements.count_engagement_meetings,0) as count_engagement_meetings,\n \n coalesce(engagements.count_engagement_emails,0) as count_engagement_emails,\n \n coalesce(engagements.count_engagement_incoming_emails,0) as count_engagement_incoming_emails,\n \n coalesce(engagements.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails\n \n from email_joined\n left join engagements\n on email_joined.contact_id = engagements.contact_id\n and email_joined.source_relation = engagements.source_relation\n\n\n\n\n\n), conversions as (\n\n select *\n from __dbt__cte__int_hubspot__form_metrics__by_contact\n\n), conversions_joined as (\n\n select \n engagements_joined.*,\n \n \n \n \n \n \n conversions.first_conversion_form_id as calculated_first_conversion_form_id,\n \n conversions.first_conversion_date as calculated_first_conversion_date,\n \n conversions.first_conversion_form_name as calculated_first_conversion_form_name,\n \n conversions.first_conversion_form_type as calculated_first_conversion_form_type,\n \n conversions.first_conversion_fields_responded_to as calculated_first_conversion_fields_responded_to,\n \n conversions.first_conversion_total_responses as calculated_first_conversion_total_responses,\n \n \n \n conversions.most_recent_conversion_form_id as calculated_most_recent_conversion_form_id,\n \n conversions.most_recent_conversion_date as calculated_most_recent_conversion_date,\n \n conversions.most_recent_conversion_form_name as calculated_most_recent_conversion_form_name,\n \n conversions.most_recent_conversion_form_type as calculated_most_recent_conversion_form_type,\n \n conversions.most_recent_conversion_fields_responded_to as calculated_most_recent_conversion_fields_responded_to,\n \n conversions.most_recent_conversion_total_responses as calculated_most_recent_conversion_total_responses,\n \n \n conversions.total_form_submissions,\n conversions.total_unique_form_submissions\n from engagements_joined\n left join conversions\n on engagements_joined.contact_id = conversions.contact_id\n and engagements_joined.source_relation = conversions.source_relation\n\n\n\n)\n\nselect *\nfrom conversions_joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n)"}, {"id": "model.hubspot.int_hubspot__form_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__form_metrics__by_contact as (\n\n\nwith form as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\n\n), contact_form_submission as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"\n\n\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n \n string_agg(distinct field_name, ', ')\n\n as fields_responded_to,\n count(*) as total_responses\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\n group by 1, 2\n\n\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n \n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n \n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n \n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n \n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n \n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n \n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__marketing_event_performance": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__marketing_event_performance", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__marketing_event_performance.sql", "original_file_path": "models/marketing/hubspot__marketing_event_performance.sql", "unique_id": "model.hubspot.hubspot__marketing_event_performance", "fqn": ["hubspot", "marketing", "hubspot__marketing_event_performance"], "alias": "hubspot__marketing_event_performance", "checksum": {"name": "sha256", "checksum": "4ef5d6536ca95b79c086b85d122eb0c37c888ac6c15dac2fd077979699f2b774"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a marketing event with aggregated attendance metrics, contact-level participation counts, segment list membership, and optional custom properties (e.g. budget spent).\n", "columns": {"marketing_event_performance_id": {"name": "marketing_event_performance_id", "description": "Surrogate key hashed on `source_relation` and `marketing_event_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_marketing_event_deleted": {"name": "is_marketing_event_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The unique ID of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_name": {"name": "event_name", "description": "The name of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_status": {"name": "event_status", "description": "The current status of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_url": {"name": "event_url", "description": "A URL in the external event application where the marketing event can be managed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_organizer": {"name": "event_organizer", "description": "The name of the organizer of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_description": {"name": "event_description", "description": "A description of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The string ID of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The name of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "external_event_id": {"name": "external_event_id", "description": "The ID that is associated with this marketing event in the external event application.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp when the marketing event starts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp when the marketing event ends.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_duration_minutes": {"name": "event_duration_minutes", "description": "The duration of the event in minutes, calculated from start to end timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_cancelled": {"name": "event_cancelled", "description": "Boolean indicating whether the marketing event was cancelled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_completed": {"name": "event_completed", "description": "Boolean indicating whether the marketing event has been completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "registrants": {"name": "registrants", "description": "Number of registered contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendees": {"name": "attendees", "description": "Number of attended contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellations": {"name": "cancellations", "description": "Number of cancelled contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_shows": {"name": "no_shows", "description": "Number of no-show contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_rate": {"name": "attendance_rate", "description": "Ratio of attendees to registrants. Null when registrants is zero.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_show_rate": {"name": "no_show_rate", "description": "Ratio of no-shows to registrants. Null when registrants is zero.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellation_rate": {"name": "cancellation_rate", "description": "Ratio of cancellations to registrants. Null when registrants is zero.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_contacts": {"name": "total_contacts", "description": "Count of distinct contacts with a record in the participant table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_attended_contacts": {"name": "total_attended_contacts", "description": "Count of distinct contacts with attendance_state = 'ATTENDED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_cancelled_contacts": {"name": "total_cancelled_contacts", "description": "Count of distinct contacts with attendance_state = 'CANCELLED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_empty_contacts": {"name": "total_empty_contacts", "description": "Count of distinct contacts with attendance_state = 'EMPTY'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_no_show_contacts": {"name": "total_no_show_contacts", "description": "Count of distinct contacts with attendance_state = 'NO_SHOW'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_registered_contacts": {"name": "total_registered_contacts", "description": "Count of distinct contacts with attendance_state = 'REGISTERED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "avg_attendance_duration_seconds": {"name": "avg_attendance_duration_seconds", "description": "Average number of seconds the participation lasted, across all participant records.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_lists": {"name": "total_lists", "description": "Count of active (non-deleted) lists associated with the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the marketing event was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp when the marketing event was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.741391, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__marketing_event_performance\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true)) }}\n\nwith marketing_events as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event') }}\n\n{% if var('hubspot_marketing_event_participant_enabled', true) %}\n\n), participants_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(distinct contact_id) as total_contacts,\n count(distinct case when attendance_state = 'ATTENDED' then contact_id end) as total_attended_contacts,\n count(distinct case when attendance_state = 'CANCELLED' then contact_id end) as total_cancelled_contacts,\n count(distinct case when attendance_state = 'EMPTY' then contact_id end) as total_empty_contacts,\n count(distinct case when attendance_state = 'NO_SHOW' then contact_id end) as total_no_show_contacts,\n count(distinct case when attendance_state = 'REGISTERED' then contact_id end) as total_registered_contacts,\n avg(attendance_duration_seconds) as avg_attendance_duration_seconds\n from {{ ref('stg_hubspot__marketing_event_participant') }}\n group by 1, 2\n\n{% endif %}\n\n{% if var('hubspot_marketing_event_list_enabled', true) %}\n\n), lists_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(marketing_event_list_id) as total_lists\n from {{ ref('stg_hubspot__marketing_event_list') }}\n where deleted_timestamp is null\n group by 1, 2\n\n{% endif %}\n\n{% set custom_property_columns = var('hubspot_marketing_event_custom_properties', []) %}\n\n{% if var('hubspot_marketing_event_custom_property_enabled', true) and custom_property_columns != [] %}\n\n), custom_properties as (\n\n select\n source_relation,\n marketing_event_id\n {% for column in custom_property_columns %}\n , max(case when property_name = '{{ column }}' then property_value end) as property_{{ dbt_utils.slugify(column) | replace(' ', '_') | lower }}\n {% endfor %}\n from {{ ref('stg_hubspot__marketing_event_custom_property') }}\n group by 1, 2\n\n{% endif %}\n\n), joined as (\n\n select\n marketing_events.*,\n\n -- Derived time and rate metrics\n {{ dbt.datediff(\"marketing_events.start_timestamp\", \"marketing_events.end_timestamp\", \"minute\") }} as event_duration_minutes,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.attendees as {{ dbt.type_numeric() }}) / marketing_events.registrants\n end as attendance_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.no_shows as {{ dbt.type_numeric() }}) / marketing_events.registrants\n end as no_show_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.cancellations as {{ dbt.type_numeric() }}) / marketing_events.registrants\n end as cancellation_rate\n\n {% if var('hubspot_marketing_event_participant_enabled', true) %}\n , participants_agg.total_contacts\n , participants_agg.total_attended_contacts\n , participants_agg.total_cancelled_contacts\n , participants_agg.total_empty_contacts\n , participants_agg.total_no_show_contacts\n , participants_agg.total_registered_contacts\n , participants_agg.avg_attendance_duration_seconds\n {% endif %}\n\n {% if var('hubspot_marketing_event_list_enabled', true) %}\n , coalesce(lists_agg.total_lists, 0) as total_lists\n {% endif %}\n\n {% if var('hubspot_marketing_event_custom_property_enabled', true) and custom_property_columns != [] %}\n {% for column in custom_property_columns %}\n , custom_properties.property_{{ dbt_utils.slugify(column) | replace(' ', '_') | lower }}\n {% endfor %}\n {% endif %}\n\n from marketing_events\n\n {% if var('hubspot_marketing_event_participant_enabled', true) %}\n left join participants_agg\n on marketing_events.marketing_event_id = participants_agg.marketing_event_id\n and marketing_events.source_relation = participants_agg.source_relation\n {% endif %}\n\n {% if var('hubspot_marketing_event_list_enabled', true) %}\n left join lists_agg\n on marketing_events.marketing_event_id = lists_agg.marketing_event_id\n and marketing_events.source_relation = lists_agg.source_relation\n {% endif %}\n\n {% if var('hubspot_marketing_event_custom_property_enabled', true) and custom_property_columns != [] %}\n left join custom_properties\n on marketing_events.marketing_event_id = custom_properties.marketing_event_id\n and marketing_events.source_relation = custom_properties.source_relation\n {% endif %}\n\n)\n\nselect\n {{ dbt_utils.generate_surrogate_key(['source_relation', 'marketing_event_id']) }} as marketing_event_performance_id,\n *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_participant", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.type_numeric", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__marketing_event", "model.hubspot.stg_hubspot__marketing_event_participant", "model.hubspot.stg_hubspot__marketing_event_list"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__marketing_event_performance.sql", "compiled": true, "compiled_code": "\n\nwith marketing_events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event\"\n\n\n\n), participants_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(distinct contact_id) as total_contacts,\n count(distinct case when attendance_state = 'ATTENDED' then contact_id end) as total_attended_contacts,\n count(distinct case when attendance_state = 'CANCELLED' then contact_id end) as total_cancelled_contacts,\n count(distinct case when attendance_state = 'EMPTY' then contact_id end) as total_empty_contacts,\n count(distinct case when attendance_state = 'NO_SHOW' then contact_id end) as total_no_show_contacts,\n count(distinct case when attendance_state = 'REGISTERED' then contact_id end) as total_registered_contacts,\n avg(attendance_duration_seconds) as avg_attendance_duration_seconds\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant\"\n group by 1, 2\n\n\n\n\n\n), lists_agg as (\n\n select\n source_relation,\n marketing_event_id,\n count(marketing_event_list_id) as total_lists\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list\"\n where deleted_timestamp is null\n group by 1, 2\n\n\n\n\n\n\n\n), joined as (\n\n select\n marketing_events.*,\n\n -- Derived time and rate metrics\n \n (\n (\n ((marketing_events.end_timestamp)::date - (marketing_events.start_timestamp)::date)\n * 24 + date_part('hour', (marketing_events.end_timestamp)::timestamp) - date_part('hour', (marketing_events.start_timestamp)::timestamp))\n * 60 + date_part('minute', (marketing_events.end_timestamp)::timestamp) - date_part('minute', (marketing_events.start_timestamp)::timestamp))\n as event_duration_minutes,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.attendees as numeric(28,6)) / marketing_events.registrants\n end as attendance_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.no_shows as numeric(28,6)) / marketing_events.registrants\n end as no_show_rate,\n\n case when coalesce(marketing_events.registrants, 0) > 0\n then cast(marketing_events.cancellations as numeric(28,6)) / marketing_events.registrants\n end as cancellation_rate\n\n \n , participants_agg.total_contacts\n , participants_agg.total_attended_contacts\n , participants_agg.total_cancelled_contacts\n , participants_agg.total_empty_contacts\n , participants_agg.total_no_show_contacts\n , participants_agg.total_registered_contacts\n , participants_agg.avg_attendance_duration_seconds\n \n\n \n , coalesce(lists_agg.total_lists, 0) as total_lists\n \n\n \n\n from marketing_events\n\n \n left join participants_agg\n on marketing_events.marketing_event_id = participants_agg.marketing_event_id\n and marketing_events.source_relation = participants_agg.source_relation\n \n\n \n left join lists_agg\n on marketing_events.marketing_event_id = lists_agg.marketing_event_id\n and marketing_events.source_relation = lists_agg.source_relation\n \n\n \n\n)\n\nselect\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(marketing_event_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as marketing_event_performance_id,\n *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["marketing_event_performance_id"], "time_spine": null}, "model.hubspot.hubspot__email_sends": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_sends", "resource_type": "model", "package_name": "hubspot", "path": "marketing/hubspot__email_sends.sql", "original_file_path": "models/marketing/hubspot__email_sends.sql", "unique_id": "model.hubspot.hubspot__email_sends", "fqn": ["hubspot", "marketing", "hubspot__email_sends"], "alias": "hubspot__email_sends", "checksum": {"name": "sha256", "checksum": "8eb8e3c2b795c7ab4020483711e2145413f710594aaa9f3f5721e1673870eccd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SENT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "bounces": {"name": "bounces", "description": "The total number of bounce email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.bounces"]}, "clicks": {"name": "clicks", "description": "The total number of click email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.clicks"]}, "deferrals": {"name": "deferrals", "description": "The total number of deferral email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deferrals"]}, "deliveries": {"name": "deliveries", "description": "The total number of delivery email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.deliveries"]}, "drops": {"name": "drops", "description": "The total number of drop email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.drops"]}, "forwards": {"name": "forwards", "description": "The total number of forward email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.forwards"]}, "opens": {"name": "opens", "description": "The total number of open email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.opens"]}, "prints": {"name": "prints", "description": "The total number of print email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.prints"]}, "spam_reports": {"name": "spam_reports", "description": "The total number of spam report email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.spam_reports"]}, "unsubscribes": {"name": "unsubscribes", "description": "The total number of unsubscribe email events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.unsubscribes"]}, "was_bounced": {"name": "was_bounced", "description": "Whether the email was bounced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_clicked": {"name": "was_clicked", "description": "Whether the email was clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_deferred": {"name": "was_deferred", "description": "Whether the email was deferred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_delivered": {"name": "was_delivered", "description": "Whether the email was delivered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_forwarded": {"name": "was_forwarded", "description": "Whether the email was forwarded.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_opened": {"name": "was_opened", "description": "Whether the email was opened.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_printed": {"name": "was_printed", "description": "Whether the email was printed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_spam_reported": {"name": "was_spam_reported", "description": "Whether the email was spam reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "was_unsubscribed": {"name": "was_unsubscribed", "description": "Whether the email was unsubscribed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/marketing.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.7539573, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_sends\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\nwith sends as (\n\n select *\n from {{ ref('hubspot__email_event_sent') }}\n\n), metrics as (\n\n select *\n from {{ ref('int_hubspot__email_event_aggregates') }}\n\n), joined as (\n\n select\n sends.*,\n coalesce(metrics.bounces,0) as bounces,\n coalesce(metrics.clicks,0) as clicks,\n coalesce(metrics.deferrals,0) as deferrals,\n coalesce(metrics.deliveries,0) as deliveries,\n coalesce(metrics.drops,0) as drops,\n coalesce(metrics.forwards,0) as forwards,\n coalesce(metrics.opens,0) as opens,\n coalesce(metrics.prints,0) as prints,\n coalesce(metrics.spam_reports,0) as spam_reports\n from sends\n left join metrics\n on sends.email_send_id = metrics.email_send_id\n and sends.source_relation = metrics.source_relation\n\n), booleans as (\n\n select \n *,\n bounces > 0 as was_bounced,\n clicks > 0 as was_clicked,\n deferrals > 0 as was_deferred,\n deliveries > 0 as was_delivered,\n forwards > 0 as was_forwarded,\n opens > 0 as was_opened,\n prints > 0 as was_printed,\n spam_reports > 0 as was_spam_reported\n from joined\n\n{% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n\n), unsubscribes as (\n\n select *\n from {{ ref('int_hubspot__email_aggregate_status_change') }}\n\n), unsubscribes_joined as (\n\n select\n booleans.*,\n coalesce(unsubscribes.unsubscribes,0) as unsubscribes,\n coalesce(unsubscribes.unsubscribes,0) > 0 as was_unsubscribed\n from booleans\n left join unsubscribes\n on booleans.email_send_id = unsubscribes.email_send_id\n and booleans.email_campaign_id = unsubscribes.email_campaign_id\n and booleans.source_relation = unsubscribes.source_relation\n)\n\nselect *\nfrom unsubscribes_joined\n\n{% else %}\n\n)\n\nselect *\nfrom booleans\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}, {"name": "int_hubspot__email_event_aggregates", "package": null, "version": null}, {"name": "int_hubspot__email_aggregate_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.hubspot.hubspot__email_event_sent", "model.hubspot.int_hubspot__email_event_aggregates", "model.hubspot.int_hubspot__email_aggregate_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/hubspot__email_sends.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n), __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n), sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n\n), metrics as (\n\n select *\n from __dbt__cte__int_hubspot__email_event_aggregates\n\n), joined as (\n\n select\n sends.*,\n coalesce(metrics.bounces,0) as bounces,\n coalesce(metrics.clicks,0) as clicks,\n coalesce(metrics.deferrals,0) as deferrals,\n coalesce(metrics.deliveries,0) as deliveries,\n coalesce(metrics.drops,0) as drops,\n coalesce(metrics.forwards,0) as forwards,\n coalesce(metrics.opens,0) as opens,\n coalesce(metrics.prints,0) as prints,\n coalesce(metrics.spam_reports,0) as spam_reports\n from sends\n left join metrics\n on sends.email_send_id = metrics.email_send_id\n and sends.source_relation = metrics.source_relation\n\n), booleans as (\n\n select \n *,\n bounces > 0 as was_bounced,\n clicks > 0 as was_clicked,\n deferrals > 0 as was_deferred,\n deliveries > 0 as was_delivered,\n forwards > 0 as was_forwarded,\n opens > 0 as was_opened,\n prints > 0 as was_printed,\n spam_reports > 0 as was_spam_reported\n from joined\n\n\n\n), unsubscribes as (\n\n select *\n from __dbt__cte__int_hubspot__email_aggregate_status_change\n\n), unsubscribes_joined as (\n\n select\n booleans.*,\n coalesce(unsubscribes.unsubscribes,0) as unsubscribes,\n coalesce(unsubscribes.unsubscribes,0) > 0 as was_unsubscribed\n from booleans\n left join unsubscribes\n on booleans.email_send_id = unsubscribes.email_send_id\n and booleans.email_campaign_id = unsubscribes.email_campaign_id\n and booleans.source_relation = unsubscribes.source_relation\n)\n\nselect *\nfrom unsubscribes_joined\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_event_aggregates", "sql": " __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n)"}, {"id": "model.hubspot.int_hubspot__email_aggregate_status_change", "sql": " __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_spam_report": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_spam_report", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_spam_report.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_spam_report.sql", "unique_id": "model.hubspot.hubspot__email_event_spam_report", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_spam_report"], "alias": "hubspot__email_event_spam_report", "checksum": {"name": "sha256", "checksum": "ed9f9df904e5b9765724e61b35b125df849727778439e995e1813fe804c050f6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SPAM_REPORT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_spam_report_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9142394, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_spam_report_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_spam_report')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_spam_report", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_spam_report", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_spam_report.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_status_change": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_status_change", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_status_change.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_status_change.sql", "unique_id": "model.hubspot.hubspot__email_event_status_change", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_status_change"], "alias": "hubspot__email_event_status_change", "checksum": {"name": "sha256", "checksum": "e6f9524a33a03f922d0c7d96b3cb65972193b3d30410766f29c8734b16dfca8e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a STATUS_CHANGE email event in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "change_source": {"name": "change_source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_bounced": {"name": "is_bounced", "description": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requested_by_email": {"name": "requested_by_email", "description": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscription_status": {"name": "subscription_status", "description": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscriptions": {"name": "subscriptions", "description": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9171014, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_status_change')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_status_change", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_status_change", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_status_change.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_dropped": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_dropped", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_dropped.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_dropped.sql", "unique_id": "model.hubspot.hubspot__email_event_dropped", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_dropped"], "alias": "hubspot__email_event_dropped", "checksum": {"name": "sha256", "checksum": "54b0ea5271ce12103953d40e664fe89ec7909fdf3f93d03490a08fe9389522b9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DROPPED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_message": {"name": "drop_message", "description": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_reason": {"name": "drop_reason", "description": "The reason why the email message was dropped. See below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_dropped_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9075077, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_dropped\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_dropped_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_dropped')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_dropped", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_dropped", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_dropped.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_bounce": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_bounce", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_bounce.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_bounce.sql", "unique_id": "model.hubspot.hubspot__email_event_bounce", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_bounce"], "alias": "hubspot__email_event_bounce", "checksum": {"name": "sha256", "checksum": "379f6aa9260e79372b4119fe1d663dc62f96edf9468e9fa3652a09fdb23b3935"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a BOUNCE email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bounce_category": {"name": "bounce_category", "description": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_status": {"name": "returned_status", "description": "The status code returned from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_bounce_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.8988461, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_bounce_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_bounce')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_bounce", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_bounce", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_bounce.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_delivered": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_delivered", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_delivered.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_delivered.sql", "unique_id": "model.hubspot.hubspot__email_event_delivered", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_delivered"], "alias": "hubspot__email_event_delivered", "checksum": {"name": "sha256", "checksum": "2d255db81c88e481ee262e006d0575cafff7a23c0aa6c386bf38f9665590cda8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DELIVERED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "smtp_id": {"name": "smtp_id", "description": "An ID attached to the message by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_delivered_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9054658, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_delivered_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_delivered')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_delivered", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_delivered", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_delivered.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_forward": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_forward", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_forward.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_forward.sql", "unique_id": "model.hubspot.hubspot__email_event_forward", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_forward"], "alias": "hubspot__email_event_forward", "checksum": {"name": "sha256", "checksum": "ed715e49b28f3d3826c1a9c56d620ee3707e12c0d4de34b621d1a7f1cfe79d80"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a FORWARD email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_forward_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9088235, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_forward\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_forward')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_forward", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_forward", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_forward.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_deferred": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_deferred", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_deferred.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_deferred.sql", "unique_id": "model.hubspot.hubspot__email_event_deferred", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_deferred"], "alias": "hubspot__email_event_deferred", "checksum": {"name": "sha256", "checksum": "9ade4f4642694e1d3afc657399a0f7baa653a1cd75a5e3dd03bd428eecbeffc4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DEFERRED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "attempt_number": {"name": "attempt_number", "description": "The delivery attempt number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_deferred_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.903886, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_deferred\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_deferred_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_deferred')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_deferred", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_deferred", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_deferred.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_clicks": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_clicks", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_clicks.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_clicks.sql", "unique_id": "model.hubspot.hubspot__email_event_clicks", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_clicks"], "alias": "hubspot__email_event_clicks", "checksum": {"name": "sha256", "checksum": "410922a14cfb1e8ee60916dc12fa961bb31947d2bb9dcda77904668d2e97b925"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CLICK email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "click_url": {"name": "click_url", "description": "The URL within the message that the recipient clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "referer_url": {"name": "referer_url", "description": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_click_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9024026, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_click_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_click')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_click", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_click", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_clicks.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_sent": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_sent", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_sent.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_sent.sql", "unique_id": "model.hubspot.hubspot__email_event_sent", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_sent"], "alias": "hubspot__email_event_sent", "checksum": {"name": "sha256", "checksum": "6be0c3ce1439959c54062e6f66922b75c9fe657c2476903a6b6d7926fedac15b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SENT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.913022, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_sent')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_sent", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_sent", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_sent.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_print": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_print", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_print.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_print.sql", "unique_id": "model.hubspot.hubspot__email_event_print", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_print"], "alias": "hubspot__email_event_print", "checksum": {"name": "sha256", "checksum": "f4af999f850b49da33bd79632a320ed536bb18dae5cd32a765e9e6d4ff62e985"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a PRINT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_print_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9117553, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_print\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_print_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_print')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_print", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_print", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_print.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__email_event_opens": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__email_event_opens", "resource_type": "model", "package_name": "hubspot", "path": "marketing/email_events/hubspot__email_event_opens.sql", "original_file_path": "models/marketing/email_events/hubspot__email_event_opens.sql", "unique_id": "model.hubspot.hubspot__email_event_opens", "fqn": ["hubspot", "marketing", "email_events", "hubspot__email_event_opens"], "alias": "hubspot__email_event_opens", "checksum": {"name": "sha256", "checksum": "afe383df931e84d276863635a88d620d5570b9042e15fec6df035f0e8b873b7a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a OPEN email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "duration_open": {"name": "duration_open", "description": "If provided and nonzero, the approximate number of milliseconds the user had opened the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_timestamp": {"name": "email_send_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_send_id": {"name": "email_send_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/email_events/email_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_open_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9104426, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_open_enabled'])) }}\n\n{{ email_events_joined(ref('stg_hubspot__email_event_open')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_open", "package": null, "version": null}, {"name": "stg_hubspot__email_event", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.email_events_joined"], "nodes": ["model.hubspot.stg_hubspot__email_event_open", "model.hubspot.stg_hubspot__email_event", "model.hubspot.int_hubspot__contact_merge_adjust"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/hubspot__email_event_opens.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open\"\n\n), events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\" \n\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__contact_merge_adjust": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__contact_merge_adjust", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__contact_merge_adjust.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__contact_merge_adjust.sql", "unique_id": "model.hubspot.int_hubspot__contact_merge_adjust", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__contact_merge_adjust"], "alias": "int_hubspot__contact_merge_adjust", "checksum": {"name": "sha256", "checksum": "01e622a5c31229019de0b5d88778c877dd9bff7ca97055de95d2b9660d63fbd9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.3670552, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__contact_merge_adjust\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n\nwith contacts as (\n\n select *\n from {{ ref('stg_hubspot__contact') }}\n), contact_merge_audit as (\n{% if var('hubspot_contact_merge_audit_enabled', false) %}\n select *\n from {{ ref('stg_hubspot__contact_merge_audit') }}\n\n{% else %}\n {{ merge_contacts() }}\n\n{% endif %}\n), contact_merge_removal as (\n select \n contacts.*\n from contacts\n \n left join contact_merge_audit\n on cast(contacts.contact_id as {{ dbt.type_string() }}) = cast(contact_merge_audit.vid_to_merge as {{ dbt.type_string() }})\n and contacts.source_relation = contact_merge_audit.source_relation\n \n where contact_merge_audit.vid_to_merge is null\n)\n\nselect *\nfrom contact_merge_removal", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact", "package": null, "version": null}, {"name": "stg_hubspot__contact_merge_audit", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__contact_merge_audit"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__contact_merge_adjust.sql", "compiled": true, "compiled_code": "\n\nwith contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n), contact_merge_audit as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit\"\n\n\n), contact_merge_removal as (\n select \n contacts.*\n from contacts\n \n left join contact_merge_audit\n on cast(contacts.contact_id as TEXT) = cast(contact_merge_audit.vid_to_merge as TEXT)\n and contacts.source_relation = contact_merge_audit.source_relation\n \n where contact_merge_audit.vid_to_merge is null\n)\n\nselect *\nfrom contact_merge_removal", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__form_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__form_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__form_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__form_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__form_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__form_metrics__by_contact"], "alias": "int_hubspot__form_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "75c8ccf40f316f290bac09fe81c9a841d034f743ddf51715f9e4161cde2f1e16"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.3770964, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled' ])) }}\n\nwith form as (\n\n select *\n from {{ ref('stg_hubspot__form') }}\n\n), contact_form_submission as (\n\n select *\n from {{ ref('stg_hubspot__contact_form_submission') }}\n\n{% if var('hubspot_submission_response_enabled', true) %}\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n {{ fivetran_utils.string_agg(\"distinct field_name\", \"', '\") }} as fields_responded_to,\n count(*) as total_responses\n from {{ ref('stg_hubspot__submission_response') }}\n group by 1, 2\n\n{% endif %}\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n {% if var('hubspot_submission_response_enabled', true) %}\n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n {% endif %}\n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n {% if var('hubspot_submission_response_enabled', true) %}\n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n {% endif %}\n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n {% if var('hubspot_submission_response_enabled', true) %}\n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n {% endif %}\n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__form", "package": null, "version": null}, {"name": "stg_hubspot__contact_form_submission", "package": null, "version": null}, {"name": "stg_hubspot__submission_response", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.string_agg", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.stg_hubspot__form", "model.hubspot.stg_hubspot__contact_form_submission", "model.hubspot.stg_hubspot__submission_response"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__form_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\nwith form as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\n\n), contact_form_submission as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"\n\n\n), submission_response_by_conversion as (\n\n select\n source_relation,\n conversion_id,\n \n string_agg(distinct field_name, ', ')\n\n as fields_responded_to,\n count(*) as total_responses\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\n group by 1, 2\n\n\n), ranked as (\n select\n source_relation,\n contact_id,\n form_id,\n conversion_id,\n occurred_timestamp,\n row_number() over (partition by contact_id order by occurred_timestamp asc\n ) = 1 as is_first_conversion,\n row_number() over (partition by contact_id order by occurred_timestamp desc\n ) = 1 as is_most_recent_conversion\n from contact_form_submission\n\n), first_conversion as (\n select\n source_relation,\n contact_id,\n form_id as first_conversion_form_id,\n conversion_id as first_conversion_id,\n occurred_timestamp as first_conversion_date\n from ranked\n where is_first_conversion\n\n), most_recent_conversion as (\n select\n source_relation,\n contact_id,\n form_id as most_recent_conversion_form_id,\n conversion_id as most_recent_conversion_id,\n occurred_timestamp as most_recent_conversion_date\n from ranked\n where is_most_recent_conversion\n\n), aggregated as (\n select\n source_relation,\n contact_id,\n count(*) as total_form_submissions,\n count(distinct form_id) as total_unique_form_submissions\n from contact_form_submission\n group by 1, 2\n\n), joined as (\n select\n aggregated.source_relation,\n aggregated.contact_id,\n aggregated.total_form_submissions,\n aggregated.total_unique_form_submissions,\n first_conversion.first_conversion_form_id,\n first_conversion.first_conversion_date,\n most_recent_conversion.most_recent_conversion_form_id,\n most_recent_conversion.most_recent_conversion_date\n \n , first_sub.fields_responded_to as first_conversion_fields_responded_to\n , first_sub.total_responses as first_conversion_total_responses\n , most_recent_sub.fields_responded_to as most_recent_conversion_fields_responded_to\n , most_recent_sub.total_responses as most_recent_conversion_total_responses\n \n from aggregated\n left join first_conversion\n on aggregated.contact_id = first_conversion.contact_id\n and aggregated.source_relation = first_conversion.source_relation\n left join most_recent_conversion\n on aggregated.contact_id = most_recent_conversion.contact_id\n and aggregated.source_relation = most_recent_conversion.source_relation\n \n left join submission_response_by_conversion as first_sub\n on first_conversion.first_conversion_id = first_sub.conversion_id\n and first_conversion.source_relation = first_sub.source_relation\n left join submission_response_by_conversion as most_recent_sub\n on most_recent_conversion.most_recent_conversion_id = most_recent_sub.conversion_id\n and most_recent_conversion.source_relation = most_recent_sub.source_relation\n \n\n), final as (\n select\n joined.source_relation,\n joined.contact_id,\n joined.total_form_submissions,\n joined.total_unique_form_submissions,\n joined.first_conversion_form_id,\n joined.first_conversion_date,\n first_form.form_name as first_conversion_form_name,\n first_form.form_type as first_conversion_form_type,\n joined.most_recent_conversion_form_id,\n joined.most_recent_conversion_date,\n most_recent_form.form_name as most_recent_conversion_form_name,\n most_recent_form.form_type as most_recent_conversion_form_type\n \n , joined.first_conversion_fields_responded_to\n , joined.first_conversion_total_responses\n , joined.most_recent_conversion_fields_responded_to\n , joined.most_recent_conversion_total_responses\n \n from joined\n left join form as first_form\n on joined.first_conversion_form_id = first_form.form_id\n and joined.source_relation = first_form.source_relation\n left join form as most_recent_form\n on joined.most_recent_conversion_form_id = most_recent_form.form_id\n and joined.source_relation = most_recent_form.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__email_aggregate_status_change": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__email_aggregate_status_change", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__email_aggregate_status_change.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__email_aggregate_status_change.sql", "unique_id": "model.hubspot.int_hubspot__email_aggregate_status_change", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__email_aggregate_status_change"], "alias": "int_hubspot__email_aggregate_status_change", "checksum": {"name": "sha256", "checksum": "aefb8f80368646b312022198b4160b7b814e7b49df513250d8be6e32e09c359c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"unique_key": {"name": "unique_key", "description": "Hashed on `source_relation`, `email_send_id`, and `email_campaign_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9513159, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('hubspot__email_event_status_change') }}\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','email_campaign_id', 'email_send_id']) }} as unique_key\nfrom aggregates", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__email_aggregate_status_change.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["unique_key"], "time_spine": null}, "model.hubspot.int_hubspot__email_metrics__by_contact_list": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__email_metrics__by_contact_list", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__email_metrics__by_contact_list.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__email_metrics__by_contact_list.sql", "unique_id": "model.hubspot.int_hubspot__email_metrics__by_contact_list", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__email_metrics__by_contact_list"], "alias": "int_hubspot__email_metrics__by_contact_list", "checksum": {"name": "sha256", "checksum": "8a1fb101632b1cdc1db53e79faef12ada70b91b82dc94d065ee372d7840067d2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"contact_list_id": {"name": "contact_list_id", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_contact_list_member_enabled', 'hubspot_contact_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9519558, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__email_metrics__by_contact_list\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_contact_list_member_enabled','hubspot_contact_enabled','hubspot_email_event_sent_enabled']), materialized='table') }}\n\nwith email_sends as (\n\n select *\n from {{ ref('hubspot__email_sends') }}\n\n), contact_list_member as (\n\n select *\n from {{ ref('stg_hubspot__contact_list_member') }}\n\n), joined as (\n\n select\n email_sends.*,\n contact_list_member.contact_list_id\n from email_sends\n left join contact_list_member\n on email_sends.contact_id = contact_list_member.contact_id\n and email_sends.source_relation = contact_list_member.source_relation\n where contact_list_member.contact_list_id is not null\n\n), email_metrics as (\n {% set email_metrics = adjust_email_metrics('hubspot__email_sends', 'email_metrics') %}\n select\n contact_list_id,\n source_relation,\n {% for metric in email_metrics %}\n sum({{ metric }}) as total_{{ metric }},\n count(distinct case when {{ metric }} > 0 then email_send_id end) as total_unique_{{ metric }}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n from joined\n group by 1, 2\n\n)\n\nselect *\nfrom email_metrics", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "stg_hubspot__contact_list_member", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.adjust_email_metrics"], "nodes": ["model.hubspot.hubspot__email_sends", "model.hubspot.stg_hubspot__contact_list_member"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__email_metrics__by_contact_list.sql", "compiled": true, "compiled_code": "\n\nwith email_sends as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\n\n), contact_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member\"\n\n), joined as (\n\n select\n email_sends.*,\n contact_list_member.contact_list_id\n from email_sends\n left join contact_list_member\n on email_sends.contact_id = contact_list_member.contact_id\n and email_sends.source_relation = contact_list_member.source_relation\n where contact_list_member.contact_list_id is not null\n\n), email_metrics as (\n \n select\n contact_list_id,\n source_relation,\n \n sum(bounces) as total_bounces,\n count(distinct case when bounces > 0 then email_send_id end) as total_unique_bounces\n ,\n \n sum(clicks) as total_clicks,\n count(distinct case when clicks > 0 then email_send_id end) as total_unique_clicks\n ,\n \n sum(deferrals) as total_deferrals,\n count(distinct case when deferrals > 0 then email_send_id end) as total_unique_deferrals\n ,\n \n sum(deliveries) as total_deliveries,\n count(distinct case when deliveries > 0 then email_send_id end) as total_unique_deliveries\n ,\n \n sum(drops) as total_drops,\n count(distinct case when drops > 0 then email_send_id end) as total_unique_drops\n ,\n \n sum(forwards) as total_forwards,\n count(distinct case when forwards > 0 then email_send_id end) as total_unique_forwards\n ,\n \n sum(opens) as total_opens,\n count(distinct case when opens > 0 then email_send_id end) as total_unique_opens\n ,\n \n sum(prints) as total_prints,\n count(distinct case when prints > 0 then email_send_id end) as total_unique_prints\n ,\n \n sum(spam_reports) as total_spam_reports,\n count(distinct case when spam_reports > 0 then email_send_id end) as total_unique_spam_reports\n ,\n \n sum(unsubscribes) as total_unsubscribes,\n count(distinct case when unsubscribes > 0 then email_send_id end) as total_unique_unsubscribes\n \n \n from joined\n group by 1, 2\n\n)\n\nselect *\nfrom email_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__contact_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__contact_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__contact_calendar_spine.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__contact_calendar_spine", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__contact_calendar_spine"], "alias": "int_hubspot__contact_calendar_spine", "checksum": {"name": "sha256", "checksum": "3c52122e9ab62d75f0d0522ab431deb489b699920d117db69e958d9ed2c93e72"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.4203515, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__contact_calendar_spine\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__contact') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(created_date as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__contact') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), contact as (\n\n select\n *\n from {{ ref('stg_hubspot__contact') }}\n where not coalesce(is_contact_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n contact.contact_id,\n contact.source_relation\n from calendar\n inner join contact\n on cast(calendar.date_day as date) >= cast(contact.created_date as date)\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','contact_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3875\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), contact as (\n\n select\n *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n where not coalesce(is_contact_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n contact.contact_id,\n contact.source_relation\n from calendar\n inner join contact\n on cast(calendar.date_day as date) >= cast(contact.created_date as date)\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_email_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_email_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__daily_email_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__daily_email_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__daily_email_metrics__by_contact"], "alias": "int_hubspot__daily_email_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "3fbe4e3b8d7ddfe9a206f0ad63a72293f1798e88cf7704be7a2274d1525db516"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.4748178, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled']))\n}}\n\n{# Build a list of (model_ref, event_type) pairs so we can union only what's enabled #}\n{% set email_event_models = [] %}\n{% do email_event_models.append(('hubspot__email_event_sent', 'SENT')) if fivetran_utils.enabled_vars(['hubspot_email_event_sent_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_delivered', 'DELIVERED')) if fivetran_utils.enabled_vars(['hubspot_email_event_delivered_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_opens', 'OPEN')) if fivetran_utils.enabled_vars(['hubspot_email_event_open_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_clicks', 'CLICK')) if fivetran_utils.enabled_vars(['hubspot_email_event_click_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_bounce', 'BOUNCE')) if fivetran_utils.enabled_vars(['hubspot_email_event_bounce_enabled']) %}\n{% do email_event_models.append(('hubspot__email_event_spam_report', 'SPAM_REPORT')) if fivetran_utils.enabled_vars(['hubspot_email_event_spam_report_enabled']) %}\n\nwith all_events as (\n\n {% if email_event_models | length > 0 %}\n {% for model, event_type in email_event_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n contact_id,\n created_timestamp,\n '{{ event_type }}' as event_type,\n cast(null as {{ dbt.type_string() }}) as subscription_status\n from {{ ref(model) }}\n where contact_id is not null\n and created_timestamp is not null\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as contact_id,\n cast(null as {{ dbt.type_timestamp() }}) as created_timestamp,\n cast(null as {{ dbt.type_string() }}) as event_type,\n cast(null as {{ dbt.type_string() }}) as subscription_status\n where false\n\n {% endif %}\n\n {% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from {{ ref('hubspot__email_event_status_change') }}\n where contact_id is not null\n and created_timestamp is not null\n {% endif %}\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast({{ dbt.date_trunc('day', 'created_timestamp') }} as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n {% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n {% endif %}\n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}, {"name": "hubspot__email_event_delivered", "package": null, "version": null}, {"name": "hubspot__email_event_opens", "package": null, "version": null}, {"name": "hubspot__email_event_clicks", "package": null, "version": null}, {"name": "hubspot__email_event_bounce", "package": null, "version": null}, {"name": "hubspot__email_event_spam_report", "package": null, "version": null}, {"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.type_string", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__daily_email_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith all_events as (\n\n \n \n \n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SENT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'DELIVERED' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'OPEN' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'CLICK' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'BOUNCE' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SPAM_REPORT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n \n\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast(date_trunc('day', created_timestamp) as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n \n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n \n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_engagement_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__daily_engagement_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__daily_engagement_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__daily_engagement_metrics__by_contact"], "alias": "int_hubspot__daily_engagement_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "828ff2c9001b31e79fa4e5a00e972e737e0f5eb0f24b9410ba29f8a714b6f3d0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.5004895, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled']))\n}}\n\n{# Build a list of (model_ref, enabled_var) pairs so we can union only what's enabled #}\n{% set engagement_staging_models = [] %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_call') if fivetran_utils.enabled_vars(['hubspot_engagement_call_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_email') if fivetran_utils.enabled_vars(['hubspot_engagement_email_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_meeting') if fivetran_utils.enabled_vars(['hubspot_engagement_meeting_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_note') if fivetran_utils.enabled_vars(['hubspot_engagement_note_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_task') if fivetran_utils.enabled_vars(['hubspot_engagement_task_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_communication') if var('hubspot_engagement_communication_enabled', false) %}\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from {{ ref('stg_hubspot__engagement_contact') }}\n\n), all_engagements as (\n\n {% if engagement_staging_models | length > 0 %}\n {% for model in engagement_staging_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from {{ ref(model) }}\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as engagement_id,\n cast(null as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n cast(null as {{ dbt.type_string() }}) as engagement_type\n where false\n\n {% endif %}\n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast({{ dbt.date_trunc('day', 'all_engagements.occurred_timestamp') }} as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_contact", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task", "model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__daily_engagement_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__scd_daily_contact_history.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__scd_daily_contact_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_contact_history", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__scd_daily_contact_history"], "alias": "int_hubspot__scd_daily_contact_history", "checksum": {"name": "sha256", "checksum": "4d4bdee049257ec8d0eab360a0810ee7ee1a38860413ac0608c3605b9c549c77"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.5182872, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_contact_history\"", "raw_code": "{{ config(materialized='table', enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])) }}\n\n{%- set contact_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_contact_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_contact_history') }}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n {% for col in contact_columns if col.name|lower not in ['source_relation','date_day','contact_id','id'] %}\n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes contact property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n {% for col in contact_columns if col.name|lower not in ['source_relation','date_day','contact_id','id'] %}\n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by contact_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_contact_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__scd_daily_contact_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_contact_history\"\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n \n , lifecyclestage as lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum( case when lifecyclestage is null then 0 else 1 end) over (partition by contact_id \n order by date_day rows unbounded preceding) as lifecyclestage_field_partition\n\n \n , hs_predictivecontactscore_v2 as hs_predictivecontactscore_v2\n -- create a batch/partition once a new value is provided\n , sum( case when hs_predictivecontactscore_v2 is null then 0 else 1 end) over (partition by contact_id \n order by date_day rows unbounded preceding) as hs_predictivecontactscore_v2_field_partition\n\n \n , hubspot_owner_id as hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum( case when hubspot_owner_id is null then 0 else 1 end) over (partition by contact_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_field_partition\n\n \n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes contact property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n contact_id,\n id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by contact_id, lifecyclestage_field_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hs_predictivecontactscore_v2 ) over (\n partition by contact_id, hs_predictivecontactscore_v2_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_predictivecontactscore_v2\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by contact_id, hubspot_owner_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__engagement_metrics__by_contact": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__engagement_metrics__by_contact", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__engagement_metrics__by_contact.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__engagement_metrics__by_contact.sql", "unique_id": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__engagement_metrics__by_contact"], "alias": "int_hubspot__engagement_metrics__by_contact", "checksum": {"name": "sha256", "checksum": "6fceaf23b2e6806d4ada79099922541bf77103e5c651593a7a88d6820049de83"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"contact_id": {"name": "contact_id", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.953213, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_contact_enabled'])) }}\n\nwith engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_contacts as (\n\n select *\n from {{ ref('stg_hubspot__engagement_contact') }}\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n {{ engagements_aggregated('engagement_contacts_joined', 'contact_id') }}\n\n)\n\nselect *\nfrom engagement_contacts_agg", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_aggregated"], "nodes": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__engagement_metrics__by_contact.sql", "compiled": true, "compiled_code": "\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_contact_history", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__pivot_daily_contact_history"], "alias": "int_hubspot__pivot_daily_contact_history", "checksum": {"name": "sha256", "checksum": "0b4ec5d198c7a969746115fcb611f7bbffff5ab13c2a9bb1856f2942257225af"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.5411751, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_contact_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set contact_columns = (['lifecyclestage', 'hs_predictivecontactscore_v2', 'hubspot_owner_id'] + var('hubspot__contact_property_history_columns', [])) | unique | list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_contact_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n {% for col in contact_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'contact_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_contact_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n , max(case when lower(field_name) = 'lifecyclestage' then new_value end) as lifecyclestage\n , max(case when lower(field_name) = 'hs_predictivecontactscore_v2' then new_value end) as hs_predictivecontactscore_v2\n , max(case when lower(field_name) = 'hubspot_owner_id' then new_value end) as hubspot_owner_id\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__email_event_aggregates": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__email_event_aggregates", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__email_event_aggregates.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__email_event_aggregates.sql", "unique_id": "model.hubspot.int_hubspot__email_event_aggregates", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__email_event_aggregates"], "alias": "int_hubspot__email_event_aggregates", "checksum": {"name": "sha256", "checksum": "4901e0b126c75c1c943bf77cd45f27a5164061c417dd0464f82ab5efbc2132e6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {"email_send_id": {"name": "email_send_id", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/intermediate/intermediate.yml", "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.952596, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\nwith events as (\n\n select *\n from {{ ref('stg_hubspot__email_event') }}\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["model.hubspot.stg_hubspot__email_event"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__email_event_aggregates.sql", "compiled": true, "compiled_code": "\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/intermediate/int_hubspot__daily_contact_history.sql", "original_file_path": "models/marketing/intermediate/int_hubspot__daily_contact_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_contact_history", "fqn": ["hubspot", "marketing", "intermediate", "int_hubspot__daily_contact_history"], "alias": "int_hubspot__daily_contact_history", "checksum": {"name": "sha256", "checksum": "4d77777dac0ecd00d5a16c6ef1b5e0776e0d720235a379ec90a660143022a354"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.5737185, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_contact_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\n{% set contact_columns = (['lifecyclestage', 'hs_predictivecontactscore_v2', 'hubspot_owner_id'] + var('hubspot__contact_property_history_columns', [])) | unique | list %}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__contact_property_history') }}\n\n where lower(field_name) in ({{ \"'\" ~ contact_columns | join(\"', '\") ~ \"'\" }})\n\n {% if is_incremental() %}\n and cast(change_timestamp as date) >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(change_timestamp as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), windows as (\n\n select\n source_relation,\n cast({{ dbt.date_trunc('day', 'change_timestamp') }} as date) as date_day,\n contact_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, contact_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n contact_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','contact_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.stg_hubspot__contact_property_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/int_hubspot__daily_contact_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history\"\n\n where lower(field_name) in ('lifecyclestage', 'hs_predictivecontactscore_v2', 'hubspot_owner_id')\n\n \n and cast(change_timestamp as date) >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), windows as (\n\n select\n source_relation,\n cast(date_trunc('day', change_timestamp) as date) as date_day,\n contact_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, contact_id, field_name \n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n contact_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/history/hubspot__contact_history.sql", "original_file_path": "models/marketing/history/hubspot__contact_history.sql", "unique_id": "model.hubspot.hubspot__contact_history", "fqn": ["hubspot", "marketing", "history", "hubspot__contact_history"], "alias": "hubspot__contact_history", "checksum": {"name": "sha256", "checksum": "f77fe3df994ba2858361cc89c4ca907015fc02ec467395f0b74215862173354d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to contact record in Hubspot; the grain of this model is contact_id -> field_name -> valid_to.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "valid_from": {"name": "valid_from", "description": "The timestamp the change was valid from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "valid_to": {"name": "valid_to", "description": "The timestamp the change was valid to. Null if still valid.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "id": {"name": "id", "description": "The ID of the change. Hashed on `source_relation`, `contact_id`, `field_name`, and `valid_from`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.9778795, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__contact_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled','hubspot_contact_property_history_enabled'])) }}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__contact_property_history') }}\n\n), windows as (\n\n select\n source_relation,\n contact_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by contact_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n {{ dbt_utils.generate_surrogate_key(['field_name','contact_id','valid_from','source_relation']) }} as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__contact_property_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/hubspot__contact_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history\"\n\n), windows as (\n\n select\n source_relation,\n contact_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by contact_id, field_name order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_from as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["id"], "time_spine": null}, "model.hubspot.hubspot__daily_contact_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_contact_history", "resource_type": "model", "package_name": "hubspot", "path": "marketing/history/hubspot__daily_contact_history.sql", "original_file_path": "models/marketing/history/hubspot__daily_contact_history.sql", "unique_id": "model.hubspot.hubspot__daily_contact_history", "fqn": ["hubspot", "marketing", "history", "hubspot__daily_contact_history"], "alias": "hubspot__daily_contact_history", "checksum": {"name": "sha256", "checksum": "1cc04b7f1ae5d95c9ee58357da28d6c122dc2d07f5a1a556593d50ae6be1cc00"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "contact_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a contact's day in Hubspot with tracked properties pivoted into columns. By default, tracks the contact's lifecycle stage, likelihood-to-close score, and owner on each day and includes engagement and email event metrics.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "contact_day_id": {"name": "contact_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `contact_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the contact had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "Unique id of a contact in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lifecyclestage": {"name": "lifecyclestage", "description": "The lifecycle stage of the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_predictivecontactscore_v2": {"name": "hs_predictivecontactscore_v2", "description": "HubSpot's predicted likelihood (0\u2013100) that the contact will close as a customer on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_owner_id": {"name": "hubspot_owner_id", "description": "The ID of the contact owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the contact owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the contact owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "Number of note engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "Number of task engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "Number of call engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "Number of meeting engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "Number of outbound email engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "Number of inbound email engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "Number of forwarded email engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_communications": {"name": "count_engagement_communications", "description": "Number of communication engagements logged for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_emails_sent": {"name": "count_emails_sent", "description": "Number of emails sent to the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_deliveries": {"name": "count_email_deliveries", "description": "Number of emails delivered to the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_opens": {"name": "count_email_opens", "description": "Number of email opens by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_clicks": {"name": "count_email_clicks", "description": "Number of email link clicks by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_bounces": {"name": "count_email_bounces", "description": "Number of email bounces for the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_spam_reports": {"name": "count_email_spam_reports", "description": "Number of spam reports by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_email_unsubscribes": {"name": "count_email_unsubscribes", "description": "Number of email unsubscribes by the contact on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/marketing/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "contact_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.974845, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='contact_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_contact_history')) -%}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled','hubspot_engagement_contact_enabled']) %}\n{% set email_events_enabled = fivetran_utils.enabled_vars(['hubspot_email_event_enabled']) %}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_contact_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no contact fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__contact_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owner as (\n\n select *\n from {{ ref('stg_hubspot__owner') }}\n\n{% endif %}\n\n{% if engagements_enabled %}\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_engagement_metrics__by_contact') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n{% if email_events_enabled %}\n), email_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_email_metrics__by_contact') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.contact_id\n {% if is_incremental() %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n\n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.contact_id = change_data.contact_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n {% if is_incremental() %}\n left join most_recent_data\n on calendar.contact_id = most_recent_data.contact_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by contact_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by contact_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.contact_id\n\n {% if var('hubspot_owner_enabled', true) %}\n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n {% endif %}\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','contact_id','date_day','id'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.{{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else fill_values.{{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n {% if engagements_enabled %}\n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n {% if var('hubspot_engagement_communication_enabled', false) %}\n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n {% endif %}\n {% endif %}\n\n {% if email_events_enabled %}\n , coalesce(email_metrics.count_emails_sent, 0) as count_emails_sent\n , coalesce(email_metrics.count_email_deliveries, 0) as count_email_deliveries\n , coalesce(email_metrics.count_email_opens, 0) as count_email_opens\n , coalesce(email_metrics.count_email_clicks, 0) as count_email_clicks\n , coalesce(email_metrics.count_email_bounces, 0) as count_email_bounces\n , coalesce(email_metrics.count_email_spam_reports, 0) as count_email_spam_reports\n {% if fivetran_utils.enabled_vars(['hubspot_email_event_status_change_enabled']) %}\n , coalesce(email_metrics.count_email_unsubscribes, 0) as count_email_unsubscribes\n {% endif %}\n {% endif %}\n\n from fill_values\n\n {% if var('hubspot_owner_enabled', true) %}\n left join owner\n on cast(fill_values.hubspot_owner_id as {{ dbt.type_string() }}) = cast(owner.owner_id as {{ dbt.type_string() }})\n and fill_values.source_relation = owner.source_relation\n {% endif %}\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on fill_values.contact_id = engagement_metrics.contact_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n {% if email_events_enabled %}\n left join email_metrics\n on fill_values.contact_id = email_metrics.contact_id\n and fill_values.date_day = email_metrics.date_day\n and fill_values.source_relation = email_metrics.source_relation\n {% endif %}\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','contact_id','source_relation']) }} as contact_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_contact_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_contact_history", "package": null, "version": null}, {"name": "int_hubspot__contact_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "int_hubspot__daily_engagement_metrics__by_contact", "package": null, "version": null}, {"name": "int_hubspot__daily_email_metrics__by_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.type_string", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__scd_daily_contact_history", "model.hubspot.int_hubspot__contact_calendar_spine", "model.hubspot.stg_hubspot__owner", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_email_metrics__by_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/hubspot__daily_contact_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith __dbt__cte__int_hubspot__daily_engagement_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), __dbt__cte__int_hubspot__daily_email_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith all_events as (\n\n \n \n \n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SENT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'DELIVERED' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'OPEN' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'CLICK' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'BOUNCE' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SPAM_REPORT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n \n\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast(date_trunc('day', created_timestamp) as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n \n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n \n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_contact_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no contact fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__contact_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n), owner as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_engagement_metrics__by_contact\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n\n), email_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_email_metrics__by_contact\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.contact_id\n \n \n , coalesce(change_data.lifecyclestage, most_recent_data.lifecyclestage) as lifecyclestage\n \n , coalesce(change_data.hs_predictivecontactscore_v2, most_recent_data.hs_predictivecontactscore_v2) as hs_predictivecontactscore_v2\n \n , coalesce(change_data.hubspot_owner_id, most_recent_data.hubspot_owner_id) as hubspot_owner_id\n \n\n \n\n from calendar\n left join change_data\n on calendar.contact_id = change_data.contact_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n \n left join most_recent_data\n on calendar.contact_id = most_recent_data.contact_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n \n , lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum(case when joined.lifecyclestage is null then 0 else 1 end) over (\n partition by contact_id \n order by date_day rows unbounded preceding) as lifecyclestage_partition\n \n , hs_predictivecontactscore_v2\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hs_predictivecontactscore_v2 is null then 0 else 1 end) over (\n partition by contact_id \n order by date_day rows unbounded preceding) as hs_predictivecontactscore_v2_partition\n \n , hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hubspot_owner_id is null then 0 else 1 end) over (\n partition by contact_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_partition\n \n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n contact_id\n\n \n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by contact_id, lifecyclestage_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n \n -- grab the value that started this batch/partition\n , first_value( hs_predictivecontactscore_v2 ) over (\n partition by contact_id, hs_predictivecontactscore_v2_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_predictivecontactscore_v2\n \n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by contact_id, hubspot_owner_id_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n \n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.contact_id\n\n \n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n \n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.lifecyclestage as TEXT ) = 'is_null' then null else fill_values.lifecyclestage end as lifecyclestage\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hs_predictivecontactscore_v2 as TEXT ) = 'is_null' then null else fill_values.hs_predictivecontactscore_v2 end as hs_predictivecontactscore_v2\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hubspot_owner_id as TEXT ) = 'is_null' then null else fill_values.hubspot_owner_id end as hubspot_owner_id\n \n\n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n \n \n\n \n , coalesce(email_metrics.count_emails_sent, 0) as count_emails_sent\n , coalesce(email_metrics.count_email_deliveries, 0) as count_email_deliveries\n , coalesce(email_metrics.count_email_opens, 0) as count_email_opens\n , coalesce(email_metrics.count_email_clicks, 0) as count_email_clicks\n , coalesce(email_metrics.count_email_bounces, 0) as count_email_bounces\n , coalesce(email_metrics.count_email_spam_reports, 0) as count_email_spam_reports\n \n , coalesce(email_metrics.count_email_unsubscribes, 0) as count_email_unsubscribes\n \n \n\n from fill_values\n\n \n left join owner\n on cast(fill_values.hubspot_owner_id as TEXT) = cast(owner.owner_id as TEXT)\n and fill_values.source_relation = owner.source_relation\n \n\n \n left join engagement_metrics\n on fill_values.contact_id = engagement_metrics.contact_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n \n\n \n left join email_metrics\n on fill_values.contact_id = email_metrics.contact_id\n and fill_values.date_day = email_metrics.date_day\n and fill_values.source_relation = email_metrics.source_relation\n \n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(contact_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as contact_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__daily_engagement_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_contacts as (\n\n select\n source_relation,\n engagement_id,\n contact_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_contacts.source_relation,\n engagement_contacts.contact_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_contacts\n on all_engagements.engagement_id = engagement_contacts.engagement_id\n and all_engagements.source_relation = engagement_contacts.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}, {"id": "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__daily_email_metrics__by_contact as (\n\n\n\n\n\n\n\n\n\n\n\nwith all_events as (\n\n \n \n \n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SENT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'DELIVERED' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'OPEN' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'CLICK' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'BOUNCE' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\n where contact_id is not null\n and created_timestamp is not null\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'SPAM_REPORT' as event_type,\n cast(null as TEXT) as subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n \n\n \n union all\n select\n source_relation,\n contact_id,\n created_timestamp,\n 'STATUS_CHANGE' as event_type,\n subscription_status\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n where contact_id is not null\n and created_timestamp is not null\n \n\n), aggregated as (\n\n select\n source_relation,\n contact_id,\n cast(date_trunc('day', created_timestamp) as date) as date_day,\n count(case when event_type = 'SENT' then 1 end) as count_emails_sent,\n count(case when event_type = 'DELIVERED' then 1 end) as count_email_deliveries,\n count(case when event_type = 'OPEN' then 1 end) as count_email_opens,\n count(case when event_type = 'CLICK' then 1 end) as count_email_clicks,\n count(case when event_type = 'BOUNCE' then 1 end) as count_email_bounces,\n count(case when event_type = 'SPAM_REPORT' then 1 end) as count_email_spam_reports\n \n , count(case when event_type = 'STATUS_CHANGE' and subscription_status = 'UNSUBSCRIBED' then 1 end) as count_email_unsubscribes\n \n from all_events\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["contact_day_id"], "time_spine": null}, "model.hubspot.int_hubspot__owners_enhanced": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__owners_enhanced", "resource_type": "model", "package_name": "hubspot", "path": "intermediate/int_hubspot__owners_enhanced.sql", "original_file_path": "models/intermediate/int_hubspot__owners_enhanced.sql", "unique_id": "model.hubspot.int_hubspot__owners_enhanced", "fqn": ["hubspot", "intermediate", "int_hubspot__owners_enhanced"], "alias": "int_hubspot__owners_enhanced", "checksum": {"name": "sha256", "checksum": "0599d2909335e86da0c07d1975c02894ffee0f44fce4d8bee4a9bf666261e84b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_owner_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.6457636, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"", "raw_code": "{{ config(enabled=var('hubspot_owner_enabled', true)) }}\n\nwith owners as (\n select\n source_relation,\n owner_id,\n active_user_id as owner_active_user_id,\n email_address as owner_email_address,\n full_name as owner_full_name\n from {{ ref('stg_hubspot__owner') }}\n{% set cte_ref = 'owners' %}\n\n{% if var('hubspot_team_enabled', true) %}\n), owner_teams as (\n select *\n from {{ ref('stg_hubspot__owner_team') }}\n\n), teams as (\n select *\n from {{ ref('stg_hubspot__team') }}\n\n), teams_agg as (\n select\n owner_teams.source_relation,\n owner_teams.owner_id,\n max(case when owner_teams.is_team_primary then owner_teams.team_id end) as owner_primary_team_id,\n max(case when owner_teams.is_team_primary then teams.team_name end) as owner_primary_team_name,\n {{ dbt.listagg(measure=\"cast(teams.team_id as \" ~ dbt.type_string() ~ \")\", delimiter_text=\"','\", order_by_clause=\"order by teams.team_id\") }} as owner_all_team_ids,\n {{ dbt.listagg(measure=\"teams.team_name\", delimiter_text=\"','\", order_by_clause=\"order by teams.team_id\") }} as owner_all_team_names\n from owner_teams\n left join teams\n on owner_teams.team_id = teams.team_id\n and owner_teams.source_relation = teams.source_relation\n group by 1, 2\n\n), teams_joined as (\n select\n owners.*,\n teams_agg.owner_primary_team_id,\n teams_agg.owner_primary_team_name,\n teams_agg.owner_all_team_ids,\n teams_agg.owner_all_team_names\n from owners\n left join teams_agg\n on owners.owner_id = teams_agg.owner_id\n and owners.source_relation = teams_agg.source_relation\n{% set cte_ref = 'teams_joined' %}\n{% endif %}\n\n{% if var('hubspot_role_enabled', true) %}\n), users as (\n select *\n from {{ ref('stg_hubspot__users') }}\n\n), roles as (\n select *\n from {{ ref('stg_hubspot__role') }}\n\n), roles_joined as (\n select\n {{ cte_ref }}.*,\n users.role_id as owner_role_id,\n roles.role_name as owner_role_name\n from {{ cte_ref }}\n left join users\n on {{ cte_ref }}.owner_active_user_id = users.user_id\n and {{ cte_ref }}.source_relation = users.source_relation\n left join roles\n on users.role_id = roles.role_id\n and users.source_relation = roles.source_relation\n\n{% set cte_ref = 'roles_joined' %}\n{% endif %}\n) \n\nselect *\nfrom {{ cte_ref }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "stg_hubspot__owner_team", "package": null, "version": null}, {"name": "stg_hubspot__team", "package": null, "version": null}, {"name": "stg_hubspot__users", "package": null, "version": null}, {"name": "stg_hubspot__role", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.listagg"], "nodes": ["model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__owner_team", "model.hubspot.stg_hubspot__team", "model.hubspot.stg_hubspot__users", "model.hubspot.stg_hubspot__role"]}, "compiled_path": "target/compiled/hubspot/models/intermediate/int_hubspot__owners_enhanced.sql", "compiled": true, "compiled_code": "\n\nwith owners as (\n select\n source_relation,\n owner_id,\n active_user_id as owner_active_user_id,\n email_address as owner_email_address,\n full_name as owner_full_name\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n), owner_teams as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team\"\n\n), teams as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team\"\n\n), teams_agg as (\n select\n owner_teams.source_relation,\n owner_teams.owner_id,\n max(case when owner_teams.is_team_primary then owner_teams.team_id end) as owner_primary_team_id,\n max(case when owner_teams.is_team_primary then teams.team_name end) as owner_primary_team_name,\n \n string_agg(\n cast(teams.team_id as TEXT),\n ','\n order by teams.team_id\n ) as owner_all_team_ids,\n \n string_agg(\n teams.team_name,\n ','\n order by teams.team_id\n ) as owner_all_team_names\n from owner_teams\n left join teams\n on owner_teams.team_id = teams.team_id\n and owner_teams.source_relation = teams.source_relation\n group by 1, 2\n\n), teams_joined as (\n select\n owners.*,\n teams_agg.owner_primary_team_id,\n teams_agg.owner_primary_team_name,\n teams_agg.owner_all_team_ids,\n teams_agg.owner_all_team_names\n from owners\n left join teams_agg\n on owners.owner_id = teams_agg.owner_id\n and owners.source_relation = teams_agg.source_relation\n\n\n\n\n), users as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__users\"\n\n), roles as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__role\"\n\n), roles_joined as (\n select\n teams_joined.*,\n users.role_id as owner_role_id,\n roles.role_name as owner_role_name\n from teams_joined\n left join users\n on teams_joined.owner_active_user_id = users.user_id\n and teams_joined.source_relation = users.source_relation\n left join roles\n on users.role_id = roles.role_id\n and users.source_relation = roles.source_relation\n\n\n\n) \n\nselect *\nfrom roles_joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__conversations": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__conversations", "resource_type": "model", "package_name": "hubspot", "path": "service/hubspot__conversations.sql", "original_file_path": "models/service/hubspot__conversations.sql", "unique_id": "model.hubspot.hubspot__conversations", "fqn": ["hubspot", "service", "hubspot__conversations"], "alias": "hubspot__conversations", "checksum": {"name": "sha256", "checksum": "d5f175c09333af5e12989d2fe28bf7c8b5dc9dbd8b78d8924dea7c3551b060fb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a conversation thread in HubSpot. Enriches each thread with inbox, channel, channel account details, and aggregated message metrics derived from the message history. Optionally joins to ticket and contact data when the respective features are enabled.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "conversation_thread_id": {"name": "conversation_thread_id", "description": "Unique ID of the conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_contact_id": {"name": "associated_contact_id", "description": "ID of the contact associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_ticket_id": {"name": "associated_ticket_id", "description": "ID of the ticket associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_account_id": {"name": "original_channel_account_id", "description": "ID of the channel account through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_id": {"name": "original_channel_id", "description": "ID of the channel through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to_actor_id": {"name": "assigned_to_actor_id", "description": "ID of the actor the thread is currently assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_at": {"name": "closed_at", "description": "Timestamp when the thread was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_at": {"name": "latest_message_at", "description": "Timestamp of the most recent message (sent or received) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_received_at": {"name": "latest_message_received_at", "description": "Timestamp of the most recently received message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_sent_at": {"name": "latest_message_sent_at", "description": "Timestamp of the most recently sent message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_spam": {"name": "is_spam", "description": "Indicates whether the thread has been marked as spam.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the thread (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assignee_name": {"name": "assignee_name", "description": "Name of the actor currently assigned to this conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assignee_email": {"name": "assignee_email", "description": "Email address of the actor currently assigned to this conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_name": {"name": "inbox_name", "description": "Display name of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_type": {"name": "inbox_type", "description": "Type of the inbox (e.g., HELP_DESK, INBOX).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_inbox_active": {"name": "is_inbox_active", "description": "Boolean indicating whether the inbox is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_inbox_deleted": {"name": "is_inbox_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_name": {"name": "channel_name", "description": "Display name of the channel through which the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_channel_deleted": {"name": "is_channel_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_account_name": {"name": "channel_account_name", "description": "Display name of the channel account through which the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_delivery_identifier_type": {"name": "channel_account_delivery_identifier_type", "description": "The type of delivery identifier for the channel account (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_delivery_identifier_value": {"name": "channel_account_delivery_identifier_value", "description": "The value of the delivery identifier for the channel account (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_channel_account_deleted": {"name": "is_channel_account_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "ticket_subject": {"name": "ticket_subject", "description": "Short summary of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_content": {"name": "ticket_content", "description": "Text in the body of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_created_date": {"name": "ticket_created_date", "description": "Date the associated ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_closed_date": {"name": "ticket_closed_date", "description": "Date the associated ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_category": {"name": "ticket_category", "description": "Category of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_id": {"name": "ticket_owner_id", "description": "ID of the owner of the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_deleted": {"name": "is_ticket_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "contact_email": {"name": "contact_email", "description": "Email address of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_first_name": {"name": "contact_first_name", "description": "First name of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_last_name": {"name": "contact_last_name", "description": "Last name of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_company": {"name": "contact_company", "description": "Company of the associated contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "first_response_time_seconds": {"name": "first_response_time_seconds", "description": "Time taken to respond to the first incoming message in the thread (in seconds). Negative values indicate that the conversation was initiated by an internal agent or bot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "resolution_time_seconds": {"name": "resolution_time_seconds", "description": "Time taken to resolve the thread (in seconds), starting at the first incoming message and ending at thread close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_message_at": {"name": "first_message_at", "description": "Timestamp of the first message (any direction) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_message_received_at": {"name": "first_message_received_at", "description": "Timestamp of the first incoming message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_message_sent_at": {"name": "first_message_sent_at", "description": "Timestamp of the first outgoing message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "total_message_count": {"name": "total_message_count", "description": "Total number of distinct messages in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "incoming_message_count": {"name": "incoming_message_count", "description": "Number of distinct incoming messages in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "outgoing_message_count": {"name": "outgoing_message_count", "description": "Number of distinct outgoing messages in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "agent_outgoing_message_count": {"name": "agent_outgoing_message_count", "description": "Number of distinct outgoing messages sent by an agent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "bot_outgoing_message_count": {"name": "bot_outgoing_message_count", "description": "Number of distinct outgoing messages sent by a bot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "system_outgoing_message_count": {"name": "system_outgoing_message_count", "description": "Number of distinct outgoing messages sent by a system actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "llm_outgoing_message_count": {"name": "llm_outgoing_message_count", "description": "Number of distinct outgoing messages sent by Hubspot's LLM-powered agent called Breeze.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "integration_outgoing_message_count": {"name": "integration_outgoing_message_count", "description": "Number of distinct outgoing messages sent by an integration actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "comment_count": {"name": "comment_count", "description": "Number of internal comments on the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assignment_count": {"name": "assignment_count", "description": "Number of assignment events on the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_status_change_count": {"name": "thread_status_change_count", "description": "Number of status change events on the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "unique_assignee_count": {"name": "unique_assignee_count", "description": "Number of distinct actors the thread has been assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "involved_agent_count": {"name": "involved_agent_count", "description": "Number of distinct agents who have created any conversation event (message, comment, etc) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "agent_author_count": {"name": "agent_author_count", "description": "Number of distinct agents who sent an outgoing message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "visitor_author_count": {"name": "visitor_author_count", "description": "Number of distinct visitors who sent an incoming message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "visitor_recipient_count": {"name": "visitor_recipient_count", "description": "Number of distinct visitors who received an outgoing message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "has_welcome_message": {"name": "has_welcome_message", "description": "Boolean indicating whether the thread includes a welcome message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_email_address": {"name": "ticket_owner_email_address", "description": "Email address of the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_full_name": {"name": "ticket_owner_full_name", "description": "Full name of the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_primary_team_id": {"name": "ticket_owner_primary_team_id", "description": "ID of the primary team assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_primary_team_name": {"name": "ticket_owner_primary_team_name", "description": "Name of the primary team assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_role_id": {"name": "ticket_owner_role_id", "description": "ID of the role assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_role_name": {"name": "ticket_owner_role_name", "description": "Name of the role assigned to the associated ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_owner_active_user_id": {"name": "ticket_owner_active_user_id", "description": "Unique ID of the active HubSpot user who owns the associated ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/service/service.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0282938, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__conversations\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith conversation_thread as (\n select *\n from {{ ref('stg_hubspot__conversation_thread') }}\n),\n\nconversation_message_history as (\n select *\n from {{ ref('stg_hubspot__conversation_message_history') }}\n),\n\nconversation_message_recipient as (\n select *\n from {{ ref('stg_hubspot__conversation_message_recipient') }}\n),\n\nconversation_actor as (\n select *\n from {{ ref('stg_hubspot__conversation_actor') }}\n),\n\nconversation_channel as (\n select *\n from {{ ref('stg_hubspot__conversation_channel') }}\n),\n\nconversation_channel_account as (\n select *\n from {{ ref('stg_hubspot__conversation_channel_account') }}\n),\n\nconversation_inbox as (\n select *\n from {{ ref('stg_hubspot__conversation_inbox') }}\n),\n\n{% if var('hubspot_service_enabled', false) %}\nticket as (\n select *\n from {{ ref('stg_hubspot__ticket') }}\n),\n\n {% if var('hubspot_owner_enabled', true) %}\n owners_enhanced as (\n\n select *\n from {{ ref('int_hubspot__owners_enhanced') }}\n ),\n {% endif%}\n\n{% endif %}\n\n{% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\ncontact as (\n select *\n from {{ ref('stg_hubspot__contact') }}\n),\n{% endif %}\n\nmessage_history_join as (\n\n select\n conversation_message_history.thread_id,\n conversation_message_history.source_relation,\n\n -- Latest message timestamps are already available on the conversation_thread table, so just get first\n min(case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_at,\n min(case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_received_at,\n min(case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_sent_at,\n\n -- Overall message counts\n count(distinct case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) total_message_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) incoming_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) outgoing_message_count,\n\n -- Message counts by sender type\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.message_id end) agent_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'BOT' then conversation_message_history.message_id end) bot_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'SYSTEM' then conversation_message_history.message_id end) system_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'LLM' then conversation_message_history.message_id end) llm_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'INTEGRATION' then conversation_message_history.message_id end) integration_outgoing_message_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) agent_author_count,\n count(distinct case when coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) involved_agent_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'VISITOR' then conversation_message_history.created_by_actor_id end) visitor_author_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and (actor_recipient.type = 'VISITOR' or actor_recipient.actor_id like 'V-%') then actor_recipient.actor_id end) visitor_recipient_count,\n\n -- Other conversation event counts\n count(distinct case when conversation_message_history.type = 'COMMENT' then conversation_message_history.message_id end) comment_count,\n count(distinct case when conversation_message_history.type = 'THREAD_STATUS_CHANGE' then conversation_message_history.message_id end) thread_status_change_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.message_id end) assignment_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.assigned_to_actor_id end) unique_assignee_count,\n\n cast(max(case when conversation_message_history.type = 'WELCOME_MESSAGE' then 1 else 0 end) as {{ dbt.type_boolean() }}) as has_welcome_message\n\n from conversation_message_history \n\n left join conversation_actor actor_sender\n on conversation_message_history.created_by_actor_id = actor_sender.actor_id\n and conversation_message_history.source_relation = actor_sender.source_relation\n\n -- Messages can be sent to multiple recipients\n left join conversation_message_recipient\n on conversation_message_history.message_id = conversation_message_recipient.message_id\n and conversation_message_history.thread_id = conversation_message_recipient.thread_id\n and conversation_message_history.source_relation = conversation_message_recipient.source_relation\n\n left join conversation_actor actor_recipient\n on conversation_message_recipient.actor_id = actor_recipient.actor_id\n and conversation_message_recipient.source_relation = actor_recipient.source_relation\n\n group by 1,2\n\n),\n\nthread_join as (\n\n select\n conversation_thread.*,\n conversation_actor.name as assignee_name,\n conversation_actor.email as assignee_email,\n conversation_inbox.name as inbox_name,\n conversation_inbox.type as inbox_type,\n conversation_inbox.is_active as is_inbox_active,\n conversation_inbox.is_deleted as is_inbox_deleted,\n conversation_channel.name as channel_name,\n conversation_channel.is_deleted as is_channel_deleted,\n conversation_channel_account.name as channel_account_name,\n conversation_channel_account.delivery_identifier_type as channel_account_delivery_identifier_type,\n conversation_channel_account.delivery_identifier_value as channel_account_delivery_identifier_value,\n conversation_channel_account.is_deleted as is_channel_account_deleted,\n {% if var('hubspot_service_enabled', false) %}\n ticket.ticket_subject,\n ticket.ticket_content,\n ticket.created_date as ticket_created_date,\n ticket.closed_date as ticket_closed_date,\n ticket.ticket_category,\n ticket.owner_id as ticket_owner_id,\n ticket.is_ticket_deleted,\n {% if var('hubspot_owner_enabled', true) %}\n owners_enhanced.owner_email_address as ticket_owner_email_address,\n owners_enhanced.owner_full_name as ticket_owner_full_name,\n {% if var('hubspot_team_enabled', true) %}\n owners_enhanced.owner_primary_team_id as ticket_owner_primary_team_id,\n owners_enhanced.owner_primary_team_name as ticket_owner_primary_team_name,\n {% endif %}\n {% if var('hubspot_role_enabled', true) %}\n owners_enhanced.owner_role_id as ticket_owner_role_id,\n owners_enhanced.owner_role_name as ticket_owner_role_name,\n {% endif %}\n owners_enhanced.owner_active_user_id as ticket_owner_active_user_id,\n {% endif %}\n {% endif %}\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n contact.email as contact_email,\n contact.first_name as contact_first_name,\n contact.last_name as contact_last_name,\n contact.contact_company,\n contact.is_contact_deleted,\n {% endif %}\n {{ dbt.datediff('message_history_join.first_message_received_at', 'message_history_join.first_message_sent_at', 'second') }} as first_response_time_seconds,\n {{ dbt.datediff('message_history_join.first_message_received_at', 'conversation_thread.closed_at', 'second') }} as resolution_time_seconds,\n message_history_join.first_message_at,\n message_history_join.first_message_received_at,\n message_history_join.first_message_sent_at,\n message_history_join.total_message_count,\n message_history_join.incoming_message_count,\n message_history_join.outgoing_message_count,\n message_history_join.agent_outgoing_message_count,\n message_history_join.bot_outgoing_message_count,\n message_history_join.system_outgoing_message_count,\n message_history_join.comment_count,\n message_history_join.assignment_count,\n message_history_join.thread_status_change_count,\n message_history_join.unique_assignee_count,\n message_history_join.involved_agent_count,\n message_history_join.agent_author_count,\n message_history_join.visitor_author_count,\n message_history_join.visitor_recipient_count,\n message_history_join.has_welcome_message\n\n from conversation_thread\n left join message_history_join\n on conversation_thread.conversation_thread_id = message_history_join.thread_id\n and conversation_thread.source_relation = message_history_join.source_relation\n left join conversation_channel\n on conversation_thread.original_channel_id = conversation_channel.channel_id\n and conversation_thread.source_relation = conversation_channel.source_relation\n left join conversation_channel_account\n on conversation_thread.original_channel_account_id = conversation_channel_account.channel_account_id\n and conversation_thread.source_relation = conversation_channel_account.source_relation\n left join conversation_inbox\n on conversation_thread.inbox_id = conversation_inbox.inbox_id\n and conversation_thread.source_relation = conversation_inbox.source_relation\n left join conversation_actor\n on conversation_thread.assigned_to_actor_id = conversation_actor.actor_id\n and conversation_thread.source_relation = conversation_actor.source_relation\n {% if var('hubspot_service_enabled', false) %}\n left join ticket\n on conversation_thread.associated_ticket_id = ticket.ticket_id\n and conversation_thread.source_relation = ticket.source_relation\n {% if var('hubspot_owner_enabled', true) %}\n left join owners_enhanced\n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n {% endif %}\n {% endif %}\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n left join contact\n on conversation_thread.associated_contact_id = contact.contact_id\n and conversation_thread.source_relation = contact.source_relation\n {% endif %}\n)\n\nselect *\nfrom thread_join", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_thread", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_history", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_recipient", "package": null, "version": null}, {"name": "stg_hubspot__conversation_actor", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel_account", "package": null, "version": null}, {"name": "stg_hubspot__conversation_inbox", "package": null, "version": null}, {"name": "stg_hubspot__ticket", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_boolean", "macro.dbt.datediff"], "nodes": ["model.hubspot.stg_hubspot__conversation_thread", "model.hubspot.stg_hubspot__conversation_message_history", "model.hubspot.stg_hubspot__conversation_message_recipient", "model.hubspot.stg_hubspot__conversation_actor", "model.hubspot.stg_hubspot__conversation_channel", "model.hubspot.stg_hubspot__conversation_channel_account", "model.hubspot.stg_hubspot__conversation_inbox", "model.hubspot.stg_hubspot__ticket", "model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__contact"]}, "compiled_path": "target/compiled/hubspot/models/service/hubspot__conversations.sql", "compiled": true, "compiled_code": "\n\nwith conversation_thread as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread\"\n),\n\nconversation_message_history as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history\"\n),\n\nconversation_message_recipient as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient\"\n),\n\nconversation_actor as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor\"\n),\n\nconversation_channel as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel\"\n),\n\nconversation_channel_account as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account\"\n),\n\nconversation_inbox as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox\"\n),\n\n\nticket as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\n),\n\n \n owners_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"\n ),\n \n\n\n\n\ncontact as (\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n),\n\n\nmessage_history_join as (\n\n select\n conversation_message_history.thread_id,\n conversation_message_history.source_relation,\n\n -- Latest message timestamps are already available on the conversation_thread table, so just get first\n min(case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_at,\n min(case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_received_at,\n min(case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.created_at else null end) as first_message_sent_at,\n\n -- Overall message counts\n count(distinct case when conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) total_message_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) incoming_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' then conversation_message_history.message_id end) outgoing_message_count,\n\n -- Message counts by sender type\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.message_id end) agent_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'BOT' then conversation_message_history.message_id end) bot_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'SYSTEM' then conversation_message_history.message_id end) system_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'LLM' then conversation_message_history.message_id end) llm_outgoing_message_count,\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'INTEGRATION' then conversation_message_history.message_id end) integration_outgoing_message_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) agent_author_count,\n count(distinct case when coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'AGENT' then conversation_message_history.created_by_actor_id end) involved_agent_count,\n count(distinct case when conversation_message_history.direction = 'INCOMING' and conversation_message_history.type = 'MESSAGE' and coalesce(actor_sender.type, conversation_message_history.created_by_actor_type) = 'VISITOR' then conversation_message_history.created_by_actor_id end) visitor_author_count,\n\n count(distinct case when conversation_message_history.direction = 'OUTGOING' and conversation_message_history.type = 'MESSAGE' and (actor_recipient.type = 'VISITOR' or actor_recipient.actor_id like 'V-%') then actor_recipient.actor_id end) visitor_recipient_count,\n\n -- Other conversation event counts\n count(distinct case when conversation_message_history.type = 'COMMENT' then conversation_message_history.message_id end) comment_count,\n count(distinct case when conversation_message_history.type = 'THREAD_STATUS_CHANGE' then conversation_message_history.message_id end) thread_status_change_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.message_id end) assignment_count,\n count(distinct case when conversation_message_history.type = 'ASSIGNMENT' then conversation_message_history.assigned_to_actor_id end) unique_assignee_count,\n\n cast(max(case when conversation_message_history.type = 'WELCOME_MESSAGE' then 1 else 0 end) as boolean) as has_welcome_message\n\n from conversation_message_history \n\n left join conversation_actor actor_sender\n on conversation_message_history.created_by_actor_id = actor_sender.actor_id\n and conversation_message_history.source_relation = actor_sender.source_relation\n\n -- Messages can be sent to multiple recipients\n left join conversation_message_recipient\n on conversation_message_history.message_id = conversation_message_recipient.message_id\n and conversation_message_history.thread_id = conversation_message_recipient.thread_id\n and conversation_message_history.source_relation = conversation_message_recipient.source_relation\n\n left join conversation_actor actor_recipient\n on conversation_message_recipient.actor_id = actor_recipient.actor_id\n and conversation_message_recipient.source_relation = actor_recipient.source_relation\n\n group by 1,2\n\n),\n\nthread_join as (\n\n select\n conversation_thread.*,\n conversation_actor.name as assignee_name,\n conversation_actor.email as assignee_email,\n conversation_inbox.name as inbox_name,\n conversation_inbox.type as inbox_type,\n conversation_inbox.is_active as is_inbox_active,\n conversation_inbox.is_deleted as is_inbox_deleted,\n conversation_channel.name as channel_name,\n conversation_channel.is_deleted as is_channel_deleted,\n conversation_channel_account.name as channel_account_name,\n conversation_channel_account.delivery_identifier_type as channel_account_delivery_identifier_type,\n conversation_channel_account.delivery_identifier_value as channel_account_delivery_identifier_value,\n conversation_channel_account.is_deleted as is_channel_account_deleted,\n \n ticket.ticket_subject,\n ticket.ticket_content,\n ticket.created_date as ticket_created_date,\n ticket.closed_date as ticket_closed_date,\n ticket.ticket_category,\n ticket.owner_id as ticket_owner_id,\n ticket.is_ticket_deleted,\n \n owners_enhanced.owner_email_address as ticket_owner_email_address,\n owners_enhanced.owner_full_name as ticket_owner_full_name,\n \n owners_enhanced.owner_primary_team_id as ticket_owner_primary_team_id,\n owners_enhanced.owner_primary_team_name as ticket_owner_primary_team_name,\n \n \n owners_enhanced.owner_role_id as ticket_owner_role_id,\n owners_enhanced.owner_role_name as ticket_owner_role_name,\n \n owners_enhanced.owner_active_user_id as ticket_owner_active_user_id,\n \n \n \n contact.email as contact_email,\n contact.first_name as contact_first_name,\n contact.last_name as contact_last_name,\n contact.contact_company,\n contact.is_contact_deleted,\n \n \n (\n (\n (\n ((message_history_join.first_message_sent_at)::date - (message_history_join.first_message_received_at)::date)\n * 24 + date_part('hour', (message_history_join.first_message_sent_at)::timestamp) - date_part('hour', (message_history_join.first_message_received_at)::timestamp))\n * 60 + date_part('minute', (message_history_join.first_message_sent_at)::timestamp) - date_part('minute', (message_history_join.first_message_received_at)::timestamp))\n * 60 + floor(date_part('second', (message_history_join.first_message_sent_at)::timestamp)) - floor(date_part('second', (message_history_join.first_message_received_at)::timestamp)))\n as first_response_time_seconds,\n \n (\n (\n (\n ((conversation_thread.closed_at)::date - (message_history_join.first_message_received_at)::date)\n * 24 + date_part('hour', (conversation_thread.closed_at)::timestamp) - date_part('hour', (message_history_join.first_message_received_at)::timestamp))\n * 60 + date_part('minute', (conversation_thread.closed_at)::timestamp) - date_part('minute', (message_history_join.first_message_received_at)::timestamp))\n * 60 + floor(date_part('second', (conversation_thread.closed_at)::timestamp)) - floor(date_part('second', (message_history_join.first_message_received_at)::timestamp)))\n as resolution_time_seconds,\n message_history_join.first_message_at,\n message_history_join.first_message_received_at,\n message_history_join.first_message_sent_at,\n message_history_join.total_message_count,\n message_history_join.incoming_message_count,\n message_history_join.outgoing_message_count,\n message_history_join.agent_outgoing_message_count,\n message_history_join.bot_outgoing_message_count,\n message_history_join.system_outgoing_message_count,\n message_history_join.comment_count,\n message_history_join.assignment_count,\n message_history_join.thread_status_change_count,\n message_history_join.unique_assignee_count,\n message_history_join.involved_agent_count,\n message_history_join.agent_author_count,\n message_history_join.visitor_author_count,\n message_history_join.visitor_recipient_count,\n message_history_join.has_welcome_message\n\n from conversation_thread\n left join message_history_join\n on conversation_thread.conversation_thread_id = message_history_join.thread_id\n and conversation_thread.source_relation = message_history_join.source_relation\n left join conversation_channel\n on conversation_thread.original_channel_id = conversation_channel.channel_id\n and conversation_thread.source_relation = conversation_channel.source_relation\n left join conversation_channel_account\n on conversation_thread.original_channel_account_id = conversation_channel_account.channel_account_id\n and conversation_thread.source_relation = conversation_channel_account.source_relation\n left join conversation_inbox\n on conversation_thread.inbox_id = conversation_inbox.inbox_id\n and conversation_thread.source_relation = conversation_inbox.source_relation\n left join conversation_actor\n on conversation_thread.assigned_to_actor_id = conversation_actor.actor_id\n and conversation_thread.source_relation = conversation_actor.source_relation\n \n left join ticket\n on conversation_thread.associated_ticket_id = ticket.ticket_id\n and conversation_thread.source_relation = ticket.source_relation\n \n left join owners_enhanced\n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n \n \n \n left join contact\n on conversation_thread.associated_contact_id = contact.contact_id\n and conversation_thread.source_relation = contact.source_relation\n \n)\n\nselect *\nfrom thread_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/hubspot__daily_ticket_history.sql", "original_file_path": "models/service/hubspot__daily_ticket_history.sql", "unique_id": "model.hubspot.hubspot__daily_ticket_history", "fqn": ["hubspot", "service", "hubspot__daily_ticket_history"], "alias": "hubspot__daily_ticket_history", "checksum": {"name": "sha256", "checksum": "71486ae5a22518d919d0a721a8348aea7a83bbd4fc758b54b985c1f2ea216fd7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "ticket_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a ticket's day in Hubspot with tracked properties from the `TICKET_PROPERTY_HISTORY` source table pivoted out into columns. Enabled by setting `hubspot_service_enabled` to `True`.\nBy default, tracks the ticket's pipeline, pipeline stage, and state. Additional properties can be tracked by configuring the `hubspot__ticket_property_history_columns` variable.\nThe start of a ticket's history is its creation date, and its end is by default the close date (or the current date if still open). The history of ticket can be extended past its close date by configuring the `ticket_history_extension_days` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "ticket_day_id": {"name": "ticket_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `ticket_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the ticket had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_id": {"name": "ticket_id", "description": "Unique id of a ticket in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline_label": {"name": "hs_pipeline_label", "description": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline_stage_label": {"name": "hs_pipeline_stage_label", "description": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline": {"name": "hs_pipeline", "description": "ID of the ticket pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hs_pipeline_stage": {"name": "hs_pipeline_stage", "description": "ID of the ticket pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/service/service.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='spark'), Const(value='databricks'), Const(value='duckdb')], ctx='load'))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "ticket_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.993418, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'],\n unique_key='ticket_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_ticket_history')) -%}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_ticket_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__ticket_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n), pipeline as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline') }}\n\n), pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_stage') }}\n\n), joined as (\n\n select \n calendar.source_relation,\n calendar.date_day,\n calendar.ticket_id\n {% if is_incremental() %} \n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %} \n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n \n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %} \n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.ticket_id = change_data.ticket_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n \n {% if is_incremental() %}\n left join most_recent_data\n on calendar.ticket_id = most_recent_data.ticket_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n \n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by ticket_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by ticket_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select \n fill_values.source_relation,\n date_day,\n ticket_id,\n pipeline_stage.ticket_state,\n pipeline.pipeline_label as hs_pipeline_label,\n pipeline_stage.pipeline_stage_label as hs_pipeline_stage_label\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','ticket_id','date_day','id'] %} \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( {{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else {{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n from fill_values\n\n left join pipeline\n on fill_values.hs_pipeline = pipeline.ticket_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.hs_pipeline_stage = pipeline_stage.ticket_pipeline_stage_id\n and pipeline.ticket_pipeline_id = pipeline_stage.ticket_pipeline_id\n and fill_values.source_relation = pipeline_stage.source_relation\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','ticket_id','source_relation']) }} as ticket_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_ticket_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_ticket_history", "package": null, "version": null}, {"name": "int_hubspot__ticket_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_stage", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt.type_string"], "nodes": ["model.hubspot.int_hubspot__scd_daily_ticket_history", "model.hubspot.int_hubspot__ticket_calendar_spine", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/service/hubspot__daily_ticket_history.sql", "compiled": true, "compiled_code": "\n\nwith change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_ticket_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no issue fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist \n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__ticket_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline\"\n\n), pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage\"\n\n), joined as (\n\n select \n calendar.source_relation,\n calendar.date_day,\n calendar.ticket_id\n \n \n , coalesce(change_data.hs_pipeline, most_recent_data.hs_pipeline) as hs_pipeline\n \n , coalesce(change_data.hs_pipeline_stage, most_recent_data.hs_pipeline_stage) as hs_pipeline_stage\n \n \n \n\n from calendar\n left join change_data\n on calendar.ticket_id = change_data.ticket_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n \n \n left join most_recent_data\n on calendar.ticket_id = most_recent_data.ticket_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n \n \n , hs_pipeline\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hs_pipeline is null then 0 else 1 end) over (\n partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_partition\n \n , hs_pipeline_stage\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hs_pipeline_stage is null then 0 else 1 end) over (\n partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_stage_partition\n \n\n from joined\n\n), fill_values as (\n\n select \n source_relation,\n date_day,\n ticket_id\n\n \n -- grab the value that started this batch/partition\n , first_value( hs_pipeline ) over (\n partition by ticket_id, hs_pipeline_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline\n \n -- grab the value that started this batch/partition\n , first_value( hs_pipeline_stage ) over (\n partition by ticket_id, hs_pipeline_stage_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline_stage\n \n\n from set_values\n\n), fix_null_values as (\n\n select \n fill_values.source_relation,\n date_day,\n ticket_id,\n pipeline_stage.ticket_state,\n pipeline.pipeline_label as hs_pipeline_label,\n pipeline_stage.pipeline_stage_label as hs_pipeline_stage_label\n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( hs_pipeline as TEXT ) = 'is_null' then null else hs_pipeline end as hs_pipeline\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( hs_pipeline_stage as TEXT ) = 'is_null' then null else hs_pipeline_stage end as hs_pipeline_stage\n \n\n from fill_values\n\n left join pipeline\n on fill_values.hs_pipeline = pipeline.ticket_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.hs_pipeline_stage = pipeline_stage.ticket_pipeline_stage_id\n and pipeline.ticket_pipeline_id = pipeline_stage.ticket_pipeline_id\n and fill_values.source_relation = pipeline_stage.source_relation\n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as ticket_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["ticket_day_id"], "time_spine": null}, "model.hubspot.hubspot__tickets": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__tickets", "resource_type": "model", "package_name": "hubspot", "path": "service/hubspot__tickets.sql", "original_file_path": "models/service/hubspot__tickets.sql", "unique_id": "model.hubspot.hubspot__tickets", "fqn": ["hubspot", "service", "hubspot__tickets"], "alias": "hubspot__tickets", "checksum": {"name": "sha256", "checksum": "dabb4e4204be0f509deac27d27d1f4adc39dba655d3673a369cd310674e03013"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket in Hubspot. Enabled by setting `hubspot_service_enabled` to `True`.\nCustom columns from `TICKET` can be included by configuring the `hubspot__ticket_pass_through_columns` variable. Custom calculated ticket fields can be added by configuring the `hubspot__ticket_calculated_fields` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "ticket_id": {"name": "ticket_id", "description": "Unique id of a ticket in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_deleted": {"name": "is_ticket_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "closed_date": {"name": "closed_date", "description": "The date the ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_agent_reply_at": {"name": "first_agent_reply_at", "description": "The date for the first agent reply on the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "The ID of the ticket's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_id": {"name": "ticket_pipeline_stage_id", "description": "The ID of the ticket's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_priority": {"name": "ticket_priority", "description": "The priority of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_category": {"name": "ticket_category", "description": "The category of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "Foreign key referencing the ID of the ticket's `OWNER`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_subject": {"name": "ticket_subject", "description": "Short summary of ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_content": {"name": "ticket_content", "description": "Text in body of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket based on its pipeline stage. Either OPEN or CLOSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the ticket's stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the ticket pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_order": {"name": "pipeline_stage_order", "description": "Order of the ticket's current stage within its given pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_pipeline_deleted": {"name": "is_ticket_pipeline_deleted", "description": "Boolean indicating whether the ticket's pipeline is deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_pipeline_stage_deleted": {"name": "is_ticket_pipeline_stage_deleted", "description": "Boolean indicating whether the ticket's pipeline stage is deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the ticket's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "Full name of the ticket's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "Array of `DEAL` ids associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_names": {"name": "deal_names", "description": "Array of `DEAL` names associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "Array of `COMPANY` ids associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_names": {"name": "company_names", "description": "Array of `COMPANY` names associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "Array of `CONTACT` ids associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_emails": {"name": "contact_emails", "description": "Array of `CONTACT` emails associated with the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "owner_active_user_id": {"name": "owner_active_user_id", "description": "Unique ID of the active HubSpot user who owns the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_id": {"name": "owner_primary_team_id", "description": "ID of the primary team assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_name": {"name": "owner_primary_team_name", "description": "Name of the primary team assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_ids": {"name": "owner_all_team_ids", "description": "Comma-separated list of all team IDs associated with the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_names": {"name": "owner_all_team_names", "description": "Comma-separated list of all team names associated with the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_id": {"name": "owner_role_id", "description": "ID of the role assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_name": {"name": "owner_role_name", "description": "Name of the role assigned to the ticket owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/service/service.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0053957, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__tickets\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith ticket as (\n\n select *\n from {{ ref('stg_hubspot__ticket') }}\n\n), ticket_pipeline as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline') }}\n\n), ticket_pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_stage') }}\n\n{% if var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_ticket_deal_enabled', false) %}\n), ticket_deal as (\n\n select *\n from {{ ref('stg_hubspot__ticket_deal') }}\n\n), deal as (\n\n select *\n from {{ ref('stg_hubspot__deal') }}\n\n), join_deals as (\n \n select\n ticket_deal.source_relation,\n ticket_deal.ticket_id,\n ticket_deal.deal_id,\n deal.deal_name\n\n from ticket_deal\n left join deal \n on ticket_deal.deal_id = deal.deal_id\n and ticket_deal.source_relation = deal.source_relation\n\n), agg_deals as (\n\n select\n source_relation,\n ticket_id,\n {{ fivetran_utils.array_agg(\"case when deal_id is null then '' else cast(deal_id as \" ~ dbt.type_string() ~ \") end\") }} as deal_ids,\n {{ fivetran_utils.array_agg(\"case when deal_name is null then '' else deal_name end\") }} as deal_names\n\n from join_deals\n group by 1,2\n\n{% endif %}\n\n{% if var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) %}\n), ticket_company as (\n\n select *\n from {{ ref('stg_hubspot__ticket_company') }}\n\n), company as (\n\n select *\n from {{ ref('stg_hubspot__company') }}\n\n), join_companies as (\n \n select\n ticket_company.source_relation,\n ticket_company.ticket_id,\n ticket_company.company_id,\n company.company_name\n\n from ticket_company\n left join company \n on ticket_company.company_id = company.company_id\n and ticket_company.source_relation = company.source_relation\n\n), agg_companies as (\n\n select\n source_relation,\n ticket_id,\n {{ fivetran_utils.array_agg(\"case when company_id is null then '' else cast(company_id as \" ~ dbt.type_string() ~ \") end\") }} as company_ids,\n {{ fivetran_utils.array_agg(\"case when company_name is null then '' else company_name end\") }} as company_names\n\n from join_companies\n group by 1,2\n\n{% endif %}\n\n{% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n), ticket_contact as (\n\n select *\n from {{ ref('stg_hubspot__ticket_contact') }}\n\n), contact as (\n\n select *\n from {{ ref('stg_hubspot__contact') }}\n\n), join_contacts as (\n \n select\n ticket_contact.source_relation,\n ticket_contact.ticket_id,\n ticket_contact.contact_id,\n contact.email\n\n from ticket_contact\n left join contact \n on ticket_contact.contact_id = contact.contact_id\n and ticket_contact.source_relation = contact.source_relation\n\n), agg_contacts as (\n\n select\n source_relation,\n ticket_id,\n {{ fivetran_utils.array_agg(\"case when contact_id is null then '' else cast(contact_id as \" ~ dbt.type_string() ~ \") end\") }} as contact_ids,\n {{ fivetran_utils.array_agg(\"case when email is null then '' else email end\") }} as contact_emails\n\n from join_contacts\n group by 1,2\n\n{% endif %}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owners_enhanced as (\n\n select *\n from {{ ref('int_hubspot__owners_enhanced') }}\n\n{% endif%}\n\n{% if var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) %}\n), engagement as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), ticket_engagement as (\n\n select *\n from {{ ref('stg_hubspot__ticket_engagement') }}\n\n), join_engagements as (\n\n select \n engagement.source_relation,\n engagement.engagement_type,\n ticket_engagement.ticket_id\n from engagement\n inner join ticket_engagement\n on cast(engagement.engagement_id as {{ dbt.type_bigint() }}) = cast(ticket_engagement.engagement_id as {{ dbt.type_bigint() }} )\n and engagement.source_relation = ticket_engagement.source_relation\n\n), agg_engagements as (\n\n {{ engagements_aggregated('join_engagements', 'ticket_id') }}\n\n{% endif %}\n\n), final_join as (\n\n select\n ticket.*,\n ticket_pipeline_stage.ticket_state,\n ticket_pipeline_stage.is_closed,\n ticket_pipeline_stage.pipeline_stage_label,\n ticket_pipeline.pipeline_label,\n ticket_pipeline_stage.display_order as pipeline_stage_order,\n ticket_pipeline.is_ticket_pipeline_deleted,\n ticket_pipeline_stage.is_ticket_pipeline_stage_deleted\n\n {% if var('hubspot_owner_enabled', true) %}\n , {{ dbt_utils.star(ref('int_hubspot__owners_enhanced'), except=[\"owner_id\", \"source_relation\"], relation_alias=\"owners_enhanced\") }}\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_ticket_deal_enabled', false) %}\n , agg_deals.deal_ids\n , agg_deals.deal_names\n {% endif %}\n\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n , agg_contacts.contact_ids\n , agg_contacts.contact_emails\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) %}\n , agg_companies.company_ids\n , agg_companies.company_names\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) %}\n {% for metric in engagement_metrics() %}\n , coalesce(agg_engagements.{{ metric }},0) as {{ metric }}\n {% endfor %}\n {% endif %}\n\n from ticket\n\n left join ticket_pipeline \n on cast(ticket.ticket_pipeline_id as {{ dbt.type_string() }}) = cast(ticket_pipeline.ticket_pipeline_id as {{ dbt.type_string() }})\n and ticket.source_relation = ticket_pipeline.source_relation\n \n left join ticket_pipeline_stage \n on cast(ticket.ticket_pipeline_stage_id as {{ dbt.type_string() }}) = cast(ticket_pipeline_stage.ticket_pipeline_stage_id as {{ dbt.type_string() }})\n and cast(ticket_pipeline.ticket_pipeline_id as {{ dbt.type_string() }}) = cast(ticket_pipeline_stage.ticket_pipeline_id as {{ dbt.type_string() }})\n and ticket.source_relation = ticket_pipeline_stage.source_relation\n\n {% if var('hubspot_owner_enabled', true) %}\n left join owners_enhanced \n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_ticket_deal_enabled', false) %}\n left join agg_deals \n on ticket.ticket_id = agg_deals.ticket_id\n and ticket.source_relation = agg_deals.source_relation\n {% endif %}\n\n {% if var('hubspot_marketing_enabled', true) and var('hubspot_contact_enabled', true) %}\n left join agg_contacts\n on ticket.ticket_id = agg_contacts.ticket_id \n and ticket.source_relation = agg_contacts.source_relation\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) %}\n left join agg_companies\n on ticket.ticket_id = agg_companies.ticket_id \n and ticket.source_relation = agg_companies.source_relation\n {% endif %}\n\n {% if var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) %}\n left join agg_engagements\n on ticket.ticket_id = agg_engagements.ticket_id\n and ticket.source_relation = agg_engagements.source_relation\n {% endif %}\n)\n\nselect *\nfrom final_join", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_stage", "package": null, "version": null}, {"name": "stg_hubspot__ticket_deal", "package": null, "version": null}, {"name": "stg_hubspot__deal", "package": null, "version": null}, {"name": "stg_hubspot__ticket_company", "package": null, "version": null}, {"name": "stg_hubspot__company", "package": null, "version": null}, {"name": "stg_hubspot__ticket_contact", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__ticket_engagement", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.fivetran_utils.array_agg", "macro.dbt.type_bigint", "macro.hubspot.engagements_aggregated", "macro.dbt_utils.star", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.stg_hubspot__ticket", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage", "model.hubspot.stg_hubspot__ticket_deal", "model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__ticket_company", "model.hubspot.stg_hubspot__company", "model.hubspot.stg_hubspot__ticket_contact", "model.hubspot.stg_hubspot__contact", "model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__ticket_engagement"]}, "compiled_path": "target/compiled/hubspot/models/service/hubspot__tickets.sql", "compiled": true, "compiled_code": "\n\nwith ticket as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\n\n), ticket_pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline\"\n\n), ticket_pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage\"\n\n\n), ticket_deal as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal\"\n\n), deal as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n\n), join_deals as (\n \n select\n ticket_deal.source_relation,\n ticket_deal.ticket_id,\n ticket_deal.deal_id,\n deal.deal_name\n\n from ticket_deal\n left join deal \n on ticket_deal.deal_id = deal.deal_id\n and ticket_deal.source_relation = deal.source_relation\n\n), agg_deals as (\n\n select\n source_relation,\n ticket_id,\n \n array_agg(case when deal_id is null then '' else cast(deal_id as TEXT) end)\n as deal_ids,\n \n array_agg(case when deal_name is null then '' else deal_name end)\n as deal_names\n\n from join_deals\n group by 1,2\n\n\n\n\n), ticket_company as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company\"\n\n), company as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n\n), join_companies as (\n \n select\n ticket_company.source_relation,\n ticket_company.ticket_id,\n ticket_company.company_id,\n company.company_name\n\n from ticket_company\n left join company \n on ticket_company.company_id = company.company_id\n and ticket_company.source_relation = company.source_relation\n\n), agg_companies as (\n\n select\n source_relation,\n ticket_id,\n \n array_agg(case when company_id is null then '' else cast(company_id as TEXT) end)\n as company_ids,\n \n array_agg(case when company_name is null then '' else company_name end)\n as company_names\n\n from join_companies\n group by 1,2\n\n\n\n\n), ticket_contact as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact\"\n\n), contact as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\n\n), join_contacts as (\n \n select\n ticket_contact.source_relation,\n ticket_contact.ticket_id,\n ticket_contact.contact_id,\n contact.email\n\n from ticket_contact\n left join contact \n on ticket_contact.contact_id = contact.contact_id\n and ticket_contact.source_relation = contact.source_relation\n\n), agg_contacts as (\n\n select\n source_relation,\n ticket_id,\n \n array_agg(case when contact_id is null then '' else cast(contact_id as TEXT) end)\n as contact_ids,\n \n array_agg(case when email is null then '' else email end)\n as contact_emails\n\n from join_contacts\n group by 1,2\n\n\n\n\n), owners_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"\n\n\n\n\n), engagement as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), ticket_engagement as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement\"\n\n), join_engagements as (\n\n select \n engagement.source_relation,\n engagement.engagement_type,\n ticket_engagement.ticket_id\n from engagement\n inner join ticket_engagement\n on cast(engagement.engagement_id as bigint) = cast(ticket_engagement.engagement_id as bigint )\n and engagement.source_relation = ticket_engagement.source_relation\n\n), agg_engagements as (\n\n \n\n select\n source_relation,\n ticket_id,\n count(case when engagement_type = 'NOTE' then ticket_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then ticket_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then ticket_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then ticket_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then ticket_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then ticket_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then ticket_id end) as count_engagement_forwarded_emails\n from join_engagements\n group by 1,2\n\n\n\n\n\n), final_join as (\n\n select\n ticket.*,\n ticket_pipeline_stage.ticket_state,\n ticket_pipeline_stage.is_closed,\n ticket_pipeline_stage.pipeline_stage_label,\n ticket_pipeline.pipeline_label,\n ticket_pipeline_stage.display_order as pipeline_stage_order,\n ticket_pipeline.is_ticket_pipeline_deleted,\n ticket_pipeline_stage.is_ticket_pipeline_stage_deleted\n\n \n , owners_enhanced.\"owner_active_user_id\",\n owners_enhanced.\"owner_email_address\",\n owners_enhanced.\"owner_full_name\",\n owners_enhanced.\"owner_primary_team_id\",\n owners_enhanced.\"owner_primary_team_name\",\n owners_enhanced.\"owner_all_team_ids\",\n owners_enhanced.\"owner_all_team_names\",\n owners_enhanced.\"owner_role_id\",\n owners_enhanced.\"owner_role_name\"\n \n\n \n , agg_deals.deal_ids\n , agg_deals.deal_names\n \n\n \n , agg_contacts.contact_ids\n , agg_contacts.contact_emails\n \n\n \n , agg_companies.company_ids\n , agg_companies.company_names\n \n\n \n \n , coalesce(agg_engagements.count_engagement_notes,0) as count_engagement_notes\n \n , coalesce(agg_engagements.count_engagement_tasks,0) as count_engagement_tasks\n \n , coalesce(agg_engagements.count_engagement_calls,0) as count_engagement_calls\n \n , coalesce(agg_engagements.count_engagement_meetings,0) as count_engagement_meetings\n \n , coalesce(agg_engagements.count_engagement_emails,0) as count_engagement_emails\n \n , coalesce(agg_engagements.count_engagement_incoming_emails,0) as count_engagement_incoming_emails\n \n , coalesce(agg_engagements.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails\n \n \n\n from ticket\n\n left join ticket_pipeline \n on cast(ticket.ticket_pipeline_id as TEXT) = cast(ticket_pipeline.ticket_pipeline_id as TEXT)\n and ticket.source_relation = ticket_pipeline.source_relation\n \n left join ticket_pipeline_stage \n on cast(ticket.ticket_pipeline_stage_id as TEXT) = cast(ticket_pipeline_stage.ticket_pipeline_stage_id as TEXT)\n and cast(ticket_pipeline.ticket_pipeline_id as TEXT) = cast(ticket_pipeline_stage.ticket_pipeline_id as TEXT)\n and ticket.source_relation = ticket_pipeline_stage.source_relation\n\n \n left join owners_enhanced \n on ticket.owner_id = owners_enhanced.owner_id\n and ticket.source_relation = owners_enhanced.source_relation\n \n\n \n left join agg_deals \n on ticket.ticket_id = agg_deals.ticket_id\n and ticket.source_relation = agg_deals.source_relation\n \n\n \n left join agg_contacts\n on ticket.ticket_id = agg_contacts.ticket_id \n and ticket.source_relation = agg_contacts.source_relation\n \n\n \n left join agg_companies\n on ticket.ticket_id = agg_companies.ticket_id \n and ticket.source_relation = agg_companies.source_relation\n \n\n \n left join agg_engagements\n on ticket.ticket_id = agg_engagements.ticket_id\n and ticket.source_relation = agg_engagements.source_relation\n \n)\n\nselect *\nfrom final_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__daily_ticket_history.sql", "original_file_path": "models/service/intermediate/int_hubspot__daily_ticket_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_ticket_history", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__daily_ticket_history"], "alias": "int_hubspot__daily_ticket_history", "checksum": {"name": "sha256", "checksum": "0f16602ba1b92d98860bbba3fb2524974c7a3014c9476cc85585daa242c59c77"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='spark'), Const(value='databricks'), Const(value='duckdb')], ctx='load'))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.7634041, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_ticket_history\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__ticket_property_history') }}\n\n -- should we include an option pivot out ALL properties? in the same vein as our passthrough-all-columns var\n where lower(field_name) in \n ('hs_pipeline', 'hs_pipeline_stage'\n {% for col in var('hubspot__ticket_property_history_columns', []) %}\n , '{{ col }}'\n {%- endfor -%} )\n\n {% if is_incremental() %}\n and cast(change_timestamp as date) >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(change_timestamp as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), windows as (\n\n select\n source_relation,\n cast({{ dbt.date_trunc('day', 'change_timestamp') }} as date) as date_day,\n ticket_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n -- if it is currently active fivetran_end = 9999-12-31 23:59:59, but the calendar_spine will end at the current_date\n from history\n\n), order_daily_changes as (\n\n select \n *,\n row_number() over (\n partition by date_day, ticket_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n \n select \n source_relation,\n date_day,\n ticket_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','ticket_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.stg_hubspot__ticket_property_history"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__daily_ticket_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history\"\n\n -- should we include an option pivot out ALL properties? in the same vein as our passthrough-all-columns var\n where lower(field_name) in \n ('hs_pipeline', 'hs_pipeline_stage'\n )\n\n \n and cast(change_timestamp as date) >= \n\n\n\n \n\n \n\n cast('2025-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), windows as (\n\n select\n source_relation,\n cast(date_trunc('day', change_timestamp) as date) as date_day,\n ticket_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n -- if it is currently active fivetran_end = 9999-12-31 23:59:59, but the calendar_spine will end at the current_date\n from history\n\n), order_daily_changes as (\n\n select \n *,\n row_number() over (\n partition by date_day, ticket_id, field_name \n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n \n select \n source_relation,\n date_day,\n ticket_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select \n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__ticket_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__ticket_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__ticket_calendar_spine.sql", "original_file_path": "models/service/intermediate/int_hubspot__ticket_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__ticket_calendar_spine", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__ticket_calendar_spine"], "alias": "int_hubspot__ticket_calendar_spine", "checksum": {"name": "sha256", "checksum": "fcd45f9989a6a9b34847803891d0593651861be0a5cb62e5e9bd6880ab5279a7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='spark'), Const(value='databricks'), Const(value='duckdb')], ctx='load'))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.7817502, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__ticket_calendar_spine\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__ticket_tmp') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(property_createdate as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__ticket_tmp') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), ticket as (\n\n select \n *,\n cast( {{ dbt.date_trunc('day', \"case when closed_date is null then \" ~ dbt.current_timestamp_backcompat() ~ \" else closed_date end\") }} as date) as open_until\n from {{ ref('stg_hubspot__ticket') }}\n where not coalesce(is_ticket_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n ticket.ticket_id,\n ticket.source_relation\n from calendar\n inner join ticket\n on cast(calendar.date_day as date) >= cast(ticket.created_date as date)\n -- use this variable to extend the ticket's history past its close date (for reporting/data viz purposes :-)\n and cast(calendar.date_day as date) <= {{ dbt.dateadd('day', var('ticket_history_extension_days', 0), 'ticket.open_until') }}\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','ticket_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt.current_timestamp_backcompat", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__ticket_tmp", "model.hubspot.stg_hubspot__ticket"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__ticket_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_tmp\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3875\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), ticket as (\n\n select \n *,\n cast( date_trunc('day', case when closed_date is null then \n current_timestamp::timestamp\n else closed_date end) as date) as open_until\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\n where not coalesce(is_ticket_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n ticket.ticket_id,\n ticket.source_relation\n from calendar\n inner join ticket\n on cast(calendar.date_day as date) >= cast(ticket.created_date as date)\n -- use this variable to extend the ticket's history past its close date (for reporting/data viz purposes :-)\n and cast(calendar.date_day as date) <= \n\n ticket.open_until + ((interval '1 day') * (0))\n\n\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__scd_daily_ticket_history.sql", "original_file_path": "models/service/intermediate/int_hubspot__scd_daily_ticket_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_ticket_history", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__scd_daily_ticket_history"], "alias": "int_hubspot__scd_daily_ticket_history", "checksum": {"name": "sha256", "checksum": "19641b86d8e6beffe49706620f6683c471eef1c669e706ed7d3553a075d80fc1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.8883057, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_ticket_history\"", "raw_code": "{{ config(materialized='table', enabled=var('hubspot_service_enabled', False)) }}\n\n{%- set ticket_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_ticket_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_ticket_history') }}\n\n), set_values as (\n\n select \n source_relation,\n date_day, \n ticket_id,\n id\n\n {% for col in ticket_columns if col.name|lower not in ['source_relation','date_day','ticket_id','id'] %} \n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by ticket_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes ticket property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n source_relation,\n date_day, \n ticket_id,\n id\n \n {% for col in ticket_columns if col.name|lower not in ['source_relation','date_day','ticket_id','id'] %} \n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by ticket_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_ticket_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__scd_daily_ticket_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_ticket_history\"\n\n), set_values as (\n\n select \n source_relation,\n date_day, \n ticket_id,\n id\n\n \n , hs_pipeline as hs_pipeline\n -- create a batch/partition once a new value is provided\n , sum( case when hs_pipeline is null then 0 else 1 end) over (partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_field_partition\n\n \n , hs_pipeline_stage as hs_pipeline_stage\n -- create a batch/partition once a new value is provided\n , sum( case when hs_pipeline_stage is null then 0 else 1 end) over (partition by ticket_id \n order by date_day rows unbounded preceding) as hs_pipeline_stage_field_partition\n\n \n \n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes ticket property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid \n select \n source_relation,\n date_day, \n ticket_id,\n id\n \n \n\n -- grab the value that started this batch/partition\n , first_value( hs_pipeline ) over (\n partition by ticket_id, hs_pipeline_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hs_pipeline_stage ) over (\n partition by ticket_id, hs_pipeline_stage_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hs_pipeline_stage\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_ticket_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_ticket_history", "resource_type": "model", "package_name": "hubspot", "path": "service/intermediate/int_hubspot__pivot_daily_ticket_history.sql", "original_file_path": "models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_ticket_history", "fqn": ["hubspot", "service", "intermediate", "int_hubspot__pivot_daily_ticket_history"], "alias": "int_hubspot__pivot_daily_ticket_history", "checksum": {"name": "sha256", "checksum": "c4ee5d33824737ea0c98b3c1eef0bd59c5af540ebe4e5f17bbd1eece13fa1ce3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='spark'), Const(value='databricks'), Const(value='duckdb')], ctx='load'))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398585.901465, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_ticket_history\"", "raw_code": "{{\n config(\n enabled=var('hubspot_service_enabled', False),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ('spark', 'databricks', 'duckdb') else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set ticket_columns = (['hs_pipeline', 'hs_pipeline_stage'] + var('hubspot__ticket_property_history_columns', []))|unique|list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_ticket_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select \n source_relation,\n date_day, \n ticket_id\n\n -- should we remove the `hs_` prefix? could introduce some duplicates if people already have something like `hs_owner` and `owner`\n {% for col in ticket_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select \n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'ticket_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/intermediate/int_hubspot__pivot_daily_ticket_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_ticket_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2025-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select \n source_relation,\n date_day, \n ticket_id\n\n -- should we remove the `hs_` prefix? could introduce some duplicates if people already have something like `hs_owner` and `owner`\n , max(case when lower(field_name) = 'hs_pipeline' then new_value end) as hs_pipeline\n , max(case when lower(field_name) = 'hs_pipeline_stage' then new_value end) as hs_pipeline_stage\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select \n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(ticket_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__deal_stages": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__deal_stages", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__deal_stages.sql", "original_file_path": "models/sales/hubspot__deal_stages.sql", "unique_id": "model.hubspot.hubspot__deal_stages", "fqn": ["hubspot", "sales", "hubspot__deal_stages"], "alias": "hubspot__deal_stages", "checksum": {"name": "sha256", "checksum": "0fe129583c73b1b0c29cad153bf9434f35cd0ab0161e2290dac492ae72f0f2f3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents when a deal stage changes in Hubspot, enriched with metrics about deal activities", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "deal_stage_id": {"name": "deal_stage_id", "description": "The unique deal stage identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deal_pipeline_deleted": {"name": "is_deal_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_pipeline_stage_deleted": {"name": "is_deal_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_deleted": {"name": "is_deal_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "date_stage_entered": {"name": "date_stage_entered", "description": "The timestamp the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_stage_exited": {"name": "date_stage_exited", "description": "The Fivetran calculated exit time of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_stage_active": {"name": "is_stage_active", "description": "Boolean indicating whether the deal stage active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_deal_ids": {"name": "merged_deal_ids", "description": "A list of deals that had previously been merged into this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_id": {"name": "pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The label of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_pipeline_active": {"name": "is_pipeline_active", "description": "Boolean indicating if the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_pipeline_stage_active": {"name": "is_pipeline_stage_active", "description": "Boolean indicating if the pipeline stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The label of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The relevant source of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_id": {"name": "source_id", "description": "Reference to the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_pipeline_stage_closed": {"name": "is_pipeline_stage_closed", "description": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal, refer to the pipeline_stage_label column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_display_order": {"name": "pipeline_stage_display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_display_order": {"name": "pipeline_display_order", "description": "Used to determine the order in which the pipelines appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_probability": {"name": "pipeline_stage_probability", "description": "The probability that the deal will close. Used for the deal forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_name": {"name": "deal_name", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_created_at": {"name": "deal_pipeline_stage_created_at", "description": "A timestamp representing when the deal_pipeline_stage was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_updated_at": {"name": "deal_pipeline_stage_updated_at", "description": "A timestamp representing when the deal_pipeline_stage was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0565114, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__deal_stages\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith deals_enhanced as (\n\n select *\n from {{ ref('int_hubspot__deals_enhanced') }}\n\n), deal_stage as (\n\n select *\n from {{ ref('stg_hubspot__deal_stage') }}\n\n), pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage') }}\n\n), pipeline as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline') }}\n\n), final as (\n\n select\n deal_stage.source_relation,\n deal_stage.deal_id || '-' || row_number() over(partition by deal_stage.deal_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot', alias='deal_stage') }} order by deal_stage.date_entered asc) as deal_stage_id,\n deals_enhanced.deal_id,\n deals_enhanced.deal_name,\n\n {% if var('hubspot_merged_deal_enabled', false) %}\n deals_enhanced.merged_deal_ids,\n {% endif %}\n \n deal_stage._fivetran_start as date_stage_entered,\n deal_stage._fivetran_end as date_stage_exited,\n deal_stage._fivetran_active as is_stage_active,\n deal_stage.deal_stage_name as pipeline_stage_id,\n pipeline_stage.pipeline_stage_label,\n pipeline_stage.deal_pipeline_id as pipeline_id,\n pipeline.pipeline_label,\n deal_stage.source,\n deal_stage.source_id,\n pipeline_stage.is_active as is_pipeline_stage_active,\n pipeline.is_active as is_pipeline_active,\n pipeline_stage.is_closed as is_pipeline_stage_closed,\n pipeline_stage.display_order as pipeline_stage_display_order,\n pipeline.display_order as pipeline_display_order,\n pipeline_stage.probability as pipeline_stage_probability,\n coalesce(pipeline.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n coalesce(pipeline_stage.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n coalesce(deals_enhanced.is_deal_deleted, false) as is_deal_deleted,\n pipeline_stage.deal_pipeline_stage_created_at,\n pipeline_stage.deal_pipeline_stage_updated_at\n\n from deal_stage\n\n left join pipeline_stage\n on deal_stage.deal_stage_name = pipeline_stage.deal_pipeline_stage_id\n and deal_stage.source_relation = pipeline_stage.source_relation\n\n left join pipeline\n on pipeline_stage.deal_pipeline_id = pipeline.deal_pipeline_id\n and pipeline_stage.source_relation = pipeline.source_relation\n\n left join deals_enhanced\n on deal_stage.deal_id = deals_enhanced.deal_id\n and deal_stage.source_relation = deals_enhanced.source_relation\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__deals_enhanced", "package": null, "version": null}, {"name": "stg_hubspot__deal_stage", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.stg_hubspot__deal_stage", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__deal_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__deal_stages.sql", "compiled": true, "compiled_code": "\n\nwith deals_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__deals_enhanced\"\n\n), deal_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage\"\n\n), pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\n\n), pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\n\n), final as (\n\n select\n deal_stage.source_relation,\n deal_stage.deal_id || '-' || row_number() over(partition by deal_stage.deal_id order by deal_stage.date_entered asc) as deal_stage_id,\n deals_enhanced.deal_id,\n deals_enhanced.deal_name,\n\n \n deals_enhanced.merged_deal_ids,\n \n \n deal_stage._fivetran_start as date_stage_entered,\n deal_stage._fivetran_end as date_stage_exited,\n deal_stage._fivetran_active as is_stage_active,\n deal_stage.deal_stage_name as pipeline_stage_id,\n pipeline_stage.pipeline_stage_label,\n pipeline_stage.deal_pipeline_id as pipeline_id,\n pipeline.pipeline_label,\n deal_stage.source,\n deal_stage.source_id,\n pipeline_stage.is_active as is_pipeline_stage_active,\n pipeline.is_active as is_pipeline_active,\n pipeline_stage.is_closed as is_pipeline_stage_closed,\n pipeline_stage.display_order as pipeline_stage_display_order,\n pipeline.display_order as pipeline_display_order,\n pipeline_stage.probability as pipeline_stage_probability,\n coalesce(pipeline.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n coalesce(pipeline_stage.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n coalesce(deals_enhanced.is_deal_deleted, false) as is_deal_deleted,\n pipeline_stage.deal_pipeline_stage_created_at,\n pipeline_stage.deal_pipeline_stage_updated_at\n\n from deal_stage\n\n left join pipeline_stage\n on deal_stage.deal_stage_name = pipeline_stage.deal_pipeline_stage_id\n and deal_stage.source_relation = pipeline_stage.source_relation\n\n left join pipeline\n on pipeline_stage.deal_pipeline_id = pipeline.deal_pipeline_id\n and pipeline_stage.source_relation = pipeline.source_relation\n\n left join deals_enhanced\n on deal_stage.deal_id = deals_enhanced.deal_id\n and deal_stage.source_relation = deals_enhanced.source_relation\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__companies": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__companies", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__companies.sql", "original_file_path": "models/sales/hubspot__companies.sql", "unique_id": "model.hubspot.hubspot__companies", "fqn": ["hubspot", "sales", "hubspot__companies"], "alias": "hubspot__companies", "checksum": {"name": "sha256", "checksum": "7ce02e86808a79399cbfd0ce792de3bc3507f00ee6bafd9ec149e576602059e3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "is_company_deleted": {"name": "is_company_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.058244, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__companies\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}\n\nwith companies as (\n\n select *\n from {{ ref('stg_hubspot__company') }}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_enabled','hubspot_engagement_company_enabled']) %}\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_companies as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n inner join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), engagement_companies_agg as (\n\n {{ engagements_aggregated('engagement_companies_joined', 'company_id') }}\n\n), joined as (\n\n select \n companies.*,\n {% for metric in engagement_metrics() %}\n coalesce(engagement_companies_agg.{{ metric }},0) as {{ metric }} {% if not loop.last %},{% endif %}\n {% endfor %}\n from companies\n left join engagement_companies_agg\n on companies.company_id = engagement_companies_agg.company_id\n and companies.source_relation = engagement_companies_agg.source_relation\n\n)\n\nselect *\nfrom joined\n\n{% else %}\n\n)\n\nselect *\nfrom companies\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_aggregated", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.stg_hubspot__company", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__companies.sql", "compiled": true, "compiled_code": "\n\nwith companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n\n\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n inner join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), engagement_companies_agg as (\n\n \n\n select\n source_relation,\n company_id,\n count(case when engagement_type = 'NOTE' then company_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_id end) as count_engagement_forwarded_emails\n from engagement_companies_joined\n group by 1,2\n\n\n\n), joined as (\n\n select \n companies.*,\n \n coalesce(engagement_companies_agg.count_engagement_notes,0) as count_engagement_notes ,\n \n coalesce(engagement_companies_agg.count_engagement_tasks,0) as count_engagement_tasks ,\n \n coalesce(engagement_companies_agg.count_engagement_calls,0) as count_engagement_calls ,\n \n coalesce(engagement_companies_agg.count_engagement_meetings,0) as count_engagement_meetings ,\n \n coalesce(engagement_companies_agg.count_engagement_emails,0) as count_engagement_emails ,\n \n coalesce(engagement_companies_agg.count_engagement_incoming_emails,0) as count_engagement_incoming_emails ,\n \n coalesce(engagement_companies_agg.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails \n \n from companies\n left join engagement_companies_agg\n on companies.company_id = engagement_companies_agg.company_id\n and companies.source_relation = engagement_companies_agg.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__company_lists": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__company_lists", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__company_lists.sql", "original_file_path": "models/sales/hubspot__company_lists.sql", "unique_id": "model.hubspot.hubspot__company_lists", "fqn": ["hubspot", "sales", "hubspot__company_lists"], "alias": "hubspot__company_lists", "checksum": {"name": "sha256", "checksum": "e8c3fc1b77fbdfa893e9fd2d0a95707dbff248be5b7a2de3fc9e46207500316a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company list in Hubspot, enriched with engagement and ticket metrics aggregated across member companies.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_list_id": {"name": "company_list_id", "description": "The ID of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_name": {"name": "company_list_name", "description": "The name of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_company_list_deleted": {"name": "is_company_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "total_companies": {"name": "total_companies", "description": "The total number of companies that are members of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0430512, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__company_lists\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])) }}\n\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_company_list_member_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled']) %}\n\nwith company_lists as (\n\n select *\n from {{ ref('stg_hubspot__company_list') }}\n\n{% if engagements_enabled %}\n\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__engagement_metrics__by_company_list') }}\n\n{% endif %}\n\n{% if var('hubspot_company_list_member_enabled', true) %}\n\n), company_list_member as (\n\n select *\n from {{ ref('stg_hubspot__company_list_member') }}\n where not coalesce(is_company_list_member_deleted, false)\n\n),\n\ncompany_list_members_aggregated as (\n \n select \n source_relation,\n company_list_id,\n count(distinct company_id) as total_companies\n\n from company_list_member\n group by 1,2\n\n{% endif %}\n\n), joined as (\n\n select\n company_lists.*\n\n {% if var('hubspot_company_list_member_enabled', true) %}\n , company_list_members_aggregated.total_companies\n {% endif %}\n\n {% if engagements_enabled %}\n {% for metric in engagement_metrics() %}\n , coalesce(engagement_metrics.{{ metric }}, 0) as {{ metric }}\n {% endfor %}\n {% endif %}\n\n from company_lists\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on company_lists.company_list_id = engagement_metrics.company_list_id\n and company_lists.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n {% if var('hubspot_company_list_member_enabled', true) %}\n left join company_list_members_aggregated\n on company_lists.company_list_id = company_list_members_aggregated.company_list_id\n and company_lists.source_relation = company_list_members_aggregated.source_relation\n {% endif %}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list", "package": null, "version": null}, {"name": "int_hubspot__engagement_metrics__by_company_list", "package": null, "version": null}, {"name": "stg_hubspot__company_list_member", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.stg_hubspot__company_list", "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "model.hubspot.stg_hubspot__company_list_member"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__company_lists.sql", "compiled": true, "compiled_code": "\n\n\n\nwith __dbt__cte__int_hubspot__engagement_metrics__by_company_list as (\n\n\nwith company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n \n\n select\n source_relation,\n company_list_id,\n count(case when engagement_type = 'NOTE' then company_list_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_list_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_list_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_list_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_list_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_list_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_list_id end) as count_engagement_forwarded_emails\n from company_list_engagements\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_metrics\n), company_lists as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list\"\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__engagement_metrics__by_company_list\n\n\n\n\n\n), company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n),\n\ncompany_list_members_aggregated as (\n \n select \n source_relation,\n company_list_id,\n count(distinct company_id) as total_companies\n\n from company_list_member\n group by 1,2\n\n\n\n), joined as (\n\n select\n company_lists.*\n\n \n , company_list_members_aggregated.total_companies\n \n\n \n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n \n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n \n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n \n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n \n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n \n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n \n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n \n\n from company_lists\n\n \n left join engagement_metrics\n on company_lists.company_list_id = engagement_metrics.company_list_id\n and company_lists.source_relation = engagement_metrics.source_relation\n \n\n \n left join company_list_members_aggregated\n on company_lists.company_list_id = company_list_members_aggregated.company_list_id\n and company_lists.source_relation = company_list_members_aggregated.source_relation\n \n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "sql": " __dbt__cte__int_hubspot__engagement_metrics__by_company_list as (\n\n\nwith company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n \n\n select\n source_relation,\n company_list_id,\n count(case when engagement_type = 'NOTE' then company_list_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_list_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_list_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_list_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_list_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_list_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_list_id end) as count_engagement_forwarded_emails\n from company_list_engagements\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_metrics\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__deals": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__deals", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__deals.sql", "original_file_path": "models/sales/hubspot__deals.sql", "unique_id": "model.hubspot.hubspot__deals", "fqn": ["hubspot", "sales", "hubspot__deals"], "alias": "hubspot__deals", "checksum": {"name": "sha256", "checksum": "4c47108051345c5c9d4b887e2edce77e942ba8091fc5fe71125254d119752709"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "description": {"name": "description", "description": "A brief description of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount": {"name": "amount", "description": "The total value of the deal in the deal's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_date": {"name": "closed_date", "description": "The day the deal is expected to close, or was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the deal was created. This property is set automatically by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_name": {"name": "deal_name", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_deal_ids": {"name": "merged_deal_ids", "description": "A list of deals that had previously been merged into this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deal_deleted": {"name": "is_deal_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_pipeline_deleted": {"name": "is_deal_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "is_deal_pipeline_stage_deleted": {"name": "is_deal_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The total number of related note engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_notes"]}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The total number of related task engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_tasks"]}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The total number of related call engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_calls"]}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The total number of related meeting engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_meetings"]}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The total number of related email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_emails"]}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The total number of related incoming email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_incoming_emails"]}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The total number of related forwarded email engagements.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.count_engagement_forwarded_emails"]}, "is_pipeline_active": {"name": "is_pipeline_active", "description": "Boolean indicating if the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The label of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The label of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_created_at": {"name": "deal_pipeline_created_at", "description": "A timestamp representing when the deal_pipeline was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_updated_at": {"name": "deal_pipeline_updated_at", "description": "A timestamp representing when the deal_pipeline was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_active_user_id": {"name": "owner_active_user_id", "description": "Unique ID of the active HubSpot user who owns the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_id": {"name": "owner_primary_team_id", "description": "ID of the primary team assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_primary_team_name": {"name": "owner_primary_team_name", "description": "Name of the primary team assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_ids": {"name": "owner_all_team_ids", "description": "Comma-separated list of all team IDs associated with the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_all_team_names": {"name": "owner_all_team_names", "description": "Comma-separated list of all team names associated with the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_id": {"name": "owner_role_id", "description": "ID of the role assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_role_name": {"name": "owner_role_name", "description": "Name of the role assigned to the deal owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0498583, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__deals\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith deals_enhanced as (\n\n select *\n from {{ ref('int_hubspot__deals_enhanced') }}\n{% set cte_ref = 'deals_enhanced' %}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_enabled','hubspot_engagement_deal_enabled']) %}\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_deals as (\n\n select *\n from {{ ref('stg_hubspot__engagement_deal') }}\n\n), engagement_deal_joined as (\n\n select\n engagements.engagement_type,\n engagement_deals.deal_id,\n engagement_deals.source_relation\n from engagements\n inner join engagement_deals\n on cast(engagements.engagement_id as {{ dbt.type_bigint() }}) = cast(engagement_deals.engagement_id as {{ dbt.type_bigint() }} )\n and engagements.source_relation = engagement_deals.source_relation\n\n), engagement_deal_agg as (\n\n {{ engagements_aggregated('engagement_deal_joined', 'deal_id') }}\n\n), engagements_joined as (\n\n select \n deals_enhanced.*,\n {% for metric in engagement_metrics() %}\n coalesce(engagement_deal_agg.{{ metric }},0) as {{ metric }} {% if not loop.last %},{% endif %}\n {% endfor %}\n from deals_enhanced\n left join engagement_deal_agg\n on cast(deals_enhanced.deal_id as {{ dbt.type_bigint() }}) = cast(engagement_deal_agg.deal_id as {{ dbt.type_bigint() }} )\n and deals_enhanced.source_relation = engagement_deal_agg.source_relation\n{% set cte_ref = 'engagements_joined' %}\n\n{% endif %}\n)\n\nselect *\nfrom {{ cte_ref }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__deals_enhanced", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.type_bigint", "macro.hubspot.engagements_aggregated", "macro.hubspot.engagement_metrics"], "nodes": ["model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_deal"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__deals.sql", "compiled": true, "compiled_code": "\n\nwith deals_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__deals_enhanced\"\n\n\n\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), engagement_deal_joined as (\n\n select\n engagements.engagement_type,\n engagement_deals.deal_id,\n engagement_deals.source_relation\n from engagements\n inner join engagement_deals\n on cast(engagements.engagement_id as bigint) = cast(engagement_deals.engagement_id as bigint )\n and engagements.source_relation = engagement_deals.source_relation\n\n), engagement_deal_agg as (\n\n \n\n select\n source_relation,\n deal_id,\n count(case when engagement_type = 'NOTE' then deal_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then deal_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then deal_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then deal_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then deal_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then deal_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then deal_id end) as count_engagement_forwarded_emails\n from engagement_deal_joined\n group by 1,2\n\n\n\n), engagements_joined as (\n\n select \n deals_enhanced.*,\n \n coalesce(engagement_deal_agg.count_engagement_notes,0) as count_engagement_notes ,\n \n coalesce(engagement_deal_agg.count_engagement_tasks,0) as count_engagement_tasks ,\n \n coalesce(engagement_deal_agg.count_engagement_calls,0) as count_engagement_calls ,\n \n coalesce(engagement_deal_agg.count_engagement_meetings,0) as count_engagement_meetings ,\n \n coalesce(engagement_deal_agg.count_engagement_emails,0) as count_engagement_emails ,\n \n coalesce(engagement_deal_agg.count_engagement_incoming_emails,0) as count_engagement_incoming_emails ,\n \n coalesce(engagement_deal_agg.count_engagement_forwarded_emails,0) as count_engagement_forwarded_emails \n \n from deals_enhanced\n left join engagement_deal_agg\n on cast(deals_enhanced.deal_id as bigint) = cast(engagement_deal_agg.deal_id as bigint )\n and deals_enhanced.source_relation = engagement_deal_agg.source_relation\n\n\n\n)\n\nselect *\nfrom engagements_joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagements": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagements", "resource_type": "model", "package_name": "hubspot", "path": "sales/hubspot__engagements.sql", "original_file_path": "models/sales/hubspot__engagements.sql", "unique_id": "model.hubspot.hubspot__engagements", "fqn": ["hubspot", "sales", "hubspot__engagements"], "alias": "hubspot__engagements", "checksum": {"name": "sha256", "checksum": "e2fc27227c16388e598be38a38c05a21bd239007f27c0164dc542487ac1ac540"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an engagement", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/sales.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0598123, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagements\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}\n\nwith engagements as (\n\n select *\n from {{ ref('stg_hubspot__engagement') }}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %}\n\n), contacts as (\n\n select *\n from {{ ref('stg_hubspot__engagement_contact') }}\n\n), contacts_agg as (\n\n select\n source_relation,\n engagement_id,\n {{ fivetran_utils.array_agg('contact_id') }} as contact_ids\n from contacts\n group by 1, 2\n\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %}\n\n), deals as (\n\n select *\n from {{ ref('stg_hubspot__engagement_deal') }}\n \n), deals_agg as (\n\n select\n source_relation,\n engagement_id,\n {{ fivetran_utils.array_agg('deal_id') }} as deal_ids\n from deals\n group by 1, 2\n\n{% endif %}\n\n{% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %}\n\n), companies as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), companies_agg as (\n\n select\n source_relation,\n engagement_id,\n {{ fivetran_utils.array_agg('company_id') }} as company_ids\n from companies\n group by 1, 2\n\n{% endif %}\n\n), joined as (\n\n select \n {% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %} contacts_agg.contact_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %} deals_agg.deal_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %} companies_agg.company_ids, {% endif %}\n engagements.*\n from engagements\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %}\n left join contacts_agg\n on engagements.engagement_id = contacts_agg.engagement_id\n and engagements.source_relation = contacts_agg.source_relation\n {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %}\n left join deals_agg\n on engagements.engagement_id = deals_agg.engagement_id\n and engagements.source_relation = deals_agg.source_relation\n {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %}\n left join companies_agg\n on engagements.engagement_id = companies_agg.engagement_id\n and engagements.source_relation = companies_agg.source_relation\n {% endif %}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement", "package": null, "version": null}, {"name": "stg_hubspot__engagement_contact", "package": null, "version": null}, {"name": "stg_hubspot__engagement_deal", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.array_agg"], "nodes": ["model.hubspot.stg_hubspot__engagement", "model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_deal", "model.hubspot.stg_hubspot__engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/hubspot__engagements.sql", "compiled": true, "compiled_code": "\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement\"\n\n\n\n), contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), contacts_agg as (\n\n select\n source_relation,\n engagement_id,\n \n array_agg(contact_id)\n as contact_ids\n from contacts\n group by 1, 2\n\n\n\n\n\n), deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n \n), deals_agg as (\n\n select\n source_relation,\n engagement_id,\n \n array_agg(deal_id)\n as deal_ids\n from deals\n group by 1, 2\n\n\n\n\n\n), companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), companies_agg as (\n\n select\n source_relation,\n engagement_id,\n \n array_agg(company_id)\n as company_ids\n from companies\n group by 1, 2\n\n\n\n), joined as (\n\n select \n contacts_agg.contact_ids, \n deals_agg.deal_ids, \n companies_agg.company_ids, \n engagements.*\n from engagements\n \n left join contacts_agg\n on engagements.engagement_id = contacts_agg.engagement_id\n and engagements.source_relation = contacts_agg.source_relation\n \n \n left join deals_agg\n on engagements.engagement_id = deals_agg.engagement_id\n and engagements.source_relation = deals_agg.source_relation\n \n \n left join companies_agg\n on engagements.engagement_id = companies_agg.engagement_id\n and engagements.source_relation = companies_agg.source_relation\n \n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_meetings": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_meetings", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_meetings.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_meetings.sql", "unique_id": "model.hubspot.hubspot__engagement_meetings", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_meetings"], "alias": "hubspot__engagement_meetings", "checksum": {"name": "sha256", "checksum": "1aa0ddd71eae7245f73e13595c5bf6947700a1c324462a7fa998fbd3edba6744"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a MEETING engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_meeting_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0793905, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_meetings\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_meeting_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_meeting')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_meetings.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_type\",\n base.\"engagement_id\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"created_from_link_id\",\n base.\"end_time\",\n base.\"pre_meeting_prospect_reminders\",\n base.\"source\",\n base.\"source_id\",\n base.\"start_time\",\n base.\"web_conference_meeting_id\",\n base.\"meeting_outcome\",\n base.\"body\",\n base.\"external_url\",\n base.\"title\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_calls": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_calls", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_calls.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_calls.sql", "unique_id": "model.hubspot.hubspot__engagement_calls", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_calls"], "alias": "hubspot__engagement_calls", "checksum": {"name": "sha256", "checksum": "5946613ae53a245b132423c9ef176b4c805d07f5416cde4035d2583d84b3b738"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CALL engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_call_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.076165, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_calls\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_call_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_call')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_calls.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_id\",\n base.\"engagement_type\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_notes": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_notes", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_notes.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_notes.sql", "unique_id": "model.hubspot.hubspot__engagement_notes", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_notes"], "alias": "hubspot__engagement_notes", "checksum": {"name": "sha256", "checksum": "1c5fb36cfcb9761f676330d9dbadc0a876e76c47f79b5cc7a517ea5f124f626f"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a NOTE engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "note": {"name": "note", "description": "The body of the note. The body has a limit of 65536 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_note_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.080779, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_notes\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_note_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_note')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_note", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_notes.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"note\",\n base.\"engagement_type\",\n base.\"engagement_id\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"body_preview\",\n base.\"lastmodifieddate\",\n base.\"note_body\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_communication": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_communication", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_communication.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_communication.sql", "unique_id": "model.hubspot.hubspot__engagement_communication", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_communication"], "alias": "hubspot__engagement_communication", "checksum": {"name": "sha256", "checksum": "e3fc70ec179bb880f2b0f8c04d00d7860a7e3ffe4d69302fbe76562b0c5462e4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a COMMUNICATION engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0772092, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_communication\"", "raw_code": "{{ config(enabled=var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false)) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_communication')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_communication", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_communication.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_id\",\n base.\"engagement_type\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_emails": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_emails", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_emails.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_emails.sql", "unique_id": "model.hubspot.hubspot__engagement_emails", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_emails"], "alias": "hubspot__engagement_emails", "checksum": {"name": "sha256", "checksum": "44310a032c8530c6ba1ee1a9964efdc1add187084fe4e22cc8741acf338b79ca"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an EMAIL engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_email_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.078333, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_emails\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_email_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_email')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_email", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_emails.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_type\",\n base.\"engagement_id\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"all_owner_ids\",\n base.\"all_team_ids\",\n base.\"email_subject\",\n base.\"email_text\",\n base.\"lastmodifieddate\",\n base.\"modified_by\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__engagement_tasks": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__engagement_tasks", "resource_type": "model", "package_name": "hubspot", "path": "sales/engagement_events/hubspot__engagement_tasks.sql", "original_file_path": "models/sales/engagement_events/hubspot__engagement_tasks.sql", "unique_id": "model.hubspot.hubspot__engagement_tasks", "fqn": ["hubspot", "sales", "engagement_events", "hubspot__engagement_tasks"], "alias": "hubspot__engagement_tasks", "checksum": {"name": "sha256", "checksum": "e77e050e665e98e53123a24af83f3c19a4923835c5c4c10557e972492588cb2d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a TASK engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the engagement is currently being shown in the UI.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp representing when the engagement was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_ids": {"name": "contact_ids", "description": "List of contacts related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_ids": {"name": "deal_ids", "description": "List of deals related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_ids": {"name": "company_ids", "description": "List of companies related to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/engagement_events/engagement_events.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_task_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.0818658, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__engagement_tasks\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_task_enabled','hubspot_engagement_enabled'])) }}\n\n{{ engagements_joined(ref('stg_hubspot__engagement_task')) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_joined"], "nodes": ["model.hubspot.stg_hubspot__engagement_task", "model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/hubspot__engagement_tasks.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), joined as (\n\n select\n base.\"_fivetran_synced\",\n base.\"engagement_id\",\n base.\"engagement_type\",\n base.\"created_timestamp\",\n base.\"occurred_timestamp\",\n base.\"owner_id\",\n base.\"team_id\",\n base.\"task_type\",\n base.\"object_id\",\n base.\"engagement_source\",\n base.\"source_relation\",\n engagements.contact_ids, \n engagements.deal_ids, \n engagements.company_ids, \n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_deal_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_deal_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_deal_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_deal_history"], "alias": "int_hubspot__daily_deal_history", "checksum": {"name": "sha256", "checksum": "99c502787764856d430e794a8fd8610233caebf0bedb0ac7ee767fa17546f2c1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.0317838, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_deal_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\n-- pipeline_stage_id is added manually\n{% set deal_columns = (['deal_pipeline_id', 'amount', 'amount_in_home_currency'] + var('hubspot__deal_property_history_columns', [])) %}\n{% do deal_columns.append('owner_id') if var('hubspot_owner_enabled', true) %}\n{% do deal_columns.append('hubspot_team_id') if var('hubspot_team_enabled', true) %}\n{% set deal_columns = deal_columns | unique | list %}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith deal_history as (\n\n select\n source_relation,\n deal_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n cast({{ dbt.date_trunc('day', 'valid_from') }} as date) as date_day,\n valid_from,\n valid_to\n\n from {{ ref('hubspot__deal_history') }}\n\n where lower(field_name) in ({{ \"'\" ~ deal_columns | join(\"', '\") ~ \"'\" }})\n\n {% if is_incremental() %}\n and cast(valid_from as date) >= {{ lookback_date }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(valid_from as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n{# Deal stages are not stored in deal_property_history #}\n), deal_stages as (\n\n select\n source_relation,\n deal_id,\n 'pipeline_stage_id' as field_name,\n deal_stage_name as new_value,\n source as change_source,\n source_id as change_source_id,\n cast({{ dbt.date_trunc('day', 'date_entered') }} as date) as date_day,\n _fivetran_start as valid_from,\n _fivetran_end as valid_to\n\n from {{ ref('stg_hubspot__deal_stage') }}\n\n {% if is_incremental() %}\n where cast(date_entered as date) >= {{ lookback_date }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n where cast(date_entered as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), combined as (\n\n select * from deal_history\n union all\n select * from deal_stages\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, deal_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from combined\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n deal_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','deal_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}, {"name": "stg_hubspot__deal_stage", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.hubspot__deal_history", "model.hubspot.stg_hubspot__deal_stage"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_deal_history.sql", "compiled": true, "compiled_code": "\n\n-- pipeline_stage_id is added manually\n\n\n\n\n\n\nwith deal_history as (\n\n select\n source_relation,\n deal_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n cast(date_trunc('day', valid_from) as date) as date_day,\n valid_from,\n valid_to\n\n from \"postgres\".\"public_hubspot\".\"hubspot__deal_history\"\n\n where lower(field_name) in ('deal_pipeline_id', 'amount', 'amount_in_home_currency', 'owner_id', 'hubspot_team_id')\n\n \n and cast(valid_from as date) >= \n\n\n\n \n\n \n\n cast('2021-01-12' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n), deal_stages as (\n\n select\n source_relation,\n deal_id,\n 'pipeline_stage_id' as field_name,\n deal_stage_name as new_value,\n source as change_source,\n source_id as change_source_id,\n cast(date_trunc('day', date_entered) as date) as date_day,\n _fivetran_start as valid_from,\n _fivetran_end as valid_to\n\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage\"\n\n \n where cast(date_entered as date) >= \n\n\n\n \n\n \n\n cast('2021-01-12' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), combined as (\n\n select * from deal_history\n union all\n select * from deal_stages\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, deal_id, field_name \n order by valid_from desc\n ) as row_num\n from combined\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n deal_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_engagement_metrics__by_deal", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_engagement_metrics__by_deal.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_deal.sql", "unique_id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_engagement_metrics__by_deal"], "alias": "int_hubspot__daily_engagement_metrics__by_deal", "checksum": {"name": "sha256", "checksum": "37c21582f1354e0df67eed89317d2f979954d9e4a197b1c61ea428cd1866db16"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.0569592, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled']))\n}}\n\n{# Build a list of (model_ref, enabled_var) pairs so we can union only what's enabled #}\n{% set engagement_staging_models = [] %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_call') if fivetran_utils.enabled_vars(['hubspot_engagement_call_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_email') if fivetran_utils.enabled_vars(['hubspot_engagement_email_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_meeting') if fivetran_utils.enabled_vars(['hubspot_engagement_meeting_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_note') if fivetran_utils.enabled_vars(['hubspot_engagement_note_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_task') if fivetran_utils.enabled_vars(['hubspot_engagement_task_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_communication') if var('hubspot_engagement_communication_enabled', false) %}\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from {{ ref('stg_hubspot__engagement_deal') }}\n\n), all_engagements as (\n\n {% if engagement_staging_models | length > 0 %}\n {% for model in engagement_staging_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from {{ ref(model) }}\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as engagement_id,\n cast(null as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n cast(null as {{ dbt.type_string() }}) as engagement_type\n where false\n\n {% endif %}\n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast({{ dbt.date_trunc('day', 'all_engagements.occurred_timestamp') }} as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_deal", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.stg_hubspot__engagement_deal", "model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task", "model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_deal.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__scd_daily_company_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__scd_daily_company_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_company_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__scd_daily_company_history"], "alias": "int_hubspot__scd_daily_company_history", "checksum": {"name": "sha256", "checksum": "0210e1ff0bd0312b57f96ec386fedc00023e658e31a9f3a6730054401b30edc0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.0743964, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_company_history\"", "raw_code": "{{ config(materialized='table', enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])) }}\n\n{%- set company_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_company_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_company_history') }}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id,\n id\n\n {% for col in company_columns if col.name|lower not in ['source_relation','date_day','company_id','id'] %}\n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by company_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes company property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n company_id,\n id\n\n {% for col in company_columns if col.name|lower not in ['source_relation','date_day','company_id','id'] %}\n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by company_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_company_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__scd_daily_company_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_company_history\"\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id,\n id\n\n \n , hubspot_owner_id as hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum( case when hubspot_owner_id is null then 0 else 1 end) over (partition by company_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_field_partition\n\n \n , lifecyclestage as lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum( case when lifecyclestage is null then 0 else 1 end) over (partition by company_id \n order by date_day rows unbounded preceding) as lifecyclestage_field_partition\n\n \n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes company property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n company_id,\n id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by company_id, hubspot_owner_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by company_id, lifecyclestage_field_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__deals_enhanced": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__deals_enhanced", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__deals_enhanced.sql", "original_file_path": "models/sales/intermediate/int_hubspot__deals_enhanced.sql", "unique_id": "model.hubspot.int_hubspot__deals_enhanced", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__deals_enhanced"], "alias": "int_hubspot__deals_enhanced", "checksum": {"name": "sha256", "checksum": "4b35bfa030eb70cf096ff9019996ed30ad6dc331ca6cee45e476964cd9384876"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.0878181, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__deals_enhanced\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n{% set merged_deal_enabled = var('hubspot_merged_deal_enabled', false) %}\n{% set owner_enabled = var('hubspot_owner_enabled', true) %}\n\nwith deals as (\n\n select *\n from {{ ref('stg_hubspot__deal') }}\n\n{% if merged_deal_enabled %}\n), merged_deals as (\n\n select *\n from {{ ref('stg_hubspot__merged_deal') }}\n\n), aggregate_merged_deals as (\n\n select\n source_relation,\n deal_id,\n {{ fivetran_utils.array_agg(\"merged_deal_id\") }} as merged_deal_ids\n from merged_deals\n group by 1, 2\n{% endif %}\n\n), pipelines as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline') }}\n\n), pipeline_stages as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage') }}\n\n{% if owner_enabled %}\n), owners_enhanced as (\n\n select *\n from {{ ref('int_hubspot__owners_enhanced') }}\n{% endif %}\n\n), deal_fields_joined as (\n\n select \n deals.*,\n\n {{ 'aggregate_merged_deals.merged_deal_ids,' if merged_deal_enabled }}\n\n coalesce(pipelines.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n pipelines.pipeline_label,\n pipelines.is_active as is_pipeline_active,\n coalesce(pipeline_stages.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n pipelines.deal_pipeline_created_at,\n pipelines.deal_pipeline_updated_at,\n pipeline_stages.pipeline_stage_label\n\n {{ \",\" ~ dbt_utils.star(ref('int_hubspot__owners_enhanced'), except=[\"owner_id\", \"source_relation\"], relation_alias=\"owners_enhanced\") if owner_enabled }}\n\n from deals \n left join pipelines\n on deals.deal_pipeline_id = pipelines.deal_pipeline_id\n and deals.source_relation = pipelines.source_relation\n left join pipeline_stages\n on deals.deal_pipeline_stage_id = pipeline_stages.deal_pipeline_stage_id\n and deals.source_relation = pipeline_stages.source_relation\n\n {% if owner_enabled %}\n left join owners_enhanced\n on deals.owner_id = owners_enhanced.owner_id\n and deals.source_relation = owners_enhanced.source_relation\n {% endif %}\n\n {% if merged_deal_enabled %}\n left join aggregate_merged_deals\n on deals.deal_id = aggregate_merged_deals.deal_id\n and deals.source_relation = aggregate_merged_deals.source_relation\n\n left join merged_deals\n on deals.deal_id = merged_deals.merged_deal_id\n and deals.source_relation = merged_deals.source_relation\n where merged_deals.merged_deal_id is null\n {% endif %}\n) \n\nselect *\nfrom deal_fields_joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal", "package": null, "version": null}, {"name": "stg_hubspot__merged_deal", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}, {"name": "int_hubspot__owners_enhanced", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.array_agg", "macro.dbt_utils.star"], "nodes": ["model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__merged_deal", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.int_hubspot__owners_enhanced"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__deals_enhanced.sql", "compiled": true, "compiled_code": "\n\n\n\nwith deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n\n\n), merged_deals as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"\n\n), aggregate_merged_deals as (\n\n select\n source_relation,\n deal_id,\n \n array_agg(merged_deal_id)\n as merged_deal_ids\n from merged_deals\n group by 1, 2\n\n\n), pipelines as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\n\n), pipeline_stages as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\n\n\n), owners_enhanced as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__owners_enhanced\"\n\n\n), deal_fields_joined as (\n\n select \n deals.*,\n\n aggregate_merged_deals.merged_deal_ids,\n\n coalesce(pipelines.is_deal_pipeline_deleted, false) as is_deal_pipeline_deleted,\n pipelines.pipeline_label,\n pipelines.is_active as is_pipeline_active,\n coalesce(pipeline_stages.is_deal_pipeline_stage_deleted, false) as is_deal_pipeline_stage_deleted,\n pipelines.deal_pipeline_created_at,\n pipelines.deal_pipeline_updated_at,\n pipeline_stages.pipeline_stage_label\n\n ,owners_enhanced.\"owner_active_user_id\",\n owners_enhanced.\"owner_email_address\",\n owners_enhanced.\"owner_full_name\",\n owners_enhanced.\"owner_primary_team_id\",\n owners_enhanced.\"owner_primary_team_name\",\n owners_enhanced.\"owner_all_team_ids\",\n owners_enhanced.\"owner_all_team_names\",\n owners_enhanced.\"owner_role_id\",\n owners_enhanced.\"owner_role_name\"\n\n from deals \n left join pipelines\n on deals.deal_pipeline_id = pipelines.deal_pipeline_id\n and deals.source_relation = pipelines.source_relation\n left join pipeline_stages\n on deals.deal_pipeline_stage_id = pipeline_stages.deal_pipeline_stage_id\n and deals.source_relation = pipeline_stages.source_relation\n\n \n left join owners_enhanced\n on deals.owner_id = owners_enhanced.owner_id\n and deals.source_relation = owners_enhanced.source_relation\n \n\n \n left join aggregate_merged_deals\n on deals.deal_id = aggregate_merged_deals.deal_id\n and deals.source_relation = aggregate_merged_deals.source_relation\n\n left join merged_deals\n on deals.deal_id = merged_deals.merged_deal_id\n and deals.source_relation = merged_deals.source_relation\n where merged_deals.merged_deal_id is null\n \n) \n\nselect *\nfrom deal_fields_joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_engagement_metrics__by_company": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_engagement_metrics__by_company", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_engagement_metrics__by_company.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_company.sql", "unique_id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_engagement_metrics__by_company"], "alias": "int_hubspot__daily_engagement_metrics__by_company", "checksum": {"name": "sha256", "checksum": "3d318890dd58aa739e0d815601cc3a1d73c89aabdcc859bc5cd5c091b3d3e1c2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.101712, "relation_name": null, "raw_code": "{{\n config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled']))\n}}\n\n{# Build a list of (model_ref, enabled_var) pairs so we can union only what's enabled #}\n{% set engagement_staging_models = [] %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_call') if fivetran_utils.enabled_vars(['hubspot_engagement_call_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_email') if fivetran_utils.enabled_vars(['hubspot_engagement_email_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_meeting') if fivetran_utils.enabled_vars(['hubspot_engagement_meeting_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_note') if fivetran_utils.enabled_vars(['hubspot_engagement_note_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_task') if fivetran_utils.enabled_vars(['hubspot_engagement_task_enabled']) %}\n{% do engagement_staging_models.append('stg_hubspot__engagement_communication') if var('hubspot_engagement_communication_enabled', false) %}\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), all_engagements as (\n\n {% if engagement_staging_models | length > 0 %}\n {% for model in engagement_staging_models %}\n {% if not loop.first %}union all{% endif %}\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from {{ ref(model) }}\n {% endfor %}\n\n {% else %}\n\n select\n cast(null as {{ dbt.type_string() }}) as source_relation,\n cast(null as {{ dbt.type_int() }}) as engagement_id,\n cast(null as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n cast(null as {{ dbt.type_string() }}) as engagement_type\n where false\n\n {% endif %}\n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast({{ dbt.date_trunc('day', 'all_engagements.occurred_timestamp') }} as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_company", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.dbt.date_trunc"], "nodes": ["model.hubspot.stg_hubspot__engagement_company", "model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task", "model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_engagement_metrics__by_company.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__scd_daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__scd_daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__scd_daily_deal_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__scd_daily_deal_history.sql", "unique_id": "model.hubspot.int_hubspot__scd_daily_deal_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__scd_daily_deal_history"], "alias": "int_hubspot__scd_daily_deal_history", "checksum": {"name": "sha256", "checksum": "110109e5d84eab672778516355624da7b320e5c8dfaa288e3996b2b04ad98451"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.1193445, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_deal_history\"", "raw_code": "{{ config(materialized='table', enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\n{%- set deal_columns = adapter.get_columns_in_relation(ref('int_hubspot__pivot_daily_deal_history')) -%}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__pivot_daily_deal_history') }}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n {% for col in deal_columns if col.name|lower not in ['source_relation','date_day','deal_id','id'] %}\n , {{ col.name }} as {{ col.name|lower }}\n -- create a batch/partition once a new value is provided\n , sum( case when {{ col.name }} is null then 0 else 1 end) over (partition by deal_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_field_partition\n\n {% endfor %}\n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes deal property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n {% for col in deal_columns if col.name|lower not in ['source_relation','date_day','deal_id','id'] %}\n\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by deal_id, {{ col.name }}_field_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n\n {% endfor %}\n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__pivot_daily_deal_history", "package": null, "version": null}, {"name": "int_hubspot__pivot_daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__pivot_daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__scd_daily_deal_history.sql", "compiled": true, "compiled_code": "with change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_deal_history\"\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n \n , deal_pipeline_id as deal_pipeline_id\n -- create a batch/partition once a new value is provided\n , sum( case when deal_pipeline_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as deal_pipeline_id_field_partition\n\n \n , pipeline_stage_id as pipeline_stage_id\n -- create a batch/partition once a new value is provided\n , sum( case when pipeline_stage_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as pipeline_stage_id_field_partition\n\n \n , amount as amount\n -- create a batch/partition once a new value is provided\n , sum( case when amount is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as amount_field_partition\n\n \n , amount_in_home_currency as amount_in_home_currency\n -- create a batch/partition once a new value is provided\n , sum( case when amount_in_home_currency is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as amount_in_home_currency_field_partition\n\n \n , owner_id as owner_id\n -- create a batch/partition once a new value is provided\n , sum( case when owner_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as owner_id_field_partition\n\n \n , hubspot_team_id as hubspot_team_id\n -- create a batch/partition once a new value is provided\n , sum( case when hubspot_team_id is null then 0 else 1 end) over (partition by deal_id \n order by date_day rows unbounded preceding) as hubspot_team_id_field_partition\n\n \n\n from change_data\n\n), fill_values as (\n\n-- each row of the pivoted table includes deal property values if that property was updated on that day\n-- we need to backfill to persist values that have been previously updated and are still valid\n select\n source_relation,\n date_day,\n deal_id,\n id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( deal_pipeline_id ) over (\n partition by deal_id, deal_pipeline_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as deal_pipeline_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( pipeline_stage_id ) over (\n partition by deal_id, pipeline_stage_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as pipeline_stage_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( amount ) over (\n partition by deal_id, amount_field_partition \n order by date_day asc rows between unbounded preceding and current row) as amount\n\n \n\n -- grab the value that started this batch/partition\n , first_value( amount_in_home_currency ) over (\n partition by deal_id, amount_in_home_currency_field_partition \n order by date_day asc rows between unbounded preceding and current row) as amount_in_home_currency\n\n \n\n -- grab the value that started this batch/partition\n , first_value( owner_id ) over (\n partition by deal_id, owner_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as owner_id\n\n \n\n -- grab the value that started this batch/partition\n , first_value( hubspot_team_id ) over (\n partition by deal_id, hubspot_team_id_field_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_team_id\n\n \n\n from set_values\n\n)\n\nselect *\nfrom fill_values", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__pivot_daily_deal_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_deal_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__pivot_daily_deal_history"], "alias": "int_hubspot__pivot_daily_deal_history", "checksum": {"name": "sha256", "checksum": "3d648ecaaf06a2f8ef5ba0b9b8caa47e30827e33470e6814674e276be015a8eb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.132745, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_deal_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set deal_columns = (['deal_pipeline_id', 'pipeline_stage_id', 'amount', 'amount_in_home_currency'] + var('hubspot__deal_property_history_columns', [])) %}\n{% do deal_columns.append('owner_id') if var('hubspot_owner_enabled', true) %}\n{% do deal_columns.append('hubspot_team_id') if var('hubspot_team_enabled', true) %}\n{% set deal_columns = deal_columns | unique | list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_deal_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n {% for col in deal_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'deal_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_deal_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2021-01-12' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n , max(case when lower(field_name) = 'deal_pipeline_id' then new_value end) as deal_pipeline_id\n , max(case when lower(field_name) = 'pipeline_stage_id' then new_value end) as pipeline_stage_id\n , max(case when lower(field_name) = 'amount' then new_value end) as amount\n , max(case when lower(field_name) = 'amount_in_home_currency' then new_value end) as amount_in_home_currency\n , max(case when lower(field_name) = 'owner_id' then new_value end) as owner_id\n , max(case when lower(field_name) = 'hubspot_team_id' then new_value end) as hubspot_team_id\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__company_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__company_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__company_calendar_spine.sql", "original_file_path": "models/sales/intermediate/int_hubspot__company_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__company_calendar_spine", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__company_calendar_spine"], "alias": "int_hubspot__company_calendar_spine", "checksum": {"name": "sha256", "checksum": "2c227c945377693db78f548782a95758b54df2ff71e200d3e751b64511b87c65"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.1530948, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__company_calendar_spine\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__company') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(created_date as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__company') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), company as (\n\n select\n *\n from {{ ref('stg_hubspot__company') }}\n where not coalesce(is_company_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n company.company_id,\n company.source_relation\n from calendar\n inner join company\n on cast(calendar.date_day as date) >= cast(company.created_date as date)\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','company_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company", "package": null, "version": null}, {"name": "stg_hubspot__company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__company"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__company_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3875\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), company as (\n\n select\n *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\n where not coalesce(is_company_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n company.company_id,\n company.source_relation\n from calendar\n inner join company\n on cast(calendar.date_day as date) >= cast(company.created_date as date)\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__daily_company_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__daily_company_history.sql", "unique_id": "model.hubspot.int_hubspot__daily_company_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__daily_company_history"], "alias": "int_hubspot__daily_company_history", "checksum": {"name": "sha256", "checksum": "891ecd507d3bdc1cce4dffb83467538a22861321460d1528a6fd06bb4e7c21b9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='in', expr=Tuple(items=[Const(value='bigquery'), Const(value='spark'), Const(value='databricks')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.1769881, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__daily_company_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n file_format='delta'\n )\n}}\n\n{% set company_columns = (['hubspot_owner_id', 'lifecyclestage'] + var('hubspot__company_property_history_columns', [])) | unique | list %}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__company_property_history') }}\n\n where lower(field_name) in ({{ \"'\" ~ company_columns | join(\"', '\") ~ \"'\" }})\n\n {% if is_incremental() %}\n and cast(change_timestamp as date) >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n and cast(change_timestamp as date) >= cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% endif %}\n\n), windows as (\n\n select\n source_relation,\n cast({{ dbt.date_trunc('day', 'change_timestamp') }} as date) as date_day,\n company_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, company_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n company_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['field_name','company_id','date_day','source_relation']) }} as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.date_trunc", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.stg_hubspot__company_property_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__daily_company_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history\"\n\n where lower(field_name) in ('hubspot_owner_id', 'lifecyclestage')\n\n \n and cast(change_timestamp as date) >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), windows as (\n\n select\n source_relation,\n cast(date_trunc('day', change_timestamp) as date) as date_day,\n company_id,\n field_name,\n new_value,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n _fivetran_end as valid_to\n\n from history\n\n), order_daily_changes as (\n\n select\n *,\n row_number() over (\n partition by date_day, company_id, field_name \n order by valid_from desc\n ) as row_num\n from windows\n\n), extract_latest as (\n\n select\n source_relation,\n date_day,\n company_id,\n field_name,\n case when new_value is null then 'is_null' else new_value end as new_value,\n change_source,\n change_source_id,\n valid_from,\n valid_to\n\n from order_daily_changes\n where row_num = 1\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from extract_latest\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__engagement_metrics__by_company_list": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__engagement_metrics__by_company_list", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__engagement_metrics__by_company_list.sql", "original_file_path": "models/sales/intermediate/int_hubspot__engagement_metrics__by_company_list.sql", "unique_id": "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__engagement_metrics__by_company_list"], "alias": "int_hubspot__engagement_metrics__by_company_list", "checksum": {"name": "sha256", "checksum": "6e567b60e778e7484766beb907276a0d2cfe727d899e7087b0e8f3ac176a7353"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.1968904, "relation_name": null, "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'hubspot_sales_enabled',\n 'hubspot_company_list_member_enabled',\n 'hubspot_engagement_enabled',\n 'hubspot_engagement_company_enabled'\n])) }}\n\nwith company_list_member as (\n\n select *\n from {{ ref('stg_hubspot__company_list_member') }}\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), engagement_companies as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company') }}\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n {{ engagements_aggregated('company_list_engagements', 'company_list_id') }}\n\n)\n\nselect *\nfrom engagement_metrics", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list_member", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.engagements_aggregated"], "nodes": ["model.hubspot.stg_hubspot__company_list_member", "model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__engagement_metrics__by_company_list.sql", "compiled": true, "compiled_code": "\n\nwith company_list_member as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"\n where not coalesce(is_company_list_member_deleted, false)\n\n), engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_companies as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), engagement_companies_joined as (\n\n select\n engagements.engagement_type,\n engagement_companies.company_id,\n engagement_companies.source_relation\n from engagements\n join engagement_companies\n on engagements.engagement_id = engagement_companies.engagement_id\n and engagements.source_relation = engagement_companies.source_relation\n\n), company_list_engagements as (\n\n select\n company_list_member.company_list_id,\n company_list_member.source_relation,\n engagement_companies_joined.engagement_type\n from company_list_member\n join engagement_companies_joined\n on company_list_member.company_id = engagement_companies_joined.company_id\n and company_list_member.source_relation = engagement_companies_joined.source_relation\n\n), engagement_metrics as (\n\n \n\n select\n source_relation,\n company_list_id,\n count(case when engagement_type = 'NOTE' then company_list_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then company_list_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then company_list_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then company_list_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then company_list_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then company_list_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then company_list_id end) as count_engagement_forwarded_emails\n from company_list_engagements\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_metrics", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__deal_calendar_spine": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__deal_calendar_spine", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__deal_calendar_spine.sql", "original_file_path": "models/sales/intermediate/int_hubspot__deal_calendar_spine.sql", "unique_id": "model.hubspot.int_hubspot__deal_calendar_spine", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__deal_calendar_spine"], "alias": "int_hubspot__deal_calendar_spine", "checksum": {"name": "sha256", "checksum": "3e10808ce86fe4a06008768cb8a883bb4a0ced651f51b1b43677e05d55d8b9f5"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.205444, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__deal_calendar_spine\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n-- depends_on: {{ ref('stg_hubspot__deal') }}\n\nwith calendar as (\n\n {% if execute and flags.WHICH in ('run', 'build') %}\n {% set first_date_query %}\n {% if is_incremental() %}\n select coalesce(max(date_day), cast('2016-01-01' as date)) from {{ this }}\n {% elif var('hubspot__daily_history_start_date', none) %}\n select cast('{{ var(\"hubspot__daily_history_start_date\") }}' as date)\n {% else %}\n select coalesce(min(cast(created_date as date)), cast('2016-01-01' as date)) from {{ ref('stg_hubspot__deal') }}\n {% endif %}\n {% endset %}\n {% set first_date = dbt_utils.get_single_value(first_date_query) | string %}\n\n {% else %}\n {% set first_date = \"2016-01-01\" %}\n {% endif %}\n\n {% set start_date = \"cast('\" ~ first_date[0:10] ~ \"' as date)\" %}\n\n select *\n from (\n {{\n dbt_utils.date_spine(\n datepart = \"day\",\n start_date = start_date,\n end_date = dbt.dateadd(\"day\", 1, dbt.current_timestamp_in_utc_backcompat())\n )\n }}\n ) as date_spine\n\n), deal as (\n\n select\n *,\n cast( {{ dbt.date_trunc('day', \"case when closed_date is null then \" ~ dbt.current_timestamp_backcompat() ~ \" else closed_date end\") }} as date) as open_until\n from {{ ref('stg_hubspot__deal') }}\n where not coalesce(is_deal_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n deal.deal_id,\n deal.source_relation\n from calendar\n inner join deal\n on cast(calendar.date_day as date) >= cast(deal.created_date as date)\n and cast(calendar.date_day as date) <= {{ dbt.dateadd('day', var('deal_history_extension_days', 30), 'deal.open_until') }}\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['date_day','deal_id','source_relation']) }} as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal", "package": null, "version": null}, {"name": "stg_hubspot__deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.current_timestamp_in_utc_backcompat", "macro.dbt.dateadd", "macro.dbt_utils.date_spine", "macro.dbt.current_timestamp_backcompat", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__deal"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__deal_calendar_spine.sql", "compiled": true, "compiled_code": "\n-- depends_on: \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n\nwith calendar as (\n\n \n \n \n\n \n\n select *\n from (\n \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 p11.generated_number * power(2, 11)\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 cross join \n \n p as p11\n \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3875\n order by generated_number\n\n\n\n),\n\nall_periods as (\n\n select (\n \n\n cast('2016-01-01' as date) + ((interval '1 day') * (row_number() over (order by generated_number) - 1))\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 <= \n\n \n (current_timestamp at time zone 'utc')::timestamp\n + ((interval '1 day') * (1))\n\n\n\n)\n\nselect * from filtered\n\n\n ) as date_spine\n\n), deal as (\n\n select\n *,\n cast( date_trunc('day', case when closed_date is null then \n current_timestamp::timestamp\n else closed_date end) as date) as open_until\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\n where not coalesce(is_deal_deleted, false)\n\n), joined as (\n\n select\n cast(calendar.date_day as date) as date_day,\n deal.deal_id,\n deal.source_relation\n from calendar\n inner join deal\n on cast(calendar.date_day as date) >= cast(deal.created_date as date)\n and cast(calendar.date_day as date) <= \n\n deal.open_until + ((interval '1 day') * (30))\n\n\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from joined\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.int_hubspot__pivot_daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "int_hubspot__pivot_daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/intermediate/int_hubspot__pivot_daily_company_history.sql", "original_file_path": "models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql", "unique_id": "model.hubspot.int_hubspot__pivot_daily_company_history", "fqn": ["hubspot", "sales", "intermediate", "int_hubspot__pivot_daily_company_history"], "alias": "int_hubspot__pivot_daily_company_history", "checksum": {"name": "sha256", "checksum": "c7a2ae961c2b322c453b2182a107b4c8787aed957c7ef54167781e1f08c2713c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398586.2312417, "relation_name": "\"postgres\".\"public_hubspot\".\"int_hubspot__pivot_daily_company_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{% set company_columns = (['hubspot_owner_id', 'lifecyclestage'] + var('hubspot__company_property_history_columns', [])) | unique | list %}\n\nwith daily_history as (\n\n select *\n from {{ ref('int_hubspot__daily_company_history') }}\n\n {% if is_incremental() %}\n where date_day >= {{ hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) }}\n {% endif %}\n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n company_id\n\n {% for col in company_columns -%}\n , max(case when lower(field_name) = '{{ col|lower }}' then new_value end) as {{ dbt_utils.slugify(col) | replace(' ', '_') | lower }}\n {% endfor -%}\n\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation','date_day', 'company_id']) }} as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt_utils.slugify", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback"], "nodes": ["model.hubspot.int_hubspot__daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith daily_history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__daily_company_history\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2010-01-01' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pivot_out as (\n\n select\n source_relation,\n date_day,\n company_id\n\n , max(case when lower(field_name) = 'hubspot_owner_id' then new_value end) as hubspot_owner_id\n , max(case when lower(field_name) = 'lifecyclestage' then new_value end) as lifecyclestage\n from daily_history\n\n group by 1,2,3\n\n), surrogate as (\n\n select\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from pivot_out\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.hubspot__deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__deal_history.sql", "original_file_path": "models/sales/history/hubspot__deal_history.sql", "unique_id": "model.hubspot.hubspot__deal_history", "fqn": ["hubspot", "sales", "history", "hubspot__deal_history"], "alias": "hubspot__deal_history", "checksum": {"name": "sha256", "checksum": "ef17ec6d99b5127bb235c5f6d4844cf618f5fda04f6f32c818f40b03ebca42ef"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to deal record in Hubspot; the grain of this model is deal_id -> field_name -> valid_to.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "valid_from": {"name": "valid_from", "description": "The timestamp the change was valid from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "valid_to": {"name": "valid_to", "description": "The timestamp the change was valid to. Null if still valid.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "id": {"name": "id", "description": "The ID of the change. Hashed on `source_relation`, `field_name`, `deal_id`, and `valid_from`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1067886, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__deal_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__deal_property_history') }}\n\n), windows as (\n\n select\n source_relation,\n deal_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by deal_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n {{ dbt_utils.generate_surrogate_key(['field_name','deal_id','valid_from','source_relation']) }} as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__deal_property_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__deal_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history\"\n\n), windows as (\n\n select\n source_relation,\n deal_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by deal_id, field_name order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select \n windows.*,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_from as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["id"], "time_spine": null}, "model.hubspot.hubspot__daily_company_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__daily_company_history.sql", "original_file_path": "models/sales/history/hubspot__daily_company_history.sql", "unique_id": "model.hubspot.hubspot__daily_company_history", "fqn": ["hubspot", "sales", "history", "hubspot__daily_company_history"], "alias": "hubspot__daily_company_history", "checksum": {"name": "sha256", "checksum": "3a5ff851ed81f92a6b4381a7cdcc9ba422ab69984a47124d896da0ce06e1c6e4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "company_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a company's day in Hubspot with tracked properties pivoted into columns. By default, tracks the company's owner and lifecycle stage on each day.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_day_id": {"name": "company_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `company_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the company had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "Unique id of a company in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_owner_id": {"name": "hubspot_owner_id", "description": "The ID of the company owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lifecyclestage": {"name": "lifecyclestage", "description": "The lifecycle stage of the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the company owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the company owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "The number of notes logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "The number of tasks logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "The number of calls logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "The number of meetings logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "The number of emails logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "The number of incoming emails logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "The number of forwarded emails logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_communications": {"name": "count_engagement_communications", "description": "The number of communication engagements logged against the company on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "company_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1045923, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='company_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_company_history')) -%}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled']) %}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_company_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no company fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__company_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owner as (\n\n select *\n from {{ ref('stg_hubspot__owner') }}\n\n{% endif %}\n\n{% if engagements_enabled %}\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_engagement_metrics__by_company') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.company_id\n {% if is_incremental() %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n\n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.company_id = change_data.company_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n {% if is_incremental() %}\n left join most_recent_data\n on calendar.company_id = most_recent_data.company_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by company_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by company_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.company_id\n\n {% if var('hubspot_owner_enabled', true) %}\n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n {% endif %}\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','company_id','date_day','id'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.{{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else fill_values.{{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n {% if engagements_enabled %}\n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n {% if var('hubspot_engagement_communication_enabled', false) %}\n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n {% endif %}\n {% endif %}\n\n from fill_values\n\n {% if var('hubspot_owner_enabled', true) %}\n left join owner\n on cast(fill_values.hubspot_owner_id as {{ dbt.type_string() }}) = cast(owner.owner_id as {{ dbt.type_string() }})\n and fill_values.source_relation = owner.source_relation\n {% endif %}\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on fill_values.company_id = engagement_metrics.company_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','company_id','source_relation']) }} as company_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_company_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_company_history", "package": null, "version": null}, {"name": "int_hubspot__company_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "int_hubspot__daily_engagement_metrics__by_company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.type_string", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__scd_daily_company_history", "model.hubspot.int_hubspot__company_calendar_spine", "model.hubspot.stg_hubspot__owner", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__daily_company_history.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_hubspot__daily_engagement_metrics__by_company as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_company_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no company fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__company_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n), owner as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_engagement_metrics__by_company\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.company_id\n \n \n , coalesce(change_data.hubspot_owner_id, most_recent_data.hubspot_owner_id) as hubspot_owner_id\n \n , coalesce(change_data.lifecyclestage, most_recent_data.lifecyclestage) as lifecyclestage\n \n\n \n\n from calendar\n left join change_data\n on calendar.company_id = change_data.company_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n \n left join most_recent_data\n on calendar.company_id = most_recent_data.company_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n \n , hubspot_owner_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hubspot_owner_id is null then 0 else 1 end) over (\n partition by company_id \n order by date_day rows unbounded preceding) as hubspot_owner_id_partition\n \n , lifecyclestage\n -- create a batch/partition once a new value is provided\n , sum(case when joined.lifecyclestage is null then 0 else 1 end) over (\n partition by company_id \n order by date_day rows unbounded preceding) as lifecyclestage_partition\n \n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n company_id\n\n \n -- grab the value that started this batch/partition\n , first_value( hubspot_owner_id ) over (\n partition by company_id, hubspot_owner_id_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_owner_id\n \n -- grab the value that started this batch/partition\n , first_value( lifecyclestage ) over (\n partition by company_id, lifecyclestage_partition \n order by date_day asc rows between unbounded preceding and current row) as lifecyclestage\n \n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.company_id\n\n \n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n \n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hubspot_owner_id as TEXT ) = 'is_null' then null else fill_values.hubspot_owner_id end as hubspot_owner_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.lifecyclestage as TEXT ) = 'is_null' then null else fill_values.lifecyclestage end as lifecyclestage\n \n\n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n \n \n\n from fill_values\n\n \n left join owner\n on cast(fill_values.hubspot_owner_id as TEXT) = cast(owner.owner_id as TEXT)\n and fill_values.source_relation = owner.source_relation\n \n\n \n left join engagement_metrics\n on fill_values.company_id = engagement_metrics.company_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n \n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as company_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "sql": " __dbt__cte__int_hubspot__daily_engagement_metrics__by_company as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_companies as (\n\n select\n source_relation,\n engagement_id,\n company_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_companies.source_relation,\n engagement_companies.company_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_companies\n on all_engagements.engagement_id = engagement_companies.engagement_id\n and all_engagements.source_relation = engagement_companies.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n company_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["company_day_id"], "time_spine": null}, "model.hubspot.hubspot__daily_deal_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__daily_deal_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__daily_deal_history.sql", "original_file_path": "models/sales/history/hubspot__daily_deal_history.sql", "unique_id": "model.hubspot.hubspot__daily_deal_history", "fqn": ["hubspot", "sales", "history", "hubspot__daily_deal_history"], "alias": "hubspot__daily_deal_history", "checksum": {"name": "sha256", "checksum": "0cdfa503bca67dab93e4447c8d86bf2ffbb63edf7fed3ef017922e497cda52f2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "deal_day_id", "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}, "partition_by": {"field": "date_day", "data_type": "date"}, "file_format": "delta"}, "tags": [], "description": "Each record represents a deal's day in Hubspot with tracked properties pivoted into columns. By default, tracks the deal's pipeline, pipeline stage, amount, team, and owner on each day.\n", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "deal_day_id": {"name": "deal_day_id", "description": "Unique surrogate key hashed on `source_relation`, `date_day`, and `deal_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date on which the deal had these values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "Unique id of a deal in Hubspot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deal_closed": {"name": "is_deal_closed", "description": "Boolean indicating whether the deal's pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount": {"name": "amount", "description": "The amount of the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the deal pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the deal's stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "ID of the deal pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_id": {"name": "pipeline_stage_id", "description": "ID of the deal pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount_in_home_currency": {"name": "amount_in_home_currency", "description": "The amount of the deal in the account's home currency on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_full_name": {"name": "owner_full_name", "description": "The full name of the deal owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_email_address": {"name": "owner_email_address", "description": "The email address of the deal owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_team_name": {"name": "hubspot_team_name", "description": "The name of the Hubspot team associated with the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal owner on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_team_id": {"name": "hubspot_team_id", "description": "The ID of the Hubspot team associated with the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_notes": {"name": "count_engagement_notes", "description": "Number of notes logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_tasks": {"name": "count_engagement_tasks", "description": "Number of tasks logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_calls": {"name": "count_engagement_calls", "description": "Number of calls logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_meetings": {"name": "count_engagement_meetings", "description": "Number of meetings logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_emails": {"name": "count_engagement_emails", "description": "Number of outbound emails logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "description": "Number of inbound emails logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "description": "Number of forwarded emails logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "count_engagement_communications": {"name": "count_engagement_communications", "description": "Number of communications (LinkedIn, WhatsApp, SMS) logged against the deal on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "CondExpr(test=Call(node=Getattr(node=Name(name='hubspot', ctx='load'), attr='is_incremental_compatible', ctx='load'), args=[], kwargs=[], dyn_args=None, dyn_kwargs=None), expr1=Const(value='incremental'), expr2=Const(value='table'))", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "partition_by": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=List(items=[Const(value='spark'), Const(value='databricks')]))]), expr1=Dict(items=[Pair(key=Const(value='field'), value=Const(value='date_day')), Pair(key=Const(value='data_type'), value=Const(value='date'))]), expr2=List(items=[Const(value='date_day')]))", "unique_key": "deal_day_id", "incremental_strategy": "CondExpr(test=Compare(expr=Getattr(node=Name(name='target', ctx='load'), attr='type', ctx='load'), ops=[Operand(op='notin', expr=Tuple(items=[Const(value='snowflake'), Const(value='postgres'), Const(value='redshift')], ctx='load'))]), expr1=Const(value='insert_overwrite'), expr2=Const(value='delete+insert'))", "file_format": "delta", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.102887, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"", "raw_code": "{{\n config(\n enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']),\n materialized='incremental' if hubspot.is_incremental_compatible() else 'table',\n partition_by = {'field': 'date_day', 'data_type': 'date'}\n if target.type not in ['spark', 'databricks'] else ['date_day'],\n unique_key='deal_day_id',\n incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert',\n file_format = 'delta'\n )\n}}\n\n{%- set change_data_columns = adapter.get_columns_in_relation(ref('int_hubspot__scd_daily_deal_history')) -%}\n{% set lookback_date = hubspot.hubspot_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) if is_incremental() %}\n{% set engagements_enabled = fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled']) %}\n\nwith change_data as (\n\n select *\n from {{ ref('int_hubspot__scd_daily_deal_history') }}\n\n{% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n\n-- If no deal fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from {{ this }}\n where date_day = (\n select max(date_day)\n from {{ this }}\n where date_day <= {{ lookback_date }}\n )\n{% endif %}\n\n), calendar as (\n\n select *\n from {{ ref('int_hubspot__deal_calendar_spine') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n), pipeline as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline') }}\n\n), pipeline_stage as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage') }}\n\n{% if var('hubspot_owner_enabled', true) %}\n), owner as (\n\n select *\n from {{ ref('stg_hubspot__owner') }}\n\n{% endif %}\n\n{% if var('hubspot_team_enabled', true) %}\n), team as (\n\n select *\n from {{ ref('stg_hubspot__team') }}\n\n{% endif %}\n\n{% if engagements_enabled %}\n), engagement_metrics as (\n\n select *\n from {{ ref('int_hubspot__daily_engagement_metrics__by_deal') }}\n\n {% if is_incremental() %}\n where date_day >= {{ lookback_date }}\n {% endif %}\n\n{% endif %}\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.deal_id\n {% if is_incremental() %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n , coalesce(change_data.{{ col.name }}, most_recent_data.{{ col.name }}) as {{ col.name }}\n {% endfor %}\n\n {% else %}\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n , {{ col.name }}\n {% endfor %}\n {% endif %}\n\n from calendar\n left join change_data\n on calendar.deal_id = change_data.deal_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n {% if is_incremental() %}\n left join most_recent_data\n on calendar.deal_id = most_recent_data.deal_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n {% endif %}\n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n , {{ col.name }}\n -- create a batch/partition once a new value is provided\n , sum(case when joined.{{ col.name }} is null then 0 else 1 end) over (\n partition by deal_id {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day rows unbounded preceding) as {{ col.name }}_partition\n {% endfor %}\n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n -- grab the value that started this batch/partition\n , first_value( {{ col.name }} ) over (\n partition by deal_id, {{ col.name }}_partition {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }}\n order by date_day asc rows between unbounded preceding and current row) as {{ col.name }}\n {% endfor %}\n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.deal_id,\n pipeline_stage.is_closed as is_deal_closed,\n pipeline.pipeline_label as pipeline_label,\n pipeline_stage.pipeline_stage_label as pipeline_stage_label\n \n {% if var('hubspot_owner_enabled', true) %}\n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n {% endif %}\n\n {% if var('hubspot_team_enabled', true) %}\n , team.team_name as hubspot_team_name\n {% endif %}\n\n {% for col in change_data_columns if col.name|lower not in ['source_relation','deal_id','date_day','id'] %}\n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.{{ col.name }} as {{ dbt.type_string() }} ) = 'is_null' then null else fill_values.{{ col.name }} end as {{ col.name }}\n {% endfor %}\n\n {% if engagements_enabled %}\n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n {% if var('hubspot_engagement_communication_enabled', false) %}\n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n {% endif %}\n {% endif %}\n\n from fill_values\n\n left join pipeline\n on fill_values.deal_pipeline_id = pipeline.deal_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.pipeline_stage_id = pipeline_stage.deal_pipeline_stage_id\n and fill_values.source_relation = pipeline_stage.source_relation\n \n {% if var('hubspot_owner_enabled', true) %}\n left join owner\n on cast(fill_values.owner_id as {{ dbt.type_string() }}) = cast(owner.owner_id as {{ dbt.type_string() }})\n and fill_values.source_relation = owner.source_relation\n {% endif %}\n\n {% if var('hubspot_team_enabled', true) %}\n left join team\n on cast(fill_values.hubspot_team_id as {{ dbt.type_string() }}) = cast(team.team_id as {{ dbt.type_string() }})\n and fill_values.source_relation = team.source_relation\n {% endif %}\n\n {% if engagements_enabled %}\n left join engagement_metrics\n on fill_values.deal_id = engagement_metrics.deal_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n {% endif %}\n\n), surrogate as (\n\n select\n {{ dbt_utils.generate_surrogate_key(['date_day','deal_id','source_relation']) }} as deal_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__scd_daily_deal_history", "package": null, "version": null}, {"name": "int_hubspot__scd_daily_deal_history", "package": null, "version": null}, {"name": "int_hubspot__deal_calendar_spine", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}, {"name": "stg_hubspot__owner", "package": null, "version": null}, {"name": "stg_hubspot__team", "package": null, "version": null}, {"name": "int_hubspot__daily_engagement_metrics__by_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.is_incremental_compatible", "macro.dbt.is_incremental", "macro.dbt.type_string", "macro.dbt_utils.generate_surrogate_key", "macro.hubspot.hubspot_lookback", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.hubspot.int_hubspot__scd_daily_deal_history", "model.hubspot.int_hubspot__deal_calendar_spine", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__team", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__daily_deal_history.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_hubspot__daily_engagement_metrics__by_deal as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n), change_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__scd_daily_deal_history\"\n\n\n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n\n-- If no deal fields have been updated since the last incremental run, the pivoted_daily_history CTE will return no record/rows.\n-- When this is the case, we need to grab the most recent day's records from the previously built table so that we can persist\n-- those values into the future.\n\n), most_recent_data as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\n where date_day = (\n select max(date_day)\n from \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\n where date_day <= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n )\n\n\n), calendar as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"int_hubspot__deal_calendar_spine\"\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n), pipeline as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\n\n), pipeline_stage as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\n\n\n), owner as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\n\n\n\n\n), team as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team\"\n\n\n\n\n), engagement_metrics as (\n\n select *\n from __dbt__cte__int_hubspot__daily_engagement_metrics__by_deal\n\n \n where date_day >= \n\n\n\n \n\n \n\n cast('2026-08-10' as date) + ((interval '1 day') * (-3))\n\n\n\n\n \n\n\n\n), joined as (\n\n select\n calendar.source_relation,\n calendar.date_day,\n calendar.deal_id\n \n \n , coalesce(change_data.deal_pipeline_id, most_recent_data.deal_pipeline_id) as deal_pipeline_id\n \n , coalesce(change_data.pipeline_stage_id, most_recent_data.pipeline_stage_id) as pipeline_stage_id\n \n , coalesce(change_data.amount, most_recent_data.amount) as amount\n \n , coalesce(change_data.amount_in_home_currency, most_recent_data.amount_in_home_currency) as amount_in_home_currency\n \n , coalesce(change_data.owner_id, most_recent_data.owner_id) as owner_id\n \n , coalesce(change_data.hubspot_team_id, most_recent_data.hubspot_team_id) as hubspot_team_id\n \n\n \n\n from calendar\n left join change_data\n on calendar.deal_id = change_data.deal_id\n and calendar.date_day = change_data.date_day\n and calendar.source_relation = change_data.source_relation\n\n \n left join most_recent_data\n on calendar.deal_id = most_recent_data.deal_id\n and calendar.date_day = most_recent_data.date_day\n and calendar.source_relation = most_recent_data.source_relation\n \n\n), set_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n \n , deal_pipeline_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.deal_pipeline_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as deal_pipeline_id_partition\n \n , pipeline_stage_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.pipeline_stage_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as pipeline_stage_id_partition\n \n , amount\n -- create a batch/partition once a new value is provided\n , sum(case when joined.amount is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as amount_partition\n \n , amount_in_home_currency\n -- create a batch/partition once a new value is provided\n , sum(case when joined.amount_in_home_currency is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as amount_in_home_currency_partition\n \n , owner_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.owner_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as owner_id_partition\n \n , hubspot_team_id\n -- create a batch/partition once a new value is provided\n , sum(case when joined.hubspot_team_id is null then 0 else 1 end) over (\n partition by deal_id \n order by date_day rows unbounded preceding) as hubspot_team_id_partition\n \n\n from joined\n\n), fill_values as (\n\n select\n source_relation,\n date_day,\n deal_id\n\n \n -- grab the value that started this batch/partition\n , first_value( deal_pipeline_id ) over (\n partition by deal_id, deal_pipeline_id_partition \n order by date_day asc rows between unbounded preceding and current row) as deal_pipeline_id\n \n -- grab the value that started this batch/partition\n , first_value( pipeline_stage_id ) over (\n partition by deal_id, pipeline_stage_id_partition \n order by date_day asc rows between unbounded preceding and current row) as pipeline_stage_id\n \n -- grab the value that started this batch/partition\n , first_value( amount ) over (\n partition by deal_id, amount_partition \n order by date_day asc rows between unbounded preceding and current row) as amount\n \n -- grab the value that started this batch/partition\n , first_value( amount_in_home_currency ) over (\n partition by deal_id, amount_in_home_currency_partition \n order by date_day asc rows between unbounded preceding and current row) as amount_in_home_currency\n \n -- grab the value that started this batch/partition\n , first_value( owner_id ) over (\n partition by deal_id, owner_id_partition \n order by date_day asc rows between unbounded preceding and current row) as owner_id\n \n -- grab the value that started this batch/partition\n , first_value( hubspot_team_id ) over (\n partition by deal_id, hubspot_team_id_partition \n order by date_day asc rows between unbounded preceding and current row) as hubspot_team_id\n \n\n from set_values\n\n), fix_null_values as (\n\n select\n fill_values.source_relation,\n fill_values.date_day,\n fill_values.deal_id,\n pipeline_stage.is_closed as is_deal_closed,\n pipeline.pipeline_label as pipeline_label,\n pipeline_stage.pipeline_stage_label as pipeline_stage_label\n \n \n , owner.full_name as owner_full_name\n , owner.email_address as owner_email_address\n \n\n \n , team.team_name as hubspot_team_name\n \n\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.deal_pipeline_id as TEXT ) = 'is_null' then null else fill_values.deal_pipeline_id end as deal_pipeline_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.pipeline_stage_id as TEXT ) = 'is_null' then null else fill_values.pipeline_stage_id end as pipeline_stage_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.amount as TEXT ) = 'is_null' then null else fill_values.amount end as amount\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.amount_in_home_currency as TEXT ) = 'is_null' then null else fill_values.amount_in_home_currency end as amount_in_home_currency\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.owner_id as TEXT ) = 'is_null' then null else fill_values.owner_id end as owner_id\n \n -- we de-nulled the true null values earlier in order to differentiate them from nulls that just needed to be backfilled\n , case when cast( fill_values.hubspot_team_id as TEXT ) = 'is_null' then null else fill_values.hubspot_team_id end as hubspot_team_id\n \n\n \n , coalesce(engagement_metrics.count_engagement_notes, 0) as count_engagement_notes\n , coalesce(engagement_metrics.count_engagement_tasks, 0) as count_engagement_tasks\n , coalesce(engagement_metrics.count_engagement_calls, 0) as count_engagement_calls\n , coalesce(engagement_metrics.count_engagement_meetings, 0) as count_engagement_meetings\n , coalesce(engagement_metrics.count_engagement_emails, 0) as count_engagement_emails\n , coalesce(engagement_metrics.count_engagement_incoming_emails, 0) as count_engagement_incoming_emails\n , coalesce(engagement_metrics.count_engagement_forwarded_emails, 0) as count_engagement_forwarded_emails\n \n , coalesce(engagement_metrics.count_engagement_communications, 0) as count_engagement_communications\n \n \n\n from fill_values\n\n left join pipeline\n on fill_values.deal_pipeline_id = pipeline.deal_pipeline_id\n and fill_values.source_relation = pipeline.source_relation\n left join pipeline_stage\n on fill_values.pipeline_stage_id = pipeline_stage.deal_pipeline_stage_id\n and fill_values.source_relation = pipeline_stage.source_relation\n \n \n left join owner\n on cast(fill_values.owner_id as TEXT) = cast(owner.owner_id as TEXT)\n and fill_values.source_relation = owner.source_relation\n \n\n \n left join team\n on cast(fill_values.hubspot_team_id as TEXT) = cast(team.team_id as TEXT)\n and fill_values.source_relation = team.source_relation\n \n\n \n left join engagement_metrics\n on fill_values.deal_id = engagement_metrics.deal_id\n and fill_values.date_day = engagement_metrics.date_day\n and fill_values.source_relation = engagement_metrics.source_relation\n \n\n), surrogate as (\n\n select\n md5(cast(coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(deal_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as deal_day_id,\n *\n\n from fix_null_values\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "sql": " __dbt__cte__int_hubspot__daily_engagement_metrics__by_deal as (\n\n\n\n\n\n\n\n\n\n\n\nwith engagement_deals as (\n\n select\n source_relation,\n engagement_id,\n deal_id\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"\n\n), all_engagements as (\n\n \n \n \n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\n \n union all\n select\n source_relation,\n engagement_id,\n occurred_timestamp,\n engagement_type\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\n \n\n \n\n), joined as (\n\n select\n engagement_deals.source_relation,\n engagement_deals.deal_id,\n cast(date_trunc('day', all_engagements.occurred_timestamp) as date) as date_day,\n all_engagements.engagement_type\n from all_engagements\n join engagement_deals\n on all_engagements.engagement_id = engagement_deals.engagement_id\n and all_engagements.source_relation = engagement_deals.source_relation\n where all_engagements.occurred_timestamp is not null\n\n), aggregated as (\n\n select\n source_relation,\n deal_id,\n date_day,\n count(case when engagement_type = 'NOTE' then 1 end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then 1 end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then 1 end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then 1 end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then 1 end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then 1 end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then 1 end) as count_engagement_forwarded_emails,\n count(case when engagement_type = 'COMMUNICATION' then 1 end) as count_engagement_communications\n from joined\n group by 1, 2, 3\n\n)\n\nselect *\nfrom aggregated\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["deal_day_id"], "time_spine": null}, "model.hubspot.hubspot__company_history": {"database": "postgres", "schema": "public_hubspot", "name": "hubspot__company_history", "resource_type": "model", "package_name": "hubspot", "path": "sales/history/hubspot__company_history.sql", "original_file_path": "models/sales/history/hubspot__company_history.sql", "unique_id": "model.hubspot.hubspot__company_history", "fqn": ["hubspot", "sales", "history", "hubspot__company_history"], "alias": "hubspot__company_history", "checksum": {"name": "sha256", "checksum": "ea0904e41c60d530145fd51c6691675ae221e252e035226e46229c5b3d767608"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to company record in Hubspot; the grain of this model is company_id -> field_name -> valid_to.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "valid_from": {"name": "valid_from", "description": "The timestamp the change was valid from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "valid_to": {"name": "valid_to", "description": "The timestamp the change was valid to. Null if still valid.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "id": {"name": "id", "description": "The ID of the change. Hashed on `source_relation`, `field_name`, `company_id`, and `valid_from`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/sales/history/history.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1056604, "relation_name": "\"postgres\".\"public_hubspot\".\"hubspot__company_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled','hubspot_company_property_history_enabled'])) }}\n\nwith history as (\n\n select *\n from {{ ref('stg_hubspot__company_property_history') }}\n\n), windows as (\n\n select\n source_relation,\n company_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by company_id, field_name {{ fivetran_utils.partition_by_source_relation(package_name='hubspot') }} order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select\n windows.*,\n {{ dbt_utils.generate_surrogate_key(['field_name','company_id','valid_from','source_relation']) }} as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_property_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.hubspot.stg_hubspot__company_property_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/hubspot__company_history.sql", "compiled": true, "compiled_code": "\n\nwith history as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history\"\n\n), windows as (\n\n select\n source_relation,\n company_id,\n field_name,\n change_source,\n change_source_id,\n change_timestamp as valid_from,\n new_value,\n lead(change_timestamp) over (partition by company_id, field_name order by change_timestamp) as valid_to\n from history\n\n), surrogate as (\n\n select\n windows.*,\n md5(cast(coalesce(cast(field_name as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(company_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(valid_from as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as id\n from windows\n\n)\n\nselect *\nfrom surrogate", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["id"], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_pipeline.sql", "original_file_path": "models/staging/stg_hubspot__ticket_pipeline.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_pipeline"], "alias": "stg_hubspot__ticket_pipeline", "checksum": {"name": "sha256", "checksum": "985df2ffeedd5a02236306fcdffe12d4faf2587a47908176561b05619800f99a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket pipeline.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_ticket_pipeline_deleted": {"name": "is_ticket_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "Reference to the object type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "Reference to the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_created_at": {"name": "ticket_pipeline_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_updated_at": {"name": "ticket_pipeline_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7890987, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_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_hubspot__ticket_pipeline_tmp')),\n staging_columns=get_ticket_pipeline_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(pipeline_id as {{ dbt.type_string() }}) as ticket_pipeline_id,\n _fivetran_deleted as is_ticket_pipeline_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n object_type_id,\n created_at as ticket_pipeline_created_at,\n updated_at as ticket_pipeline_updated_at\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_pipeline_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_pipeline_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__ticket_pipeline_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_pipeline.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n display_order as display_order,\n label as label,\n object_type_id as object_type_id,\n pipeline_id as pipeline_id,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(pipeline_id as TEXT) as ticket_pipeline_id,\n _fivetran_deleted as is_ticket_pipeline_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n object_type_id,\n created_at as ticket_pipeline_created_at,\n updated_at as ticket_pipeline_updated_at\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__owner.sql", "original_file_path": "models/staging/stg_hubspot__owner.sql", "unique_id": "model.hubspot.stg_hubspot__owner", "fqn": ["hubspot", "staging", "stg_hubspot__owner"], "alias": "stg_hubspot__owner", "checksum": {"name": "sha256", "checksum": "c088422e9dc69517a97a618f70371a51a209061a57b7e656b6b832b5a7abd03e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an owner/user in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "owner_id": {"name": "owner_id", "description": "The ID of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active_user_id": {"name": "active_user_id", "description": "ID of the active user account associated with the owner. Null if owner is not an active user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp for when the owner was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_address": {"name": "email_address", "description": "The email address of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "full_name": {"name": "full_name", "description": "Full name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "owner_type": {"name": "owner_type", "description": "The type of owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp for when the owner was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__owner.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_owner_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.836194, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"", "raw_code": "{{ config(enabled=var('hubspot_owner_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__owner_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__owner_tmp')),\n staging_columns=get_owner_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n owner_id,\n active_user_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n email as email_address,\n first_name,\n last_name,\n portal_id,\n type as owner_type,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_timestamp,\n trim( {{ dbt.concat(['first_name', \"' '\", 'last_name']) }} ) as full_name\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner_tmp", "package": null, "version": null}, {"name": "stg_hubspot__owner_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_owner_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.concat"], "nodes": ["model.hubspot.stg_hubspot__owner_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__owner.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n active_user_id as active_user_id,\n created_at as created_at,\n email as email,\n first_name as first_name,\n last_name as last_name,\n owner_id as owner_id,\n portal_id as portal_id,\n type as type,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n owner_id,\n active_user_id,\n cast(created_at as timestamp) as created_timestamp,\n email as email_address,\n first_name,\n last_name,\n portal_id,\n type as owner_type,\n cast(updated_at as timestamp) as updated_timestamp,\n trim( first_name || ' ' || last_name ) as full_name\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_communication": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_communication.sql", "original_file_path": "models/staging/stg_hubspot__engagement_communication.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_communication", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_communication"], "alias": "stg_hubspot__engagement_communication", "checksum": {"name": "sha256", "checksum": "77a4704116845625234bc68ceb5ac6e881707e3ed960194a2ad8529b1ba08cd1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a communication and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "engagement_id": {"name": "engagement_id", "description": "ID of the engagement associated with the communication.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2164083, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"", "raw_code": "{{ config(enabled=var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_communication_tmp') }}\n\n), macro as (\n\n select \n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_communication_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_communication_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_communication_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_communication_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_communication_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_engagement_communication_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_communication_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_communication.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication_tmp\"\n\n), macro as (\n\n select \n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n engagement_id as engagement_id,\n type as engagement_type,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n cast(null as integer) as owner_id,\n cast(null as integer) as team_id\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_dropped": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_dropped.sql", "original_file_path": "models/staging/stg_hubspot__email_event_dropped.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_dropped", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_dropped"], "alias": "stg_hubspot__email_event_dropped", "checksum": {"name": "sha256", "checksum": "b0a8635b4b62a78829eccd6193beb24eed13e289efc570f4c4544729a768f942"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DROPPED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_message": {"name": "drop_message", "description": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_reason": {"name": "drop_reason", "description": "The reason why the email message was dropped. See below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_dropped_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1483438, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_dropped_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_dropped_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_dropped_tmp')),\n staging_columns=get_email_event_dropped_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n drop_message,\n drop_reason,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_dropped_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_dropped_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_dropped_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_dropped_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_dropped_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_dropped.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n bcc as bcc,\n cc as cc,\n drop_message as drop_message,\n drop_reason as drop_reason,\n id as id,\n reply_to as reply_to,\n subject as subject,\n \n \"from\" as from_email\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n drop_message,\n drop_reason,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_dropped_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_company.sql", "original_file_path": "models/staging/stg_hubspot__engagement_company.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_company", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_company"], "alias": "stg_hubspot__engagement_company", "checksum": {"name": "sha256", "checksum": "d61ff68e4e26d51ad63f67488a3de32bca04ebfd08df73e38de2aaaad95437cd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a company and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2176077, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_company_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_company_tmp') }}\n\n), macro as (\n\n select \n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_company_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_company_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_company_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_company_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company_tmp\"\n\n), macro as (\n\n select \n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n company_id as company_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n \n \n\n \n \n , \"engagement_type\"\n , \"type_id\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_click": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_click.sql", "original_file_path": "models/staging/stg_hubspot__email_event_click.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_click", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_click"], "alias": "stg_hubspot__email_event_click", "checksum": {"name": "sha256", "checksum": "2e7c2223e61c84871af323ce9401701cb237c9affdb8db16c9e3fe402a71e94d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CLICK email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "click_url": {"name": "click_url", "description": "The URL within the message that the recipient clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "referer_url": {"name": "referer_url", "description": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_click_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1455972, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_click_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_click_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_click_tmp')),\n staging_columns=get_email_event_click_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n referer as referer_url,\n url as click_url,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_click_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_click_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_click_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_click_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_click.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n id as id,\n ip_address as ip_address,\n location as location,\n referer as referer,\n url as url,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n referer as referer_url,\n url as click_url,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_delivered": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_delivered.sql", "original_file_path": "models/staging/stg_hubspot__email_event_delivered.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_delivered", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_delivered"], "alias": "stg_hubspot__email_event_delivered", "checksum": {"name": "sha256", "checksum": "ec08b5a3a6db2b244ea6fbfaa4ddcdb944b4f4b755b19082ce67169d15333e47"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DELIVERED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "smtp_id": {"name": "smtp_id", "description": "An ID attached to the message by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_delivered_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1472178, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_delivered_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_delivered_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_delivered_tmp')),\n staging_columns=get_email_event_delivered_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as event_id,\n response as returned_response,\n smtp_id\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_delivered_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_delivered_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_delivered_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_delivered_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_delivered.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n response as response,\n smtp_id as smtp_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as event_id,\n response as returned_response,\n smtp_id\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__merged_deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__merged_deal.sql", "original_file_path": "models/staging/stg_hubspot__merged_deal.sql", "unique_id": "model.hubspot.stg_hubspot__merged_deal", "fqn": ["hubspot", "staging", "stg_hubspot__merged_deal"], "alias": "stg_hubspot__merged_deal", "checksum": {"name": "sha256", "checksum": "802fd9a3593572cde1b70000654b30b224d0db8d8ab950a5028cc8fa093bd0ef"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal that has been merged along with the related deal it's been merged into.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "merged_deal_id": {"name": "merged_deal_id", "description": "ID of deal that has been merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal the record has been merged INTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8050287, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_hubspot__merged_deal_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__merged_deal_tmp')),\n staging_columns=get_merged_deal_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n \n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n deal_id,\n merged_deal_id\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__merged_deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__merged_deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_merged_deal_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__merged_deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__merged_deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n deal_id as deal_id,\n merged_deal_id as merged_deal_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n \n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n deal_id,\n merged_deal_id\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__users": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__users", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__users.sql", "original_file_path": "models/staging/stg_hubspot__users.sql", "unique_id": "model.hubspot.stg_hubspot__users", "fqn": ["hubspot", "staging", "stg_hubspot__users"], "alias": "stg_hubspot__users", "checksum": {"name": "sha256", "checksum": "fafc0dad48f3b9cf46b64782015bb2b6ab4dac633dd815ef6c9e98d9dc3b46ff"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing information about HubSpot users.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "user_id": {"name": "user_id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "primary_team_id": {"name": "primary_team_id", "description": "ID of the user's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "role_id": {"name": "role_id", "description": "ID of the role assigned to the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "First name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "Last name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8250237, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__users\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__users_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__users_tmp')),\n staging_columns=get_users_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n id as user_id,\n primary_team_id,\n role_id,\n email,\n first_name,\n last_name,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__users_tmp", "package": null, "version": null}, {"name": "stg_hubspot__users_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_users_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__users_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__users.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__users_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as id,\n primary_team_id as primary_team_id,\n role_id as role_id,\n email as email,\n first_name as first_name,\n last_name as last_name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as user_id,\n primary_team_id,\n role_id,\n email,\n first_name,\n last_name,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_property_history.sql", "original_file_path": "models/staging/stg_hubspot__ticket_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_property_history"], "alias": "stg_hubspot__ticket_property_history", "checksum": {"name": "sha256", "checksum": "f1f3edc0158c77f15d7ca1bf45ef243f40bf5472ffb4efdaf7ec68d1b1cc0a2b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to ticket record in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.784453, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_property_history_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_property_history_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_property_history_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_property_history_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_property_history_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n ticket_id as ticket_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n timestamp_instant as change_timestamp,\n value as new_value\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_contact.sql", "original_file_path": "models/staging/stg_hubspot__ticket_contact.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_contact", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_contact"], "alias": "stg_hubspot__ticket_contact", "checksum": {"name": "sha256", "checksum": "cfbd6d8d4faac35687de4617a29f6e8fd55317664869da22093e75fd2de7970d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and a contact.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7816997, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_contact_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_contact_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_contact_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_contact_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_contact_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n contact_id as contact_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__role": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__role", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__role.sql", "original_file_path": "models/staging/stg_hubspot__role.sql", "unique_id": "model.hubspot.stg_hubspot__role", "fqn": ["hubspot", "staging", "stg_hubspot__role"], "alias": "stg_hubspot__role", "checksum": {"name": "sha256", "checksum": "2cafaac60a557b2411f76e348c018f76a99502c1343425dd72413c767c4a8a5b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing role information for HubSpot users.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "role_id": {"name": "role_id", "description": "Unique ID of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "role_name": {"name": "role_name", "description": "Name of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requires_billing_write": {"name": "requires_billing_write", "description": "Indicates whether the role requires billing write access.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8218806, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__role\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__role_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__role_tmp')),\n staging_columns=get_role_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n id as role_id,\n name as role_name,\n requires_billing_write,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__role_tmp", "package": null, "version": null}, {"name": "stg_hubspot__role_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_role_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__role_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__role.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__role_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as id,\n name as name,\n requires_billing_write as requires_billing_write\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as role_id,\n name as role_name,\n requires_billing_write,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_property_history.sql", "original_file_path": "models/staging/stg_hubspot__deal_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__deal_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__deal_property_history"], "alias": "stg_hubspot__deal_property_history", "checksum": {"name": "sha256", "checksum": "b3cb2b2e833cfcb1c8d8b97b8d2ae7049010a931937db32b999225ea19cc3a5f"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents the details of your deal properties.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the deal property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8042264, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_property_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_property_history_tmp')),\n staging_columns=get_deal_property_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n deal_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as {{ dbt.type_timestamp() }}) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_deal_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_property_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n deal_id as deal_id,\n name as name,\n source as source,\n source_id as source_id,\n timestamp as change_timestamp,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n deal_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as timestamp) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_deal_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company_list.sql", "original_file_path": "models/staging/stg_hubspot__company_list.sql", "unique_id": "model.hubspot.stg_hubspot__company_list", "fqn": ["hubspot", "staging", "stg_hubspot__company_list"], "alias": "stg_hubspot__company_list", "checksum": {"name": "sha256", "checksum": "da61590003830d5b6362c4d3430149a827401637dd57a93a202adbc118b401dc"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company list in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_list_id": {"name": "company_list_id", "description": "The ID of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_name": {"name": "company_list_name", "description": "The name of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_company_list_deleted": {"name": "is_company_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2456832, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_list_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_tmp')),\n staging_columns=get_company_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_tmp')),\n staging_columns=get_company_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__company_list_tmp',get_company_list_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_company_list_columns()) %}\n {{\n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_tmp')),\n prefix='property_', exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n company_list_id,\n company_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_company_list_deleted,\n cast(updated_timestamp as {{ dbt.type_timestamp() }}) as updated_timestamp,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(created_timestamp as {{ dbt.type_timestamp() }}) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__company_list_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__company_list_pass_through_columns') }}\n\n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__company_list_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_list_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_list_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__company_list_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company_list.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as is_company_list_deleted,\n _fivetran_synced as _fivetran_synced,\n created_at as created_timestamp,\n id as company_list_id,\n name as company_list_name,\n updated_at as updated_timestamp,\n created_by_id as created_by_id,\n filters_updated_at as filters_updated_at,\n list_version as list_version,\n object_type_id as object_type_id,\n processing_status as processing_status,\n processing_type as processing_type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n company_list_id,\n company_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_company_list_deleted,\n cast(updated_timestamp as timestamp) as updated_timestamp,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(created_timestamp as timestamp) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__company_list_pass_through_columns variable into the staging model\n \n\n\n\n\n\n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__team.sql", "original_file_path": "models/staging/stg_hubspot__team.sql", "unique_id": "model.hubspot.stg_hubspot__team", "fqn": ["hubspot", "staging", "stg_hubspot__team"], "alias": "stg_hubspot__team", "checksum": {"name": "sha256", "checksum": "68500ef68ac05d5e84e03646a9a1d902759afd66cc020db81098a46da27a9099"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing HubSpot team details.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "team_id": {"name": "team_id", "description": "Unique ID of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_name": {"name": "team_name", "description": "Name of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8230515, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__team_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__team_tmp')),\n staging_columns=get_team_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n id as team_id,\n name as team_name,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__team_tmp", "package": null, "version": null}, {"name": "stg_hubspot__team_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_team_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__team_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as id,\n name as name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as team_id,\n name as team_name,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property_option": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property_option", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__property_option.sql", "original_file_path": "models/staging/stg_hubspot__property_option.sql", "unique_id": "model.hubspot.stg_hubspot__property_option", "fqn": ["hubspot", "staging", "stg_hubspot__property_option"], "alias": "stg_hubspot__property_option", "checksum": {"name": "sha256", "checksum": "408f91b58a765e41b01242b6c620ab39b4093e72085d358bd5de358ce23fc6c3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an option for the related property.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "property_option_label": {"name": "property_option_label", "description": "The label of the option displayed inside the HubSpot app. Part of the composite primary key with `hubspot_object` and `property_option_name`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_id": {"name": "property_id", "description": "(DEPRECATED IN OCTOBER 2025) The ID of the related property. Use `hubspot_object` to join with the `PROPERTY` table instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Order of options displayed in Hubspot, starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hidden": {"name": "hidden", "description": "Boolean if the option will be displayed in HubSpot", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_option_value": {"name": "property_option_value", "description": "The internal value of the option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this option's property is related to other objects, the object will be listed here. Part of the primary key with `property_option_name` and `property_option_label`. Use `hubspot_object` to join with the `PROPERTY` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_option_name": {"name": "property_option_name", "description": "The internal name of the property option. Part of the primary key with `hubspot_object` and `property_option_label`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__property.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.796663, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property_option\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__property_option_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__property_option_tmp')),\n staging_columns=get_property_option_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n label as property_option_label,\n property_id,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n name as property_option_name,\n _fivetran_synced,\n display_order,\n hidden,\n value as property_option_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__property_option_tmp", "package": null, "version": null}, {"name": "stg_hubspot__property_option_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_property_option_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__property_option_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__property_option.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__property_option_tmp\"\n\n), macro as (\n\n select\n \n label as label,\n property_id as property_id,\n _fivetran_synced as _fivetran_synced,\n display_order as display_order,\n hidden as hidden,\n value as value,\n hubspot_object as hubspot_object,\n name as name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n label as property_option_label,\n property_id,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n name as property_option_name,\n _fivetran_synced,\n display_order,\n hidden,\n value as property_option_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_contact.sql", "original_file_path": "models/staging/stg_hubspot__deal_contact.sql", "unique_id": "model.hubspot.stg_hubspot__deal_contact", "fqn": ["hubspot", "staging", "stg_hubspot__deal_contact"], "alias": "stg_hubspot__deal_contact", "checksum": {"name": "sha256", "checksum": "fcc71b5d346daac85c2a885974fc0c0ef35ff9f89031c0ec15ac10cef92d1f58"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a deal and contact.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8031175, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_contact\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_contact_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_contact_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_contact_tmp')),\n staging_columns=get_deal_contact_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n contact_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_contact_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_contact_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n deal_id as deal_id,\n contact_id as contact_id,\n type_id as type_id,\n category as category\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n contact_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company.sql", "original_file_path": "models/staging/stg_hubspot__company.sql", "unique_id": "model.hubspot.stg_hubspot__company", "fqn": ["hubspot", "staging", "stg_hubspot__company"], "alias": "stg_hubspot__company", "checksum": {"name": "sha256", "checksum": "f05b02466adb98103af01cc197f92ffd1ba68c0bf32e9035cdc406487a376ebd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a company in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_company_deleted": {"name": "is_company_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_name": {"name": "company_name", "description": "The name of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A short statement about the company's mission and goals.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the company was added to your account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "industry": {"name": "industry", "description": "The type of business the company performs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "street_address": {"name": "street_address", "description": "The street address of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "street_address_2": {"name": "street_address_2", "description": "Additional address information for the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "city": {"name": "city", "description": "The city where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "state": {"name": "state", "description": "The state where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_annual_revenue": {"name": "company_annual_revenue", "description": "The actual or estimated annual revenue of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2515855, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')),\n staging_columns=get_company_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')),\n staging_columns=get_company_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__company_tmp',get_company_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_company_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')), \n prefix='property_', exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_company_columns.sql macro\n source_relation,\n company_id,\n coalesce(is_company_deleted, _fivetran_deleted) as is_company_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n company_name,\n description,\n created_date,\n industry,\n street_address,\n street_address_2,\n city,\n state,\n country,\n company_annual_revenue\n \n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__company_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__company_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__company_calculated_fields') }}\n \n from macro\n\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__company_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n id as company_id,\n is_deleted as is_company_deleted,\n property_name as company_name,\n property_description as description,\n property_createdate as created_date,\n property_industry as industry,\n property_address as street_address,\n property_address_2 as street_address_2,\n property_city as city,\n property_state as state,\n property_country as country,\n property_annualrevenue as company_annual_revenue\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_company_columns.sql macro\n source_relation,\n company_id,\n coalesce(is_company_deleted, _fivetran_deleted) as is_company_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n company_name,\n description,\n created_date,\n industry,\n street_address,\n street_address_2,\n city,\n state,\n country,\n company_annual_revenue\n \n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__company_calculated_fields variable.\n \n\n\n \n from macro\n\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket.sql", "original_file_path": "models/staging/stg_hubspot__ticket.sql", "unique_id": "model.hubspot.stg_hubspot__ticket", "fqn": ["hubspot", "staging", "stg_hubspot__ticket"], "alias": "stg_hubspot__ticket", "checksum": {"name": "sha256", "checksum": "1e991cb1e92b5bc6d5a62611a6c0237e7c251ff36d0536a6bfb76145b83eedca"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "ID of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_ticket_deleted": {"name": "is_ticket_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "closed_date": {"name": "closed_date", "description": "The date the ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_agent_reply_at": {"name": "first_agent_reply_at", "description": "the date for the first agent reply on the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "The ID of the ticket's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_id": {"name": "ticket_pipeline_stage_id", "description": "The ID of the ticket's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_priority": {"name": "ticket_priority", "description": "The priority of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_category": {"name": "ticket_category", "description": "The category of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_subject": {"name": "ticket_subject", "description": "Short summary of ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_content": {"name": "ticket_content", "description": "Text in body of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7856698, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__ticket_tmp')),\n staging_columns=get_ticket_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__ticket_tmp')),\n staging_columns=get_ticket_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__ticket_tmp',get_ticket_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__ticket_tmp')), \n prefix='property_', exclude=exclude_cols) \n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_ticket_columns.sql macro\n source_relation,\n ticket_id,\n coalesce(_fivetran_ticket_deleted, is_ticket_deleted) as is_ticket_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(closed_date as {{ dbt.type_timestamp() }}) as closed_date,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n first_agent_reply_at,\n cast(ticket_pipeline_id as {{ dbt.type_string() }}) as ticket_pipeline_id,\n cast(ticket_pipeline_stage_id as {{ dbt.type_string() }}) as ticket_pipeline_stage_id,\n ticket_category,\n ticket_priority,\n owner_id,\n ticket_subject,\n ticket_content\n\n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__ticket_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__ticket_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__ticket_calculated_fields') }}\n \n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__ticket_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__ticket_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as ticket_id,\n cast(null as boolean) as _fivetran_ticket_deleted,\n is_deleted as is_ticket_deleted,\n property_closed_date as closed_date,\n property_createdate as created_date,\n property_first_agent_reply_date as first_agent_reply_at,\n property_hs_pipeline as ticket_pipeline_id,\n property_hs_pipeline_stage as ticket_pipeline_stage_id,\n property_hs_ticket_category as ticket_category,\n property_hs_ticket_priority as ticket_priority,\n property_hubspot_owner_id as owner_id,\n property_subject as ticket_subject,\n property_content as ticket_content\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_ticket_columns.sql macro\n source_relation,\n ticket_id,\n coalesce(_fivetran_ticket_deleted, is_ticket_deleted) as is_ticket_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(closed_date as timestamp) as closed_date,\n cast(created_date as timestamp) as created_date,\n first_agent_reply_at,\n cast(ticket_pipeline_id as TEXT) as ticket_pipeline_id,\n cast(ticket_pipeline_stage_id as TEXT) as ticket_pipeline_stage_id,\n ticket_category,\n ticket_priority,\n owner_id,\n ticket_subject,\n ticket_content\n\n --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__ticket_calculated_fields variable.\n \n\n\n \n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_list.sql", "original_file_path": "models/staging/stg_hubspot__contact_list.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list", "fqn": ["hubspot", "staging", "stg_hubspot__contact_list"], "alias": "stg_hubspot__contact_list", "checksum": {"name": "sha256", "checksum": "c6b22460d519ca6bff3a8fbf2a86009fe2c8da9a208987c95c8b2b6a4615c3f1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact list in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_list_deleted": {"name": "is_contact_list_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_name": {"name": "contact_list_name", "description": "The name of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.200636, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_list_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_tmp')),\n staging_columns=get_contact_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_tmp')),\n staging_columns=get_contact_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__contact_list_tmp',get_contact_list_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_contact_list_columns()) %}\n {{\n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_tmp')),\n prefix='property_', exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n contact_list_id,\n contact_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_contact_list_deleted,\n cast(updated_timestamp as {{ dbt.type_timestamp() }}) as updated_timestamp,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(created_timestamp as {{ dbt.type_timestamp() }}) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__contact_list_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__contact_list_pass_through_columns') }}\n\n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__contact_list_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_list_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_list_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__contact_list_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_list.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as is_contact_list_deleted,\n _fivetran_synced as _fivetran_synced,\n created_at as created_timestamp,\n id as contact_list_id,\n name as contact_list_name,\n updated_at as updated_timestamp,\n created_by_id as created_by_id,\n filters_updated_at as filters_updated_at,\n list_version as list_version,\n object_type_id as object_type_id,\n processing_status as processing_status,\n processing_type as processing_type,\n cast(null as boolean) as deleteable,\n cast(null as boolean) as dynamic,\n cast(null as integer) as portal_id,\n cast(null as TEXT) as metadata_error,\n cast(null as timestamp) as metadata_last_processing_state_change_at,\n cast(null as timestamp) as metadata_last_size_change_at,\n cast(null as TEXT) as metadata_processing,\n cast(null as integer) as metadata_size\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n source_relation,\n contact_list_id,\n contact_list_name,\n created_by_id,\n object_type_id,\n processing_status,\n processing_type,\n list_version,\n filters_updated_at,\n is_contact_list_deleted,\n cast(updated_timestamp as timestamp) as updated_timestamp,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(created_timestamp as timestamp) as created_timestamp\n\n --The below macro adds the fields defined within your hubspot__contact_list_pass_through_columns variable into the staging model\n \n\n\n\n\n\n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_spam_report": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_spam_report.sql", "original_file_path": "models/staging/stg_hubspot__email_event_spam_report.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_spam_report"], "alias": "stg_hubspot__email_event_spam_report", "checksum": {"name": "sha256", "checksum": "3d014034096442b201bfda55682dc3d8f2f9423aa687fe6d3b09da777142b225"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SPAM_REPORT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_spam_report_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1528804, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_spam_report_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_spam_report_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_spam_report_tmp')),\n staging_columns=get_email_event_spam_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as event_id,\n ip_address,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_spam_report_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_spam_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_spam_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_spam_report_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_spam_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n ip_address as ip_address,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as event_id,\n ip_address,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_meeting": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_meeting.sql", "original_file_path": "models/staging/stg_hubspot__engagement_meeting.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_meeting", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_meeting"], "alias": "stg_hubspot__engagement_meeting", "checksum": {"name": "sha256", "checksum": "f5e29b639b861a01fe7ab64ac1b36f89356510cbe8b33b26ba269001a5d3806d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a MEETING engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the meeting's time of creation and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the meeting's time of occurrence and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the meeting. This field determines the user listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the meeting. This field determines the team listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_meeting_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2211156, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_meeting_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_meeting_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_meeting_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_meeting_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_meeting_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_meeting_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_meeting_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_meeting_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_meeting_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_meeting.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n cast(null as TEXT) as engagement_type,\n engagement_id as engagement_id,\n cast(null as timestamp) as created_timestamp,\n cast(null as timestamp) as occurred_timestamp,\n cast(null as integer) as owner_id,\n cast(null as integer) as team_id\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n , \"created_from_link_id\"\n , \"end_time\"\n , \"pre_meeting_prospect_reminders\"\n , \"source\"\n , \"source_id\"\n , \"start_time\"\n , \"web_conference_meeting_id\"\n , \"meeting_outcome\"\n , \"body\"\n , \"external_url\"\n , \"title\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_form_submission": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_form_submission.sql", "original_file_path": "models/staging/stg_hubspot__contact_form_submission.sql", "unique_id": "model.hubspot.stg_hubspot__contact_form_submission", "fqn": ["hubspot", "staging", "stg_hubspot__contact_form_submission"], "alias": "stg_hubspot__contact_form_submission", "checksum": {"name": "sha256", "checksum": "c9199d6b943e94e22cc3d2d9804c030f98ddce33e2e3beb361672182e8a9a7df"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table containing contact form submission information.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "conversion_id": {"name": "conversion_id", "description": "A Unique ID for the specific form conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The GUID of the form that the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_id": {"name": "page_id", "description": "The ID of the related page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL that the form was submitted on, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "A Unix timestamp in milliseconds of the time the submission occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "title": {"name": "title", "description": "The title of the page that the form was submitted on. This will default to the name of the form if no title is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1978354, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_form_submission_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_form_submission_tmp')),\n staging_columns=get_contact_form_submission_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(timestamp as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n form_id,\n contact_id,\n conversion_id,\n page_id,\n page_url,\n portal_id,\n title,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_form_submission_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_form_submission_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_form_submission_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_form_submission_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_form_submission.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n timestamp as timestamp,\n form_id as form_id,\n contact_id as contact_id,\n conversion_id as conversion_id,\n page_id as page_id,\n page_url as page_url,\n portal_id as portal_id,\n title as title\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(timestamp as timestamp) as occurred_timestamp,\n form_id,\n contact_id,\n conversion_id,\n page_id,\n page_url,\n portal_id,\n title,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_stage": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_stage.sql", "original_file_path": "models/staging/stg_hubspot__deal_stage.sql", "unique_id": "model.hubspot.stg_hubspot__deal_stage", "fqn": ["hubspot", "staging", "stg_hubspot__deal_stage"], "alias": "stg_hubspot__deal_stage", "checksum": {"name": "sha256", "checksum": "fd5ee4f05ea44437be92ed99e4277b791a68c394db013b65e5e771d04ace1e69"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal stage.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "date_entered": {"name": "date_entered", "description": "The timestamp the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "Reference to the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The relevant source of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_id": {"name": "source_id", "description": "Reference to the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_stage_name": {"name": "deal_stage_name", "description": "The value of the deal stage. Typically the name of the stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8015122, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_hubspot__deal_stage_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_hubspot__deal_stage_tmp')),\n staging_columns=get_deal_stage_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(date_entered as {{ dbt.type_timestamp() }}) as date_entered,\n deal_id,\n source,\n source_id,\n value as deal_stage_name,\n _fivetran_active,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_stage_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_stage_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_stage_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_stage_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_stage.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_active as _fivetran_active,\n _fivetran_end as _fivetran_end,\n _fivetran_start as _fivetran_start,\n _fivetran_synced as _fivetran_synced,\n date_entered as date_entered,\n deal_id as deal_id,\n source as source,\n source_id as source_id,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(date_entered as timestamp) as date_entered,\n deal_id,\n source,\n source_id,\n value as deal_stage_name,\n _fivetran_active,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n cast(_fivetran_start as timestamp) as _fivetran_start\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event.sql", "original_file_path": "models/staging/stg_hubspot__email_event.sql", "unique_id": "model.hubspot.stg_hubspot__email_event", "fqn": ["hubspot", "staging", "stg_hubspot__email_event"], "alias": "stg_hubspot__email_event", "checksum": {"name": "sha256", "checksum": "38132b1d66ef4d903ec73d74e1a2b151a2d4bd9edc5270ba54b5628780ea31a1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an email event in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The ID of the app that sent the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_by_event_id": {"name": "caused_by_event_id", "description": "The event ID which uniquely identifies the event which directly caused this event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_timestamp": {"name": "caused_timestamp", "description": "The timestamp of the event that caused this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_filtered_event": {"name": "is_filtered_event", "description": "A boolean representing whether the event has been filtered out of reporting based on customer reports settings or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_by_event_id": {"name": "obsoleted_by_event_id", "description": "The event ID which uniquely identifies the follow-on event which makes this current event obsolete. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_timestamp": {"name": "obsoleted_timestamp", "description": "The timestamp of the event that made the current event obsolete.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "recipient_email_address": {"name": "recipient_email_address", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_by_event_id": {"name": "sent_by_event_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_timestamp": {"name": "sent_timestamp", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1574116, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_tmp')),\n staging_columns=get_email_event_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n app_id,\n cast(caused_by_created as {{ dbt.type_timestamp() }}) as caused_timestamp,\n caused_by_id as caused_by_event_id,\n cast(created as {{ dbt.type_timestamp() }}) as created_timestamp,\n email_campaign_id,\n filtered_event as is_filtered_event,\n id as event_id,\n cast(obsoleted_by_created as {{ dbt.type_timestamp() }}) as obsoleted_timestamp,\n obsoleted_by_id as obsoleted_by_event_id,\n portal_id,\n recipient as recipient_email_address,\n cast(sent_by_created as {{ dbt.type_timestamp() }}) as sent_timestamp,\n sent_by_id as sent_by_event_id,\n type as event_type\n from macro\n \n)\n\nselect *\nfrom fields\n{% if not var('hubspot_using_all_email_events',true) -%}\nwhere not coalesce(is_filtered_event, false)\n{%- endif -%}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n app_id as app_id,\n caused_by_created as caused_by_created,\n caused_by_id as caused_by_id,\n created as created,\n email_campaign_id as email_campaign_id,\n filtered_event as filtered_event,\n id as id,\n obsoleted_by_created as obsoleted_by_created,\n obsoleted_by_id as obsoleted_by_id,\n portal_id as portal_id,\n recipient as recipient,\n sent_by_created as sent_by_created,\n sent_by_id as sent_by_id,\n type as type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n app_id,\n cast(caused_by_created as timestamp) as caused_timestamp,\n caused_by_id as caused_by_event_id,\n cast(created as timestamp) as created_timestamp,\n email_campaign_id,\n filtered_event as is_filtered_event,\n id as event_id,\n cast(obsoleted_by_created as timestamp) as obsoleted_timestamp,\n obsoleted_by_id as obsoleted_by_event_id,\n portal_id,\n recipient as recipient_email_address,\n cast(sent_by_created as timestamp) as sent_timestamp,\n sent_by_id as sent_by_event_id,\n type as event_type\n from macro\n \n)\n\nselect *\nfrom fields\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_channel.sql", "original_file_path": "models/staging/stg_hubspot__conversation_channel.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_channel"], "alias": "stg_hubspot__conversation_channel", "checksum": {"name": "sha256", "checksum": "c7d8bd1799731623daff656e60c0d15573036fb29b9a2e01c90046d63242dcb7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a channel through which users can contact your team, such as email, Chat, Facebook Messenger, or WhatsApp.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_id": {"name": "channel_id", "description": "Unique ID of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.752862, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_channel_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_channel_tmp')),\n staging_columns=get_conversation_channel_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_id,\n name\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_channel_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_channel.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n name as name\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_id,\n name\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_deal.sql", "original_file_path": "models/staging/stg_hubspot__engagement_deal.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_deal", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_deal"], "alias": "stg_hubspot__engagement_deal", "checksum": {"name": "sha256", "checksum": "401a567d0bdf6143147cbc21950b9dcd59a7d298cd799935ea36fe3acdbe217a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a deal and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2191467, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_deal_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_deal_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_deal_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_deal_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_deal_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n deal_id as deal_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n \n \n\n \n \n , \"engagement_type\"\n , \"type_id\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list_member": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company_list_member.sql", "original_file_path": "models/staging/stg_hubspot__company_list_member.sql", "unique_id": "model.hubspot.stg_hubspot__company_list_member", "fqn": ["hubspot", "staging", "stg_hubspot__company_list_member"], "alias": "stg_hubspot__company_list_member", "checksum": {"name": "sha256", "checksum": "47622c5716b396584adccc9af57ec3b6b69afcb0b7762c99c551433413bc5d89"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a company and a company list.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_company_list_member_deleted": {"name": "is_company_list_member_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "added_timestamp": {"name": "added_timestamp", "description": "The timestamp a company was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_id": {"name": "company_list_id", "description": "The ID of the related company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2468493, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_list_member_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_list_member_tmp')),\n staging_columns=get_company_list_member_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_company_list_member_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(added_at as {{ dbt.type_timestamp() }}) as added_timestamp,\n company_id,\n company_list_id\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list_member_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_list_member_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_list_member_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__company_list_member_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company_list_member.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n added_at as added_at,\n company_id as company_id,\n company_list_id as company_list_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_company_list_member_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(added_at as timestamp) as added_timestamp,\n company_id,\n company_list_id\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_bounce": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_bounce.sql", "original_file_path": "models/staging/stg_hubspot__email_event_bounce.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_bounce", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_bounce"], "alias": "stg_hubspot__email_event_bounce", "checksum": {"name": "sha256", "checksum": "60643cf2bd6b839005f8ba96c755d55999a4275fb2f899bf638623c27a43d546"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a BOUNCE email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bounce_category": {"name": "bounce_category", "description": "The best-guess of the type of bounce encountered. \nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values. \nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_status": {"name": "returned_status", "description": "The status code returned from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_bounce_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1445832, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_bounce_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_bounce_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_bounce_tmp')),\n staging_columns=get_email_event_bounce_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n \n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n category as bounce_category,\n id as event_id,\n response as returned_response,\n status as returned_status\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_bounce_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_bounce_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_bounce_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_bounce_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_bounce.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n category as category,\n id as id,\n response as response,\n status as status\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n \n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n category as bounce_category,\n id as event_id,\n response as returned_response,\n status as returned_status\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_task": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_task.sql", "original_file_path": "models/staging/stg_hubspot__engagement_task.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_task", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_task"], "alias": "stg_hubspot__engagement_task", "checksum": {"name": "sha256", "checksum": "b335e692e4e0805f0540aedf0c68221bcfb12ec8ad0b04852a8b6b76bbcdbb53"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a TASK engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the task's time of creation and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the task's time of occurrence and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the task. This field determines the user listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the task. This field determines the team listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_task_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2232392, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_task_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_task_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_task_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_task_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_task_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_task_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_task_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_task_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_task_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_task.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n engagement_id as engagement_id,\n type as engagement_type,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n property_hubspot_owner_id as owner_id,\n property_hubspot_team_id as team_id\n \n \n \n \n , \"property_hs_task_type\" as task_type\n \n \n \n\n \n \n , \"property_hs_object_id\" as object_id\n , \"property_hs_engagement_source\" as engagement_source\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_list": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event_list.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event_list.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_list", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event_list"], "alias": "stg_hubspot__marketing_event_list", "checksum": {"name": "sha256", "checksum": "49ec1949fdc27234ceef92756ed8b742b16c3d32d899504df57716ef5a913a81"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a list associated with a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_list_id": {"name": "marketing_event_list_id", "description": "The unique ID of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_list_name": {"name": "marketing_event_list_name", "description": "The name of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The ID of the user who created the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_by_id": {"name": "updated_by_id", "description": "The ID of the user who last updated the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp when the list filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "The current processing status of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deleted_timestamp": {"name": "deleted_timestamp", "description": "The timestamp when the list was deleted, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "The version number of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the object type stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "size": {"name": "size", "description": "The number of records in the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp when the list was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_list_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7370932, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_list_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_list_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_list_tmp')),\n staging_columns=get_marketing_event_list_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as marketing_event_list_id,\n marketing_event_id,\n name as marketing_event_list_name,\n created_by_id,\n updated_by_id,\n cast(filters_updated_at as {{ dbt.type_timestamp() }}) as filters_updated_at,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n processing_status,\n cast(deleted_at as {{ dbt.type_timestamp() }}) as deleted_timestamp,\n list_version,\n object_type_id,\n size,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_list_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_list_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_list_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_list_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event_list.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n marketing_event_id as marketing_event_id,\n name as name,\n created_by_id as created_by_id,\n updated_by_id as updated_by_id,\n filters_updated_at as filters_updated_at,\n created_at as created_at,\n processing_status as processing_status,\n deleted_at as deleted_at,\n list_version as list_version,\n object_type_id as object_type_id,\n size as size,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as marketing_event_list_id,\n marketing_event_id,\n name as marketing_event_list_name,\n created_by_id,\n updated_by_id,\n cast(filters_updated_at as timestamp) as filters_updated_at,\n cast(created_at as timestamp) as created_timestamp,\n processing_status,\n cast(deleted_at as timestamp) as deleted_timestamp,\n list_version,\n object_type_id,\n size,\n cast(updated_at as timestamp) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_email": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_email.sql", "original_file_path": "models/staging/stg_hubspot__engagement_email.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_email", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_email"], "alias": "stg_hubspot__engagement_email", "checksum": {"name": "sha256", "checksum": "3f287f52193121322ccab5a73924861bb49154479b4fb759adff01da7f8919c7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an EMAIL engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the email's time of occurrence and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the email. This field determines the team listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_email_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2201254, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_email_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_email_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_email_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_email_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_email_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_email_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_email_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_email_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_email_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_email.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n type as engagement_type,\n engagement_id as engagement_id,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n property_hubspot_owner_id as owner_id,\n property_hubspot_team_id as team_id\n \n \n \n \n \n \n \n \n \n \n\n \n \n , \"property_hs_all_owner_ids\" as all_owner_ids\n , \"property_hs_all_team_ids\" as all_team_ids\n , \"property_hs_email_subject\" as email_subject\n , \"property_hs_email_text\" as email_text\n , \"property_hs_lastmodifieddate\" as lastmodifieddate\n , \"property_hs_modified_by\" as modified_by\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__form": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__form", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__form.sql", "original_file_path": "models/staging/stg_hubspot__form.sql", "unique_id": "model.hubspot.stg_hubspot__form", "fqn": ["hubspot", "staging", "stg_hubspot__form"], "alias": "stg_hubspot__form", "checksum": {"name": "sha256", "checksum": "5d0909ad12528249d2aab9ed1d31a1fbef0d89f5cdfe0c5360bc3b46a6f2fd7d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a form created in HubSpot, including metadata about its configuration and behavior.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "form_id": {"name": "form_id", "description": "Unique identifier for the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "action": {"name": "action", "description": "The form action type or endpoint triggered upon submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the form was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "css_class": {"name": "css_class", "description": "CSS class applied to the form for styling purposes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "follow_up_id": {"name": "follow_up_id", "description": "ID of the follow-up action or workflow triggered by the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_type": {"name": "form_type", "description": "Category of the form, such as regular, pop-up, or embedded form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lead_nurturing_campaign_id": {"name": "lead_nurturing_campaign_id", "description": "ID of the associated lead nurturing campaign, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "method": {"name": "method", "description": "HTTP method used for form submission (typically POST).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_name": {"name": "form_name", "description": "Name of the form as defined in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "notify_recipients": {"name": "notify_recipients", "description": "List of email addresses that receive notifications on form submissions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "redirect": {"name": "redirect", "description": "URL users are redirected to after submitting the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submit_text": {"name": "submit_text", "description": "Text displayed on the form's submit button.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the form was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__form.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1352081, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__form\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__form_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__form_tmp')),\n staging_columns=get_form_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n guid as form_id,\n action,\n created_at,\n css_class,\n follow_up_id,\n form_type,\n lead_nurturing_campaign_id,\n method,\n name as form_name,\n notify_recipients,\n portal_id,\n redirect,\n submit_text,\n updated_at,\n _fivetran_deleted as is_deleted\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__form_tmp", "package": null, "version": null}, {"name": "stg_hubspot__form_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_form_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__form_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__form.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__form_tmp\"\n\n), macro as (\n\n select\n \n cast(null as timestamp) as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n guid as guid,\n action as action,\n created_at as created_at,\n css_class as css_class,\n follow_up_id as follow_up_id,\n form_type as form_type,\n lead_nurturing_campaign_id as lead_nurturing_campaign_id,\n method as method,\n name as name,\n notify_recipients as notify_recipients,\n portal_id as portal_id,\n redirect as redirect,\n submit_text as submit_text,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n guid as form_id,\n action,\n created_at,\n css_class,\n follow_up_id,\n form_type,\n lead_nurturing_campaign_id,\n method,\n name as form_name,\n notify_recipients,\n portal_id,\n redirect,\n submit_text,\n updated_at,\n _fivetran_deleted as is_deleted\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_deal.sql", "original_file_path": "models/staging/stg_hubspot__ticket_deal.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_deal", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_deal"], "alias": "stg_hubspot__ticket_deal", "checksum": {"name": "sha256", "checksum": "4d3e491fa754fe383205a951c196c4979e5c36bb62da465c2f63dbad9081b27d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and a deal.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False) and var('hubspot_ticket_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7824795, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal\"", "raw_code": "{{ config(enabled=(var('hubspot_service_enabled', false) and var('hubspot_ticket_deal_enabled', false))) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_deal_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_deal_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_deal_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_deal_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_deal_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n deal_id as deal_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_property_history.sql", "original_file_path": "models/staging/stg_hubspot__contact_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__contact_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__contact_property_history"], "alias": "stg_hubspot__contact_property_history", "checksum": {"name": "sha256", "checksum": "a134690f7d4276cfad5b3b3efbd375e63be66aa66584dc2fb81625794d370e3e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to contact record in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the contact property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the contact property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the contact property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2029252, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_property_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_property_history_tmp')),\n staging_columns=get_contact_property_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n contact_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as {{ dbt.type_timestamp() }}) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_contact_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_property_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n contact_id as contact_id,\n name as name,\n source as source,\n source_id as source_id,\n timestamp as change_timestamp,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n contact_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as timestamp) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_contact_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_forward": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_forward.sql", "original_file_path": "models/staging/stg_hubspot__email_event_forward.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_forward", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_forward"], "alias": "stg_hubspot__email_event_forward", "checksum": {"name": "sha256", "checksum": "068623f08b182078581d27cfaf9610d52534d9eefa530299b5886777569fa5e8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a FORWARD email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_forward_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1492386, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_forward_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_forward_tmp')),\n staging_columns=get_email_event_forward_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_forward_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_forward_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_forward_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_forward_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_forward.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n id as id,\n ip_address as ip_address,\n location as location,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_thread": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_thread.sql", "original_file_path": "models/staging/stg_hubspot__conversation_thread.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_thread", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_thread"], "alias": "stg_hubspot__conversation_thread", "checksum": {"name": "sha256", "checksum": "a9f6532bfcea8ef1199449d11a6a0e3db1572d6ae8886e1a2624a219ccae245d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a conversation thread in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "conversation_thread_id": {"name": "conversation_thread_id", "description": "Unique ID of the conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_contact_id": {"name": "associated_contact_id", "description": "ID of the contact associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_ticket_id": {"name": "associated_ticket_id", "description": "ID of the ticket associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_account_id": {"name": "original_channel_account_id", "description": "ID of the channel account through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_id": {"name": "original_channel_id", "description": "ID of the channel through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to_actor_id": {"name": "assigned_to_actor_id", "description": "ID of the agent the thread is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_at": {"name": "closed_at", "description": "Timestamp when the thread was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_received_at": {"name": "latest_message_received_at", "description": "Timestamp of the most recently received message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_sent_at": {"name": "latest_message_sent_at", "description": "Timestamp of the most recently sent message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_at": {"name": "latest_message_at", "description": "Timestamp of the most recent message (sent or received) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_spam": {"name": "is_spam", "description": "Indicates whether the thread has been marked as spam.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the thread (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7557416, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_thread_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_thread_tmp')),\n staging_columns=get_conversation_thread_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as conversation_thread_id,\n inbox_id,\n cast(associated_contact_id as {{ dbt.type_int() }}) as associated_contact_id,\n cast(associated_ticket_id as {{ dbt.type_int() }}) as associated_ticket_id,\n original_channel_account_id,\n original_channel_id,\n assigned_to as assigned_to_actor_id,\n cast(closed_at as {{ dbt.type_timestamp() }}) as closed_at,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n cast(latest_message_timestamp as {{ dbt.type_timestamp() }}) as latest_message_at,\n cast(latest_message_received_timestamp as {{ dbt.type_timestamp() }}) as latest_message_received_at,\n cast(latest_message_sent_timestamp as {{ dbt.type_timestamp() }}) as latest_message_sent_at,\n spam as is_spam,\n status\n from macro\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_thread_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_thread_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_thread_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_int"], "nodes": ["model.hubspot.stg_hubspot__conversation_thread_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_thread.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n inbox_id as inbox_id,\n associated_contact_id as associated_contact_id,\n associated_ticket_id as associated_ticket_id,\n original_channel_account_id as original_channel_account_id,\n original_channel_id as original_channel_id,\n assigned_to as assigned_to,\n closed_at as closed_at,\n created_at as created_at,\n latest_message_received_timestamp as latest_message_received_timestamp,\n latest_message_sent_timestamp as latest_message_sent_timestamp,\n latest_message_timestamp as latest_message_timestamp,\n spam as spam,\n status as status\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as conversation_thread_id,\n inbox_id,\n cast(associated_contact_id as integer) as associated_contact_id,\n cast(associated_ticket_id as integer) as associated_ticket_id,\n original_channel_account_id,\n original_channel_id,\n assigned_to as assigned_to_actor_id,\n cast(closed_at as timestamp) as closed_at,\n cast(created_at as timestamp) as created_at,\n cast(latest_message_timestamp as timestamp) as latest_message_at,\n cast(latest_message_received_timestamp as timestamp) as latest_message_received_at,\n cast(latest_message_sent_timestamp as timestamp) as latest_message_sent_at,\n spam as is_spam,\n status\n from macro\n where not coalesce(_fivetran_deleted, false)\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_deferred": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_deferred.sql", "original_file_path": "models/staging/stg_hubspot__email_event_deferred.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_deferred", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_deferred"], "alias": "stg_hubspot__email_event_deferred", "checksum": {"name": "sha256", "checksum": "44e81c43507f2486c24fa878f6d8dd5989ab4e2559fe24abacf0e8cc54144b50"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a DEFERRED email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "attempt_number": {"name": "attempt_number", "description": "The delivery attempt number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "returned_response": {"name": "returned_response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_deferred_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1464157, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_deferred_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_deferred_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_deferred_tmp')),\n staging_columns=get_email_event_deferred_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n attempt as attempt_number,\n id as event_id,\n response as returned_response\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_deferred_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_deferred_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_deferred_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_deferred_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_deferred.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n attempt as attempt,\n id as id,\n response as response\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n attempt as attempt_number,\n id as event_id,\n response as returned_response\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_open": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_open.sql", "original_file_path": "models/staging/stg_hubspot__email_event_open.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_open", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_open"], "alias": "stg_hubspot__email_event_open", "checksum": {"name": "sha256", "checksum": "1d8e9a8556efc17693cf26c1640466da05a595e23f69aa5c5d9d46f1982d99fd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a OPEN email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "duration_open": {"name": "duration_open", "description": "If provided and nonzero, the approximate number of milliseconds the user had opened the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_open_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1502006, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_open_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_open_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_open_tmp')),\n staging_columns=get_email_event_open_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n duration as duration_open,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_open_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_open_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_open_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_open_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_open.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n duration as duration,\n id as id,\n ip_address as ip_address,\n location as location,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n duration as duration_open,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_recipient": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_message_recipient.sql", "original_file_path": "models/staging/stg_hubspot__conversation_message_recipient.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_recipient", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_message_recipient"], "alias": "stg_hubspot__conversation_message_recipient", "checksum": {"name": "sha256", "checksum": "4c007c217fe0cce078e429f0b8164e07a31ea1a53e561217666922fe8f843d75"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a recipient associated with a conversation message.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique ID generated by Fivetran for this recipient record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "actor_id": {"name": "actor_id", "description": "ID of the actor (user or contact) who received the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "message_id": {"name": "message_id", "description": "ID of the message this recipient is associated with.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_field": {"name": "recipient_field", "description": "The role of this recipient in the message (e.g., TO, CC, BCC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for the recipient (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7600412, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_message_recipient_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_message_recipient_tmp')),\n staging_columns=get_conversation_message_recipient_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_id,\n actor_id,\n message_id,\n thread_id,\n name,\n recipient_field,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_recipient_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_recipient_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_message_recipient_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_recipient_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_message_recipient.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_id as _fivetran_id,\n actor_id as actor_id,\n message_id as message_id,\n thread_id as thread_id,\n name as name,\n recipient_field as recipient_field,\n delivery_identifier_type as delivery_identifier_type,\n delivery_identifier_value as delivery_identifier_value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_id,\n actor_id,\n message_id,\n thread_id,\n name,\n recipient_field,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_participant": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event_participant.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event_participant.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_participant", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event_participant"], "alias": "stg_hubspot__marketing_event_participant", "checksum": {"name": "sha256", "checksum": "3d8ddb1af8edb6bf4f9c43c887eee5942581217c536813bea8a881254d607467"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a participant in a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_participant_id": {"name": "marketing_event_participant_id", "description": "The unique ID of the marketing event participant record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the participant record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "The timestamp when the participation event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_percentage": {"name": "attendance_percentage", "description": "Percentage of the participation duration relative to the event duration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_state": {"name": "attendance_state", "description": "The attendance state of the participant (e.g., ATTENDED, CANCELLED, EMPTY, NO_SHOW, REGISTERED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendance_duration_seconds": {"name": "attendance_duration_seconds", "description": "The number of seconds the participation lasted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_participant_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.739563, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_participant_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_participant_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_participant_tmp')),\n staging_columns=get_marketing_event_participant_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as marketing_event_participant_id,\n marketing_event_id,\n contact_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n cast(properties_occurred_at as {{ dbt.type_timestamp() }}) as occurred_timestamp,\n properties_attendance_percentage as attendance_percentage,\n properties_attendance_state as attendance_state,\n properties_attendance_duration_seconds as attendance_duration_seconds\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_participant_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_participant_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_participant_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_participant_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event_participant.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n marketing_event_id as marketing_event_id,\n contact_id as contact_id,\n created_at as created_at,\n properties_occurred_at as properties_occurred_at,\n properties_attendance_percentage as properties_attendance_percentage,\n properties_attendance_state as properties_attendance_state,\n properties_attendance_duration_seconds as properties_attendance_duration_seconds\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as marketing_event_participant_id,\n marketing_event_id,\n contact_id,\n cast(created_at as timestamp) as created_timestamp,\n cast(properties_occurred_at as timestamp) as occurred_timestamp,\n properties_attendance_percentage as attendance_percentage,\n properties_attendance_state as attendance_state,\n properties_attendance_duration_seconds as attendance_duration_seconds\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_sent": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_sent.sql", "original_file_path": "models/staging/stg_hubspot__email_event_sent.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_sent", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_sent"], "alias": "stg_hubspot__email_event_sent", "checksum": {"name": "sha256", "checksum": "80624cfb0abb32917cffe53e5989a7aff16f45a810c539992fce9415e8be1779"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a SENT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc_emails": {"name": "bcc_emails", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc_emails": {"name": "cc_emails", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subject": {"name": "email_subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_email": {"name": "from_email", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to_email": {"name": "reply_to_email", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1520677, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_sent_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_sent_tmp')),\n staging_columns=get_email_event_sent_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_sent_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_sent_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_sent_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_sent_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_sent_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_sent.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n bcc as bcc,\n cc as cc,\n id as id,\n reply_to as reply_to,\n subject as subject,\n \n \"from\" as from_email\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n bcc as bcc_emails,\n cc as cc_emails,\n from_email, -- source field name = from ; alias declared in macros/get_email_event_sent_columns.sql\n id as event_id,\n reply_to as reply_to_email,\n subject as email_subject\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_custom_property": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event_custom_property.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event_custom_property.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event_custom_property"], "alias": "stg_hubspot__marketing_event_custom_property", "checksum": {"name": "sha256", "checksum": "966f1821a241eb82c92fb6cd7423b96904507558a711811e9fba8fd6d077ac63"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a custom property on a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_name": {"name": "property_name", "description": "The name of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_value": {"name": "property_value", "description": "The value of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_custom_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7406597, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_custom_property\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_custom_property_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_custom_property_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_custom_property_tmp')),\n staging_columns=get_marketing_event_custom_property_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n marketing_event_id,\n name as property_name,\n value as property_value\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_custom_property_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_custom_property_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_custom_property_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event_custom_property.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_custom_property_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n marketing_event_id as marketing_event_id,\n name as name,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n marketing_event_id,\n name as property_name,\n value as property_value\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_message_history.sql", "original_file_path": "models/staging/stg_hubspot__conversation_message_history.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_history", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_message_history"], "alias": "stg_hubspot__conversation_message_history", "checksum": {"name": "sha256", "checksum": "8363c7b84f6e805f4a23bd405269842f07f7b69ff844aa4c1ae6eb1413eb795f"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a version of a conversation message, tracking changes over time via SCD Type 2.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether this is the currently active version of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "message_id": {"name": "message_id", "description": "Unique ID of the conversation message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_id": {"name": "channel_account_id", "description": "ID of the channel account associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_inbox_id": {"name": "from_inbox_id", "description": "ID of the inbox the message was sent from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "to_inbox_id": {"name": "to_inbox_id", "description": "ID of the inbox the message was sent to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to_actor_id": {"name": "assigned_to_actor_id", "description": "ID of the agent the thread was assigned to at message time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_from_actor_id": {"name": "assigned_from_actor_id", "description": "ID of the previous assignee before this message triggered a reassignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the message was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_actor_id": {"name": "created_by_actor_id", "description": "ID of the user who created the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_actor_type": {"name": "created_by_actor_type", "description": "Type of the actor (VISITOR, AGENT, BOT, SYSTEM, EMAIL, INTEGRATION, LLM, OTHER) who created the message. Inferred from the prefix of `created_by_actor_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "direction": {"name": "direction", "description": "Direction of the message (e.g., INCOMING, OUTGOING).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "in_reply_to_id": {"name": "in_reply_to_id", "description": "ID of the message this message is a reply to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "new_status": {"name": "new_status", "description": "The thread status set by this message event (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "rich_text": {"name": "rich_text", "description": "HTML-formatted body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "Subject line of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "text": {"name": "text", "description": "Plain-text body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "truncation_status": {"name": "truncation_status", "description": "Indicates whether the message body was truncated (e.g., NOT_TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY, TRUNCATED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the message event (e.g., MESSAGE, COMMENT, WELCOME_MESSAGE).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the message record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "client_type": {"name": "client_type", "description": "The type of client used to send the message (e.g., SYSTEM, HUBSPOT, INTEGRATION).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status_type": {"name": "status_type", "description": "The status type of the message (e.g., SENT, RECEIVED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "version_rank": {"name": "version_rank", "description": "Row number ordered by _fivetran_end descending; rank 1 is the most recent active version of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7589386, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_message_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_message_history_tmp')),\n staging_columns=get_conversation_message_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n _fivetran_deleted as is_deleted,\n id as message_id,\n thread_id,\n channel_account_id,\n channel_id,\n from_inbox_id,\n to_inbox_id,\n assigned_to as assigned_to_actor_id,\n assigned_from as assigned_from_actor_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n created_by as created_by_actor_id,\n case \n when created_by like 'A-%' then 'AGENT'\n when created_by like 'B-%' then 'BOT'\n when created_by like 'E-%' then 'EMAIL'\n when created_by like 'I-%' then 'INTEGRATION'\n when created_by like 'L-%' then 'LLM' -- customer agent powered by Hubspot's AI called Breeze\n when created_by like 'S-%' then 'SYSTEM'\n when created_by like 'V-%' then 'VISITOR'\n else 'OTHER' end as created_by_actor_type,\n upper(direction) as direction,\n in_reply_to_id,\n new_status,\n rich_text,\n subject,\n text,\n upper(truncation_status) as truncation_status,\n upper(type) as type,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n upper(client_type) as client_type,\n upper(status_type) as status_type,\n row_number() over (partition by id order by _fivetran_end desc) as version_rank\n from macro\n where coalesce(_fivetran_active, true)\n and not coalesce(_fivetran_deleted, false)\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_message_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_message_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_message_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n id as id,\n thread_id as thread_id,\n channel_account_id as channel_account_id,\n channel_id as channel_id,\n from_inbox_id as from_inbox_id,\n to_inbox_id as to_inbox_id,\n assigned_to as assigned_to,\n assigned_from as assigned_from,\n created_at as created_at,\n created_by as created_by,\n direction as direction,\n in_reply_to_id as in_reply_to_id,\n new_status as new_status,\n rich_text as rich_text,\n subject as subject,\n text as text,\n truncation_status as truncation_status,\n type as type,\n updated_at as updated_at,\n client_type as client_type,\n status_type as status_type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n _fivetran_deleted as is_deleted,\n id as message_id,\n thread_id,\n channel_account_id,\n channel_id,\n from_inbox_id,\n to_inbox_id,\n assigned_to as assigned_to_actor_id,\n assigned_from as assigned_from_actor_id,\n cast(created_at as timestamp) as created_at,\n created_by as created_by_actor_id,\n case \n when created_by like 'A-%' then 'AGENT'\n when created_by like 'B-%' then 'BOT'\n when created_by like 'E-%' then 'EMAIL'\n when created_by like 'I-%' then 'INTEGRATION'\n when created_by like 'L-%' then 'LLM' -- customer agent powered by Hubspot's AI called Breeze\n when created_by like 'S-%' then 'SYSTEM'\n when created_by like 'V-%' then 'VISITOR'\n else 'OTHER' end as created_by_actor_type,\n upper(direction) as direction,\n in_reply_to_id,\n new_status,\n rich_text,\n subject,\n text,\n upper(truncation_status) as truncation_status,\n upper(type) as type,\n cast(updated_at as timestamp) as updated_at,\n upper(client_type) as client_type,\n upper(status_type) as status_type,\n row_number() over (partition by id order by _fivetran_end desc) as version_rank\n from macro\n where coalesce(_fivetran_active, true)\n and not coalesce(_fivetran_deleted, false)\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline_stage": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_pipeline_stage.sql", "original_file_path": "models/staging/stg_hubspot__deal_pipeline_stage.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage", "fqn": ["hubspot", "staging", "stg_hubspot__deal_pipeline_stage"], "alias": "stg_hubspot__deal_pipeline_stage", "checksum": {"name": "sha256", "checksum": "002fdca1f3adce6bacff7b59a1ae870e67d4cb36ed6de922a896d66bcab3b1ce"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a pipeline stage in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_deal_pipeline_stage_deleted": {"name": "is_deal_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the related pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the pipeline stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed. For the state of the closed deal (\"Closed Won\" vs \"Closed Lost\"), refer to the pipeline_stage_label column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "probability": {"name": "probability", "description": "The probability that the deal will close. Used for the deal forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_created_at": {"name": "deal_pipeline_stage_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_updated_at": {"name": "deal_pipeline_stage_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7979436, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_stage_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_pipeline_stage_tmp')),\n staging_columns=get_deal_pipeline_stage_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_stage_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n coalesce(is_closed, closed_won) as is_closed,\n display_order,\n label as pipeline_stage_label,\n cast(pipeline_id as {{ dbt.type_string() }}) as deal_pipeline_id,\n probability,\n cast(stage_id as {{ dbt.type_string() }}) as deal_pipeline_stage_id,\n created_at as deal_pipeline_stage_created_at,\n updated_at as deal_pipeline_stage_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline_stage_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_stage_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_pipeline_stage_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_pipeline_stage.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n closed_won as closed_won,\n is_closed as is_closed,\n display_order as display_order,\n label as label,\n pipeline_id as pipeline_id,\n probability as probability,\n stage_id as stage_id,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_stage_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n coalesce(is_closed, closed_won) as is_closed,\n display_order,\n label as pipeline_stage_label,\n cast(pipeline_id as TEXT) as deal_pipeline_id,\n probability,\n cast(stage_id as TEXT) as deal_pipeline_stage_id,\n created_at as deal_pipeline_stage_created_at,\n updated_at as deal_pipeline_stage_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement.sql", "original_file_path": "models/staging/stg_hubspot__engagement.sql", "unique_id": "model.hubspot.stg_hubspot__engagement", "fqn": ["hubspot", "staging", "stg_hubspot__engagement"], "alias": "stg_hubspot__engagement", "checksum": {"name": "sha256", "checksum": "064b638e701eb444a668da74ba15d0eab884f04fc96d5a195abffcb1b0ca1a22"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an engagement", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.224032, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__engagement_tmp')),\n staging_columns=get_engagement_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as engagement_id,\n portal_id,\n engagement_type\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__engagement_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n portal_id as portal_id,\n type as engagement_type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as engagement_id,\n portal_id,\n engagement_type\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner_team": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner_team", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__owner_team.sql", "original_file_path": "models/staging/stg_hubspot__owner_team.sql", "unique_id": "model.hubspot.stg_hubspot__owner_team", "fqn": ["hubspot", "staging", "stg_hubspot__owner_team"], "alias": "stg_hubspot__owner_team", "checksum": {"name": "sha256", "checksum": "b73a5538b31bc88615243ee56b4a723a3c9927dff35114e643e802335063e959"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table mapping owners to their associated teams in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "owner_id": {"name": "owner_id", "description": "Unique ID of the HubSpot owner (user) assigned to the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the team to which the owner belongs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_team_primary": {"name": "is_team_primary", "description": "Indicates whether the team is the owner's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8206525, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__owner_team_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__owner_team_tmp')),\n staging_columns=get_owner_team_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n owner_id,\n team_id,\n is_team_primary,\n _fivetran_deleted as is_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner_team_tmp", "package": null, "version": null}, {"name": "stg_hubspot__owner_team_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_owner_team_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__owner_team_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__owner_team.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n owner_id as owner_id,\n team_id as team_id,\n is_team_primary as is_team_primary\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n owner_id,\n team_id,\n is_team_primary,\n _fivetran_deleted as is_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_pipeline.sql", "original_file_path": "models/staging/stg_hubspot__deal_pipeline.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline", "fqn": ["hubspot", "staging", "stg_hubspot__deal_pipeline"], "alias": "stg_hubspot__deal_pipeline", "checksum": {"name": "sha256", "checksum": "5ceeb4cbfa495eaf3e1b3c1fc468635f546feab78aca5165d773d1a4548bafee"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a pipeline in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_deal_pipeline_deleted": {"name": "is_deal_pipeline_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the pipelines appear when viewed in HubSpot", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_created_at": {"name": "deal_pipeline_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_updated_at": {"name": "deal_pipeline_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Whether the stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_label": {"name": "pipeline_label", "description": "The human-readable label for the pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7989419, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_pipeline_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_pipeline_tmp')),\n staging_columns=get_deal_pipeline_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n cast(pipeline_id as {{ dbt.type_string() }}) as deal_pipeline_id,\n created_at as deal_pipeline_created_at,\n updated_at as deal_pipeline_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_pipeline_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_pipeline_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_pipeline.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n display_order as display_order,\n label as label,\n pipeline_id as pipeline_id,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_deal_pipeline_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n display_order,\n label as pipeline_label,\n cast(pipeline_id as TEXT) as deal_pipeline_id,\n created_at as deal_pipeline_created_at,\n updated_at as deal_pipeline_updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel_account": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_channel_account.sql", "original_file_path": "models/staging/stg_hubspot__conversation_channel_account.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel_account", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_channel_account"], "alias": "stg_hubspot__conversation_channel_account", "checksum": {"name": "sha256", "checksum": "5fc6dd823b767e0e5fe6efdadc880b73a780ac7f16d700e3626f1370faf45196"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an instance of a channel connected to an inbox, such as a specific email address or Facebook Messenger account.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "channel_account_id": {"name": "channel_account_id", "description": "Unique ID of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel this account belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox this channel account is connected to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the channel account is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_authorized": {"name": "is_authorized", "description": "Boolean indicating whether the channel account is authorized.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the channel account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for this channel account (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7544417, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_channel_account_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_channel_account_tmp')),\n staging_columns=get_conversation_channel_account_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_account_id,\n channel_id,\n inbox_id,\n active as is_active,\n authorized as is_authorized,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n name,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel_account_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_channel_account_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_channel_account_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel_account_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_channel_account.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n channel_id as channel_id,\n inbox_id as inbox_id,\n active as active,\n authorized as authorized,\n created_at as created_at,\n name as name,\n delivery_identifier_type as delivery_identifier_type,\n delivery_identifier_value as delivery_identifier_value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as channel_account_id,\n channel_id,\n inbox_id,\n active as is_active,\n authorized as is_authorized,\n cast(created_at as timestamp) as created_at,\n name,\n delivery_identifier_type,\n delivery_identifier_value\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_property_history": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__company_property_history.sql", "original_file_path": "models/staging/stg_hubspot__company_property_history.sql", "unique_id": "model.hubspot.stg_hubspot__company_property_history", "fqn": ["hubspot", "staging", "stg_hubspot__company_property_history"], "alias": "stg_hubspot__company_property_history", "checksum": {"name": "sha256", "checksum": "a50a22105bcb075978dfaae3a00a06328396d3dc8171a1d280be81c111b50298"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a change to company record in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the company property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the company property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the company property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_source": {"name": "change_source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "change_source_id": {"name": "change_source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "change_timestamp": {"name": "change_timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "company_id": {"name": "company_id", "description": "The ID of the related company record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "new_value": {"name": "new_value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__company.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.248007, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled','hubspot_company_property_history_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__company_property_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_property_history_tmp')),\n staging_columns=get_company_property_history_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n _fivetran_active,\n company_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as {{ dbt.type_timestamp() }}) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_company_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_property_history_tmp", "package": null, "version": null}, {"name": "stg_hubspot__company_property_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_company_property_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__company_property_history_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company_property_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_start as _fivetran_start,\n _fivetran_end as _fivetran_end,\n _fivetran_active as _fivetran_active,\n company_id as company_id,\n name as name,\n source as source,\n source_id as source_id,\n timestamp as change_timestamp,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(_fivetran_start as timestamp) as _fivetran_start,\n cast(_fivetran_end as timestamp) as _fivetran_end,\n _fivetran_active,\n company_id,\n name as field_name,\n source as change_source,\n source_id as change_source_id,\n cast(change_timestamp as timestamp) as change_timestamp, -- source field name = timestamp ; alias declared in macros/get_company_property_history_columns.sql\n value as new_value\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__marketing_event.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event", "fqn": ["hubspot", "staging", "stg_hubspot__marketing_event"], "alias": "stg_hubspot__marketing_event", "checksum": {"name": "sha256", "checksum": "ef9dbaa2f12ee917fff2b8c083f29ccb61bb32421b33013bb9185c35e4f896dd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a marketing event in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_marketing_event_deleted": {"name": "is_marketing_event_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The unique ID of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The string ID of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The name of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendees": {"name": "attendees", "description": "Number of attended contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellations": {"name": "cancellations", "description": "Number of cancelled contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp when the marketing event was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp when the marketing event ends.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_cancelled": {"name": "event_cancelled", "description": "Boolean indicating whether the marketing event was cancelled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_completed": {"name": "event_completed", "description": "Boolean indicating whether the marketing event has been completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_description": {"name": "event_description", "description": "A description of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_name": {"name": "event_name", "description": "The name of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_organizer": {"name": "event_organizer", "description": "The name of the organizer of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_status": {"name": "event_status", "description": "The current status of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_url": {"name": "event_url", "description": "A URL in the external event application where the marketing event can be managed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "external_event_id": {"name": "external_event_id", "description": "The ID that is associated with this marketing event in the external event application.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_shows": {"name": "no_shows", "description": "Number of no-show contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "registrants": {"name": "registrants", "description": "Number of registered contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp when the marketing event starts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp when the marketing event was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__marketing_event.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7345707, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__marketing_event_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__marketing_event_tmp')),\n staging_columns=get_marketing_event_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_marketing_event_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as marketing_event_id,\n app_id,\n app_name,\n attendees,\n cancellations,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_timestamp,\n cast(end_date_time as {{ dbt.type_timestamp() }}) as end_timestamp,\n event_cancelled,\n event_completed,\n event_description,\n event_name,\n event_organizer,\n event_status,\n event_type,\n event_url,\n external_event_id,\n no_shows,\n registrants,\n cast(start_date_time as {{ dbt.type_timestamp() }}) as start_timestamp,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_tmp", "package": null, "version": null}, {"name": "stg_hubspot__marketing_event_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_marketing_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n id as id,\n app_id as app_id,\n app_name as app_name,\n attendees as attendees,\n cancellations as cancellations,\n created_at as created_at,\n end_date_time as end_date_time,\n event_cancelled as event_cancelled,\n event_completed as event_completed,\n event_description as event_description,\n event_name as event_name,\n event_organizer as event_organizer,\n event_status as event_status,\n event_type as event_type,\n event_url as event_url,\n external_event_id as external_event_id,\n no_shows as no_shows,\n registrants as registrants,\n start_date_time as start_date_time,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_marketing_event_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as marketing_event_id,\n app_id,\n app_name,\n attendees,\n cancellations,\n cast(created_at as timestamp) as created_timestamp,\n cast(end_date_time as timestamp) as end_timestamp,\n event_cancelled,\n event_completed,\n event_description,\n event_name,\n event_organizer,\n event_status,\n event_type,\n event_url,\n external_event_id,\n no_shows,\n registrants,\n cast(start_date_time as timestamp) as start_timestamp,\n cast(updated_at as timestamp) as updated_timestamp\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_merge_audit": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_merge_audit.sql", "original_file_path": "models/staging/stg_hubspot__contact_merge_audit.sql", "unique_id": "model.hubspot.stg_hubspot__contact_merge_audit", "fqn": ["hubspot", "staging", "stg_hubspot__contact_merge_audit"], "alias": "stg_hubspot__contact_merge_audit", "checksum": {"name": "sha256", "checksum": "d152609be723efdd8d14c54fd6de85327b3fcd1521f810692ca6e14f1ab1720b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record contains a contact merge event and the contacts affected by the merge.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "canonical_vid": {"name": "canonical_vid", "description": "The contact ID of the contact which the vid_to_merge contact was merged into.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "entity_id": {"name": "entity_id", "description": "The ID of the related entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_properties_moved": {"name": "num_properties_moved", "description": "The number of properties which were removed from the merged contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp_at": {"name": "timestamp_at", "description": "Timestamp of when the contacts were merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_id": {"name": "user_id", "description": "The ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "vid_to_merge": {"name": "vid_to_merge", "description": "The ID of the contact which was merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_contact_merge_audit_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2059312, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit\"", "raw_code": "{{ config(enabled=(var('hubspot_marketing_enabled', true) and var('hubspot_contact_merge_audit_enabled', false))) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_merge_audit_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_merge_audit_tmp')),\n staging_columns=get_contact_merge_audit_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n canonical_vid,\n contact_id,\n entity_id,\n first_name,\n last_name,\n num_properties_moved,\n cast(\n {%- if target.type == 'redshift' %}\n \"timestamp\"\n {%- else %} \n timestamp {%- endif %}\n as {{ dbt.type_timestamp() }}) as timestamp_at,\n user_id,\n vid_to_merge,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_merge_audit_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_merge_audit_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_contact_merge_audit_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_merge_audit_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_merge_audit.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n canonical_vid as canonical_vid,\n contact_id as contact_id,\n entity_id as entity_id,\n first_name as first_name,\n last_name as last_name,\n num_properties_moved as num_properties_moved,\n timestamp as timestamp,\n user_id as user_id,\n vid_to_merge as vid_to_merge\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n canonical_vid,\n contact_id,\n entity_id,\n first_name,\n last_name,\n num_properties_moved,\n cast( \n timestamp\n as timestamp) as timestamp_at,\n user_id,\n vid_to_merge,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal.sql", "original_file_path": "models/staging/stg_hubspot__deal.sql", "unique_id": "model.hubspot.stg_hubspot__deal", "fqn": ["hubspot", "staging", "stg_hubspot__deal"], "alias": "stg_hubspot__deal", "checksum": {"name": "sha256", "checksum": "0ad26f2b2971db0022ee286045eca559357ac8bdeac9806ae8ebe59e94c43de9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a deal in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_deal_deleted": {"name": "is_deal_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_id": {"name": "deal_id", "description": "The ID of the deal", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_name": {"name": "deal_name", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A brief description of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "amount": {"name": "amount", "description": "The total value of the deal in the deal's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_date": {"name": "closed_date", "description": "The day the deal is expected to close, or was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date the deal was created. This property is set automatically by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.800193, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_tmp')),\n staging_columns=get_deal_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_tmp')),\n staging_columns=get_deal_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__deal_tmp',get_deal_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_deal_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_tmp')), \n prefix='property_',exclude=exclude_cols)\n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_deal_columns.sql macro\n source_relation,\n deal_name,\n cast(closed_date as {{ dbt.type_timestamp() }}) as closed_date,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n coalesce(is_deal_deleted, _fivetran_deleted) as is_deal_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n deal_id,\n cast(deal_pipeline_id as {{ dbt.type_string() }}) as deal_pipeline_id,\n cast(deal_pipeline_stage_id as {{ dbt.type_string() }}) as deal_pipeline_stage_id,\n owner_id,\n portal_id,\n description,\n amount\n\n --The below macro adds the fields defined within your hubspot__deal_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__deal_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__deal_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__deal_calculated_fields') }}\n\n from macro\n{% endif %}\n\n), joined as (\n {{ add_property_labels('hubspot__deal_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__deal_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_tmp\"\n\n), macro as (\n\n select\n \n cast(null as timestamp) as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n deal_id as deal_id,\n deal_pipeline_id as deal_pipeline_id,\n deal_pipeline_stage_id as deal_pipeline_stage_id,\n is_deleted as is_deal_deleted,\n owner_id as owner_id,\n portal_id as portal_id,\n property_dealname as deal_name,\n property_description as description,\n property_amount as amount,\n property_closedate as closed_date,\n property_createdate as created_date\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns\n -- a few columns below are aliased within the macros/get_deal_columns.sql macro\n source_relation,\n deal_name,\n cast(closed_date as timestamp) as closed_date,\n cast(created_date as timestamp) as created_date,\n coalesce(is_deal_deleted, _fivetran_deleted) as is_deal_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n deal_id,\n cast(deal_pipeline_id as TEXT) as deal_pipeline_id,\n cast(deal_pipeline_stage_id as TEXT) as deal_pipeline_stage_id,\n owner_id,\n portal_id,\n description,\n amount\n\n --The below macro adds the fields defined within your hubspot__deal_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__deal_calculated_fields variable.\n \n\n\n\n from macro\n\n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_campaign": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_campaign.sql", "original_file_path": "models/staging/stg_hubspot__email_campaign.sql", "unique_id": "model.hubspot.stg_hubspot__email_campaign", "fqn": ["hubspot", "staging", "stg_hubspot__email_campaign"], "alias": "stg_hubspot__email_campaign", "checksum": {"name": "sha256", "checksum": "202f26e0e2f618dd4c1492c0c8dc1a1cf125a30f235897c9af8f4bcef21b5cc2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an email campaign in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The app ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The app name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "The ID of the content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_name": {"name": "email_campaign_name", "description": "The name of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_sub_type": {"name": "email_campaign_sub_type", "description": "The email campaign sub-type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_subject": {"name": "email_campaign_subject", "description": "The subject of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_type": {"name": "email_campaign_type", "description": "The email campaign type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_included": {"name": "num_included", "description": "The number of messages included as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_queued": {"name": "num_queued", "description": "The number of messages queued as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.158586, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_campaign_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_campaign_tmp')),\n staging_columns=get_email_campaign_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n app_id,\n app_name,\n content_id,\n id as email_campaign_id,\n name as email_campaign_name,\n num_included,\n num_queued,\n sub_type as email_campaign_sub_type,\n subject as email_campaign_subject,\n type as email_campaign_type\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_campaign_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_campaign_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_campaign_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_campaign.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n app_id as app_id,\n app_name as app_name,\n content_id as content_id,\n id as id,\n name as name,\n num_included as num_included,\n num_queued as num_queued,\n sub_type as sub_type,\n subject as subject,\n type as type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n app_id,\n app_name,\n content_id,\n id as email_campaign_id,\n name as email_campaign_name,\n num_included,\n num_queued,\n sub_type as email_campaign_sub_type,\n subject as email_campaign_subject,\n type as email_campaign_type\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_contact.sql", "original_file_path": "models/staging/stg_hubspot__engagement_contact.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_contact", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_contact"], "alias": "stg_hubspot__engagement_contact", "checksum": {"name": "sha256", "checksum": "5b52a432f0341a5d33e9a812414f5b6098c5ed54cfd50c412596583385e50708"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a contact and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2183828, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_contact_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_contact_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_contact_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_contact_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_contact_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_contact_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n contact_id as contact_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n \n \n\n \n \n , \"engagement_type\"\n , \"type_id\"\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team_user": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team_user", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__team_user.sql", "original_file_path": "models/staging/stg_hubspot__team_user.sql", "unique_id": "model.hubspot.stg_hubspot__team_user", "fqn": ["hubspot", "staging", "stg_hubspot__team_user"], "alias": "stg_hubspot__team_user", "checksum": {"name": "sha256", "checksum": "f2e7efea9f94652de55845e1af278e9920043572d511dfe16a79bbf874e3ae17"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Table representing associations between users and teams, including secondary team assignments.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "user_id": {"name": "user_id", "description": "Unique ID of the user associated with the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the associated team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_secondary_user": {"name": "is_secondary_user", "description": "Indicates whether the team is a secondary team for the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__team.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8240287, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team_user\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__team_user_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__team_user_tmp')),\n staging_columns=get_team_user_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n team_id,\n user_id,\n is_secondary_user,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__team_user_tmp", "package": null, "version": null}, {"name": "stg_hubspot__team_user_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_team_user_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__team_user_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team_user.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__team_user_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as boolean) as _fivetran_deleted,\n team_id as team_id,\n user_id as user_id,\n is_secondary_user as is_secondary_user\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n team_id,\n user_id,\n is_secondary_user,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_status_change": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_status_change.sql", "original_file_path": "models/staging/stg_hubspot__email_event_status_change.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_status_change", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_status_change"], "alias": "stg_hubspot__email_event_status_change", "checksum": {"name": "sha256", "checksum": "2b3212b8e94c460c02acd0fd9d98e14f3195773150d6fa19969e12bcb9849bd3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a STATUS_CHANGE email event in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "change_source": {"name": "change_source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_bounced": {"name": "is_bounced", "description": "A HubSpot employee explicitly initiated the status change to block messages to the recipient. \n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requested_by_email": {"name": "requested_by_email", "description": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscription_status": {"name": "subscription_status", "description": "The recipient's portal subscription status. \nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all \nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscriptions": {"name": "subscriptions", "description": "An array of JSON objects representing the status of subscriptions for the recipient. \nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1538222, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_status_change_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_status_change_tmp')),\n staging_columns=get_email_event_status_change_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n bounced as is_bounced,\n id as event_id,\n portal_subscription_status as subscription_status,\n requested_by as requested_by_email,\n source as change_source,\n subscriptions\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_status_change_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_status_change_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_status_change_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_status_change_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_status_change.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n bounced as bounced,\n id as id,\n portal_subscription_status as portal_subscription_status,\n requested_by as requested_by,\n source as source,\n subscriptions as subscriptions\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n bounced as is_bounced,\n id as event_id,\n portal_subscription_status as subscription_status,\n requested_by as requested_by_email,\n source as change_source,\n subscriptions\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline_stage": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_pipeline_stage.sql", "original_file_path": "models/staging/stg_hubspot__ticket_pipeline_stage.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_pipeline_stage"], "alias": "stg_hubspot__ticket_pipeline_stage", "checksum": {"name": "sha256", "checksum": "7f43ae83f23429394a3b879d8d06652354660e8e9653793cfc6e9b8477bdcb14"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a ticket pipeline stage.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_ticket_pipeline_stage_deleted": {"name": "is_ticket_pipeline_stage_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the pipeline stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_stage_label": {"name": "pipeline_stage_label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_id": {"name": "ticket_pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_id": {"name": "ticket_pipeline_stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_created_at": {"name": "ticket_pipeline_stage_created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_pipeline_stage_updated_at": {"name": "ticket_pipeline_stage_updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7874727, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_pipeline_stage_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_hubspot__ticket_pipeline_stage_tmp')),\n staging_columns=get_ticket_pipeline_stage_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n _fivetran_deleted as is_ticket_pipeline_stage_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n active as is_active,\n display_order,\n is_closed,\n label as pipeline_stage_label,\n cast(pipeline_id as {{ dbt.type_string() }}) as ticket_pipeline_id,\n cast(stage_id as {{ dbt.type_string() }}) as ticket_pipeline_stage_id,\n ticket_state,\n created_at as ticket_pipeline_stage_created_at,\n updated_at as ticket_pipeline_stage_updated_at\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_pipeline_stage_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_pipeline_stage_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_pipeline_stage_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_pipeline_stage.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n active as active,\n display_order as display_order,\n is_closed as is_closed,\n label as label,\n pipeline_id as pipeline_id,\n stage_id as stage_id,\n ticket_state as ticket_state,\n created_at as created_at,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n _fivetran_deleted as is_ticket_pipeline_stage_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n active as is_active,\n display_order,\n is_closed,\n label as pipeline_stage_label,\n cast(pipeline_id as TEXT) as ticket_pipeline_id,\n cast(stage_id as TEXT) as ticket_pipeline_stage_id,\n ticket_state,\n created_at as ticket_pipeline_stage_created_at,\n updated_at as ticket_pipeline_stage_updated_at\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_actor": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_actor.sql", "original_file_path": "models/staging/stg_hubspot__conversation_actor.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_actor", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_actor"], "alias": "stg_hubspot__conversation_actor", "checksum": {"name": "sha256", "checksum": "faeeb444377df9dada6679130cf999fea2c94234ca1c5c0d4404ce2b7fe092fd"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents an actor (user or contact) in HubSpot conversations.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "actor_id": {"name": "actor_id", "description": "Unique ID of the actor. The first letter corresponds with the type of actor (A- agent, B- bot, S- system, E- email, I- integration, L- customer agent).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "avatar": {"name": "avatar", "description": "URL of the actor's avatar image.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the actor (e.g., VISITOR, AGENT, BOT, SYSTEM).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.750905, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_actor_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_actor_tmp')),\n staging_columns=get_conversation_actor_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as actor_id,\n avatar,\n email,\n name,\n upper(type) as type\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_actor_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_actor_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_actor_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_actor_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_actor.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n id as id,\n avatar as avatar,\n email as email,\n name as name,\n type as type\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n id as actor_id,\n avatar,\n email,\n name,\n upper(type) as type\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list_member": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact_list_member.sql", "original_file_path": "models/staging/stg_hubspot__contact_list_member.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list_member", "fqn": ["hubspot", "staging", "stg_hubspot__contact_list_member"], "alias": "stg_hubspot__contact_list_member", "checksum": {"name": "sha256", "checksum": "a176018fc8d652b556f06e7d9e338c0b961227984d9f0b054d595837fe3ef0c7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a contact and a contact list.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_list_member_deleted": {"name": "is_contact_list_member_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "added_timestamp": {"name": "added_timestamp", "description": "The timestamp a contact was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the related contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.199363, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_list_member_tmp') }} \n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_list_member_tmp')),\n staging_columns=get_contact_list_member_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_contact_list_member_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(added_at as {{ dbt.type_timestamp() }}) as added_timestamp,\n contact_id,\n contact_list_id\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list_member_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_list_member_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_list_member_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__contact_list_member_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact_list_member.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member_tmp\" \n\n), macro as (\n\n select\n \n _fivetran_deleted as _fivetran_deleted,\n _fivetran_synced as _fivetran_synced,\n added_at as added_at,\n contact_id as contact_id,\n contact_list_id as contact_list_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_deleted as is_contact_list_member_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(added_at as timestamp) as added_timestamp,\n contact_id,\n contact_list_id\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_note": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_note.sql", "original_file_path": "models/staging/stg_hubspot__engagement_note.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_note", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_note"], "alias": "stg_hubspot__engagement_note", "checksum": {"name": "sha256", "checksum": "26c7e6e53c8040103d5c7fcc6c0634548d50e2bfae888cabbd81536bfbe74273"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a NOTE engagement event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "note": {"name": "note", "description": "The body of the note. The body has a limit of 65536 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the note's time of creation and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the note's time of occurrence and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the note. This field determines the user listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the note. This field determines the team listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_note_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2222426, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_note_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_note_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_note_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_note_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_note_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_note_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_note_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_note_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_note_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_note.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n cast(null as TEXT) as note,\n type as engagement_type,\n engagement_id as engagement_id,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n property_hubspot_owner_id as owner_id,\n property_hubspot_team_id as team_id\n \n \n \n \n \n \n \n\n \n \n , \"property_hs_body_preview\" as body_preview\n , \"property_hs_lastmodifieddate\" as lastmodifieddate\n , \"property_hs_note_body\" as note_body\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_call": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__engagement_call.sql", "original_file_path": "models/staging/stg_hubspot__engagement_call.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_call", "fqn": ["hubspot", "staging", "stg_hubspot__engagement_call"], "alias": "stg_hubspot__engagement_call", "checksum": {"name": "sha256", "checksum": "56c1ea835689014259d72c088a76494ad04a87307d335f363478a1c3b0f311bb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a CALL engagement event. All source `property_hs_*` fields", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_type": {"name": "engagement_type", "description": "The type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "occurred_timestamp": {"name": "occurred_timestamp", "description": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__engagement.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_call_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2153945, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_call_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__engagement_call_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__engagement_call_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_engagement_call_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_engagement_call_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_call_tmp", "package": null, "version": null}, {"name": "stg_hubspot__engagement_call_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_engagement_call_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__engagement_call_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement_call.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n engagement_id as engagement_id,\n type as engagement_type,\n property_hs_createdate as created_timestamp,\n property_hs_timestamp as occurred_timestamp,\n cast(null as integer) as owner_id,\n cast(null as integer) as team_id\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__submission_response": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__submission_response", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__submission_response.sql", "original_file_path": "models/staging/stg_hubspot__submission_response.sql", "unique_id": "model.hubspot.stg_hubspot__submission_response", "fqn": ["hubspot", "staging", "stg_hubspot__submission_response"], "alias": "stg_hubspot__submission_response", "checksum": {"name": "sha256", "checksum": "dfa5d224c46cd8fc5dd3ac0dad088a2d38a78dab9cce842e7cbb0c9903074348"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a single field response from a HubSpot form submission.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "conversion_id": {"name": "conversion_id", "description": "Unique identifier for the specific form conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The ID of the form the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_value": {"name": "field_value", "description": "The value submitted for the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submitted_at": {"name": "submitted_at", "description": "Unix timestamp in milliseconds of when the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submitted_timestamp": {"name": "submitted_timestamp", "description": "Timestamp of when the form was submitted, converted from the `submitted_at` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL of the page where the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the HubSpot object type associated with the submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__form.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1377878, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__submission_response_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__submission_response_tmp')),\n staging_columns=get_submission_response_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n conversion_id,\n form_id,\n field_name,\n field_value,\n submitted_at,\n {{ dbt.dateadd(datepart='millisecond',interval='submitted_at', from_date_or_timestamp=\"cast('1970-01-01' as \" ~ dbt.type_timestamp() ~ \")\") }} as submitted_timestamp,\n page_url,\n object_type_id,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__submission_response_tmp", "package": null, "version": null}, {"name": "stg_hubspot__submission_response_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_submission_response_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.dateadd"], "nodes": ["model.hubspot.stg_hubspot__submission_response_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__submission_response.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n conversion_id as conversion_id,\n form_id as form_id,\n field_name as field_name,\n field_value as field_value,\n submitted_at as submitted_at,\n page_url as page_url,\n object_type_id as object_type_id\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n conversion_id,\n form_id,\n field_name,\n field_value,\n submitted_at,\n \n\n cast('1970-01-01' as timestamp) + ((interval '1 millisecond') * (submitted_at))\n\n as submitted_timestamp,\n page_url,\n object_type_id,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__property.sql", "original_file_path": "models/staging/stg_hubspot__property.sql", "unique_id": "model.hubspot.stg_hubspot__property", "fqn": ["hubspot", "staging", "stg_hubspot__property"], "alias": "stg_hubspot__property", "checksum": {"name": "sha256", "checksum": "aac7e1bcc055095a809ae9f851f0b0a5c88c8c5355d105c5b12502d911b181f7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a property.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "(DEPRECATED IN OCTOBER 2025) Fivetran generated id. Joins to `property_id` (ALSO DEPRECATED) in the `PROPERTY_OPTION` table. Use `hubspot_object` to join to `PROPERTY_OPTION` instead.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "calculated": {"name": "calculated", "description": "Indicates if the property is calculated by a HubSpot process", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp representing when the property was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A description of the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_type": {"name": "field_type", "description": "One of textarea, text, date, file, number, select, radio, checkbox, or booleancheckbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "group_name": {"name": "group_name", "description": "The name of the property group that the property belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_defined": {"name": "hubspot_defined", "description": "This will be true for default properties that are built into HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this property is related to other objects, the object will be listed here. Part of the primary key with `property_name`. Use `hubspot_object` to join with the `PROPERTY_OPTION` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_label": {"name": "property_label", "description": "A human readable label for the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_name": {"name": "property_name", "description": "The internal name of the property. Part of the primary key with `hubspot_object`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_type": {"name": "property_type", "description": "One of string, number, date, datetime, or enumeration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp representing when the property was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__property.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7940848, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__property_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__property_tmp')),\n staging_columns=get_property_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_id,\n _fivetran_synced,\n calculated,\n created_at,\n description,\n field_type,\n group_name,\n hubspot_defined,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n label as property_label,\n name as property_name,\n type as property_type,\n updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__property_tmp", "package": null, "version": null}, {"name": "stg_hubspot__property_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_property_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__property_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__property.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__property_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n calculated as calculated,\n created_at as created_at,\n description as description,\n field_type as field_type,\n group_name as group_name,\n hubspot_defined as hubspot_defined,\n hubspot_object as hubspot_object,\n label as label,\n name as name,\n show_currency_symbol as show_currency_symbol,\n type as type,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n _fivetran_id,\n _fivetran_synced,\n calculated,\n created_at,\n description,\n field_type,\n group_name,\n hubspot_defined,\n lower(hubspot_object) as hubspot_object, -- should already be lower but just in case\n label as property_label,\n name as property_name,\n type as property_type,\n updated_at\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_engagement": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_engagement.sql", "original_file_path": "models/staging/stg_hubspot__ticket_engagement.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_engagement", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_engagement"], "alias": "stg_hubspot__ticket_engagement", "checksum": {"name": "sha256", "checksum": "e037aee69fa126e3a60d1f65170ff2c655664f3482b1df0605a6bac35634ae26"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and an engagement.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7832592, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_engagement_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_engagement_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_engagement_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_engagement_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_engagement_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_engagement_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_engagement_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_engagement_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_engagement.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n engagement_id as engagement_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_inbox": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__conversation_inbox.sql", "original_file_path": "models/staging/stg_hubspot__conversation_inbox.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_inbox", "fqn": ["hubspot", "staging", "stg_hubspot__conversation_inbox"], "alias": "stg_hubspot__conversation_inbox", "checksum": {"name": "sha256", "checksum": "f4602551f7ed788088c6a1222120c4dda5cb5f147d190069edd3bc6917d929e0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a conversation inbox in HubSpot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "inbox_id": {"name": "inbox_id", "description": "Unique ID of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_active": {"name": "is_active", "description": "Boolean indicating whether the inbox is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the inbox was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the inbox (e.g., HELP_DESK, INBOX).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the inbox was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__conversation.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.752018, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__conversation_inbox_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__conversation_inbox_tmp')),\n staging_columns=get_conversation_inbox_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as inbox_id,\n active as is_active,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n name,\n upper(type) as type,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_inbox_tmp", "package": null, "version": null}, {"name": "stg_hubspot__conversation_inbox_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_conversation_inbox_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__conversation_inbox_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation_inbox.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n _fivetran_deleted as _fivetran_deleted,\n id as id,\n active as active,\n created_at as created_at,\n name as name,\n type as type,\n updated_at as updated_at\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n _fivetran_deleted as is_deleted,\n id as inbox_id,\n active as is_active,\n cast(created_at as timestamp) as created_at,\n name,\n upper(type) as type,\n cast(updated_at as timestamp) as updated_at\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__contact.sql", "original_file_path": "models/staging/stg_hubspot__contact.sql", "unique_id": "model.hubspot.stg_hubspot__contact", "fqn": ["hubspot", "staging", "stg_hubspot__contact"], "alias": "stg_hubspot__contact", "checksum": {"name": "sha256", "checksum": "b759e986c5b0eb86ccea4b0d8380ffa0109cd008cb9f8d1adb02ed6f06e8e709"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a contact in Hubspot.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "is_contact_deleted": {"name": "is_contact_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "The email address of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_company": {"name": "contact_company", "description": "The name of the contact's company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_date": {"name": "created_date", "description": "The date that the contact was created in your HubSpot account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "job_title": {"name": "job_title", "description": "The contact's job title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_annual_revenue": {"name": "company_annual_revenue", "description": "The contact's annual company revenue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_object_ids": {"name": "merged_object_ids", "description": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__contact.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.2070768, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__contact_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_tmp')),\n staging_columns=get_contact_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n\n{% if var('hubspot__pass_through_all_columns', false) %}\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_tmp')),\n staging_columns=get_contact_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n {% if all_passthrough_column_check('stg_hubspot__contact_tmp',get_contact_columns()) > 0 %}\n -- just pass everything through if extra columns are present, but ensure required columns are present.\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_contact_columns()) %}\n {{ \n remove_duplicate_and_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref('stg_hubspot__contact_tmp')), \n prefix='property_', exclude=exclude_cols) \n }}\n {% endif %}\n from base\n\n{% else %}\n -- just default columns + explicitly configured passthrough columns.\n -- a few columns below are aliased within the macros/get_contact_columns.sql macro\n source_relation,\n contact_id,\n is_contact_deleted,\n cast(merged_object_ids as {{ dbt.type_string() }}) as merged_object_ids, -- using this field to merge contacts\n email,\n contact_company,\n first_name,\n last_name,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n job_title,\n company_annual_revenue,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n\n --The below macro adds the fields defined within your hubspot__contact_pass_through_columns variable into the staging model\n {{ fivetran_utils.fill_pass_through_columns('hubspot__contact_pass_through_columns') }}\n\n -- The below macro add the ability to create calculated fields using the hubspot__contact_calculated_fields variable.\n {{ fivetran_utils.calculated_fields('hubspot__contact_calculated_fields') }}\n\n from macro\n{% endif %} \n\n), joined as (\n {{ add_property_labels('hubspot__contact_pass_through_columns', cte_name='fields') }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_tmp", "package": null, "version": null}, {"name": "stg_hubspot__contact_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_contact_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns", "macro.fivetran_utils.calculated_fields", "macro.hubspot.add_property_labels"], "nodes": ["model.hubspot.stg_hubspot__contact_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_deleted as is_contact_deleted,\n _fivetran_synced as _fivetran_synced,\n id as contact_id,\n property_hs_merged_object_ids as merged_object_ids,\n property_email as email,\n property_company as contact_company,\n property_firstname as first_name,\n property_lastname as last_name,\n property_createdate as created_date,\n property_jobtitle as job_title,\n property_annualrevenue as company_annual_revenue\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n\n\n -- just default columns + explicitly configured passthrough columns.\n -- a few columns below are aliased within the macros/get_contact_columns.sql macro\n source_relation,\n contact_id,\n is_contact_deleted,\n cast(merged_object_ids as TEXT) as merged_object_ids, -- using this field to merge contacts\n email,\n contact_company,\n first_name,\n last_name,\n cast(created_date as timestamp) as created_date,\n job_title,\n company_annual_revenue,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n\n --The below macro adds the fields defined within your hubspot__contact_pass_through_columns variable into the staging model\n \n\n\n\n\n\n -- The below macro add the ability to create calculated fields using the hubspot__contact_calculated_fields variable.\n \n\n\n\n from macro\n \n\n), joined as (\n \n\nselect fields.*\n\nfrom fields\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_print": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__email_event_print.sql", "original_file_path": "models/staging/stg_hubspot__email_event_print.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_print", "fqn": ["hubspot", "staging", "stg_hubspot__email_event_print"], "alias": "stg_hubspot__email_event_print", "checksum": {"name": "sha256", "checksum": "79b75e64151e19992c5374e1b41b2487cfabd5e1e90e88befb69e0aadd302f20"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a PRINT email event.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "event_id": {"name": "event_id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "geo_location": {"name": "geo_location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__email.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_print_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.1511476, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_print_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__email_event_print_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__email_event_print_tmp')),\n staging_columns=get_email_event_print_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_print_tmp", "package": null, "version": null}, {"name": "stg_hubspot__email_event_print_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_email_event_print_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__email_event_print_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email_event_print.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print_tmp\"\n\n), macro as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n browser as browser,\n id as id,\n ip_address as ip_address,\n location as location,\n user_agent as user_agent\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n browser,\n id as event_id,\n ip_address,\n location as geo_location,\n user_agent\n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__deal_company.sql", "original_file_path": "models/staging/stg_hubspot__deal_company.sql", "unique_id": "model.hubspot.stg_hubspot__deal_company", "fqn": ["hubspot", "staging", "stg_hubspot__deal_company"], "alias": "stg_hubspot__deal_company", "checksum": {"name": "sha256", "checksum": "6b75ab746898087b668a8169c44431f3ebcc1db6431661e0674e299a7528884a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a deal and company.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__deal.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.8023262, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_company\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_company_enabled'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__deal_company_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_hubspot__deal_company_tmp')),\n staging_columns=get_deal_company_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n), fields as (\n\n select\n source_relation,\n company_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__deal_company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.hubspot.get_deal_company_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.hubspot.stg_hubspot__deal_company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal_company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_company_tmp\"\n\n), macro as (\n\n select\n \n cast(null as timestamp) as _fivetran_synced,\n deal_id as deal_id,\n company_id as company_id,\n type_id as type_id,\n category as category\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n), fields as (\n\n select\n source_relation,\n company_id,\n deal_id,\n type_id,\n category,\n cast(_fivetran_synced as timestamp) as _fivetran_synced\n \n from macro\n \n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_company": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company", "resource_type": "model", "package_name": "hubspot", "path": "staging/stg_hubspot__ticket_company.sql", "original_file_path": "models/staging/stg_hubspot__ticket_company.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_company", "fqn": ["hubspot", "staging", "stg_hubspot__ticket_company"], "alias": "stg_hubspot__ticket_company", "checksum": {"name": "sha256", "checksum": "c7a620e472f2d20f73d2ae48f9f354425eedb4b1aa8fbaab00730930dc499a68"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "Each record represents a 'link' between a ticket and company.", "columns": {"source_relation": {"name": "source_relation", "description": "Identifies the record's source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "hubspot://models/staging/stg_hubspot__ticket.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398589.7809136, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_hubspot__ticket_company_tmp') }}\n\n), macro as (\n\n select\n {% set default_cols = adapter.get_columns_in_relation(ref('stg_hubspot__ticket_company_tmp')) %}\n {% set exclude_cols = ['_dbt_source_relation'] + get_macro_columns(get_ticket_company_columns()) %}\n\n {% set new_cols = remove_duplicate_and_prefix_from_columns(columns=default_cols, \n prefix='property_hs_',exclude=exclude_cols) %}\n {{\n fivetran_utils.fill_staging_columns(source_columns=default_cols,\n staging_columns=get_ticket_company_columns()\n )\n }}\n {% if new_cols | length > 0 %}\n {{ new_cols }}\n {% endif %}\n {{ fivetran_utils.apply_source_relation(package_name='hubspot') }}\n from base\n\n)\n\nselect *\nfrom macro", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket_company_tmp", "package": null, "version": null}, {"name": "stg_hubspot__ticket_company_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.hubspot.get_ticket_company_columns", "macro.hubspot.get_macro_columns", "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.hubspot.stg_hubspot__ticket_company_tmp"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket_company.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company_tmp\"\n\n), macro as (\n\n select\n \n \n\n \n \n _fivetran_synced as _fivetran_synced,\n ticket_id as ticket_id,\n company_id as company_id,\n category as category\n \n \n \n \n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n\n)\n\nselect *\nfrom macro", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_deal_tmp"], "alias": "stg_hubspot__engagement_deal_tmp", "checksum": {"name": "sha256", "checksum": "e8fe954364c05e316783d3aac309f1bb3b20cc2bffeff51831a6755e8ba6d408"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.870962, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_deal_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_deal"], ["hubspot", "engagement_deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_deal_data\n\n\n select\n \"deal_id\",\n \"engagement_id\",\n \"engagement_type\",\n \"type_id\",\n \"_fivetran_synced\",\n \"category\"\n from \"postgres\".\"public\".\"engagement_deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_print_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_print_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_print_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_print_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_print_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_print_tmp"], "alias": "stg_hubspot__email_event_print_tmp", "checksum": {"name": "sha256", "checksum": "86fe026f50e3b8093870021f29b6abd5dc6b99b4f0a31b008bd4da49612dea34"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_print_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.8960383, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_print_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_print'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_print"], ["hubspot", "email_event_print"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_print"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_print_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_print_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_print_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"browser\",\n \"ip_address\",\n \"location\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_print_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_communication_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_communication_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_communication_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_communication_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_communication_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_communication_tmp"], "alias": "stg_hubspot__engagement_communication_tmp", "checksum": {"name": "sha256", "checksum": "f7a9ba47b8eb48e57741f74c1c97d2c6fb4b43cf858903409bffbb22b37b7e42"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.904555, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_communication'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_communication"], ["hubspot", "engagement_communication"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_communication_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_communication_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_communication_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_createdate\",\n \"property_hs_timestamp\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_communication_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_stage_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_pipeline_stage_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_pipeline_stage_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_pipeline_stage_tmp"], "alias": "stg_hubspot__ticket_pipeline_stage_tmp", "checksum": {"name": "sha256", "checksum": "407831fc4b5b3784abaf0be5c1b4c1477909397febad57dce7239aa5a913143e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.913505, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_stage_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_pipeline_stage'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_pipeline_stage"], ["hubspot", "ticket_pipeline_stage"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_pipeline_stage_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_pipeline_stage_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_pipeline_stage_data\n\n\n select\n \"stage_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"display_order\",\n \"is_closed\",\n \"label\",\n \"pipeline_id\",\n \"ticket_state\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"ticket_pipeline_stage_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_email_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_email_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_email_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_email_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_email_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_email_tmp"], "alias": "stg_hubspot__engagement_email_tmp", "checksum": {"name": "sha256", "checksum": "ad76ee3b305df539a6721dcbe6f8ef58aca246ce0e293d5047cb15c6761d4210"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_email_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.921373, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_email_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_email'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_email"], ["hubspot", "engagement_email"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_email"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_email_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_email_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_email_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_all_owner_ids\",\n \"property_hs_all_team_ids\",\n \"property_hs_createdate\",\n \"property_hs_email_subject\",\n \"property_hs_email_text\",\n \"property_hs_lastmodifieddate\",\n \"property_hs_modified_by\",\n \"property_hs_timestamp\",\n \"property_hubspot_owner_id\",\n \"property_hubspot_team_id\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_email_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_tmp"], "alias": "stg_hubspot__engagement_tmp", "checksum": {"name": "sha256", "checksum": "43baf350a8646a7a28ae217e6e6b13410b4bfb50cade22558d25aeca2a3484d4"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9306185, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement"], ["hubspot", "engagement"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_data\n\n\n select\n \"id\",\n \"type\",\n \"_fivetran_synced\",\n \"portal_id\"\n from \"postgres\".\"public\".\"engagement_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_click_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_click_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_click_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_click_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_click_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_click_tmp"], "alias": "stg_hubspot__email_event_click_tmp", "checksum": {"name": "sha256", "checksum": "82f14ba1ee61c4ebdc50beaa22ee2f0e43bc1dfe9c252a22adb1694f98277023"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_click_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.938962, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_click_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_click'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_click"], ["hubspot", "email_event_click"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_click"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_click_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_click_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_click_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"referer\",\n \"browser\",\n \"location\",\n \"ip_address\",\n \"url\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_click_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_property_history_tmp"], "alias": "stg_hubspot__company_property_history_tmp", "checksum": {"name": "sha256", "checksum": "849bdc99781ae20cfee3dab7ae5e8c88a5f24fa8d3899e2b1bab7359072a6aa8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9475098, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_property_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled','hubspot_company_property_history_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company_property_history"], ["hubspot", "company_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_property_history_data\n\n\n select\n \"company_id\",\n \"timestamp\",\n \"_fivetran_synced\",\n \"source\",\n \"source_id\",\n \"name\",\n \"value\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"company_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_thread_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_thread_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_thread_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_thread_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_thread_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_thread_tmp"], "alias": "stg_hubspot__conversation_thread_tmp", "checksum": {"name": "sha256", "checksum": "fac0696e0385f702058d15fd50acaa67a98f1fbbb5420f517ac3d8722e96ea00"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9559734, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_thread'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_thread"], ["hubspot", "conversation_thread"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_thread"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_thread_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_thread_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_thread_data\n\n\n select\n \"id\",\n \"inbox_id\",\n \"associated_contact_id\",\n \"associated_ticket_id\",\n \"original_channel_account_id\",\n \"original_channel_id\",\n \"assigned_to\",\n \"closed_at\",\n \"created_at\",\n \"latest_message_received_timestamp\",\n \"latest_message_sent_timestamp\",\n \"latest_message_timestamp\",\n \"spam\",\n \"status\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_thread_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_list_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_list_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_list_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_list_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_list_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_list_tmp"], "alias": "stg_hubspot__marketing_event_list_tmp", "checksum": {"name": "sha256", "checksum": "12324c06124c2dbcb6f92e66bda757c7bd86ad98d3a20fe6c7c10ef78b1b1c1b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_list_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9640543, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_list_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event_list'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event_list"], ["hubspot", "marketing_event_list"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_list_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_list_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_list_data\n\n\n select\n \"id\",\n \"marketing_event_id\",\n \"created_by_id\",\n \"updated_by_id\",\n \"filters_updated_at\",\n \"created_at\",\n \"processing_status\",\n \"deleted_at\",\n \"list_version\",\n \"object_type_id\",\n \"size\",\n \"name\",\n \"updated_at\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_list_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_pipeline_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_pipeline_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_pipeline_tmp"], "alias": "stg_hubspot__deal_pipeline_tmp", "checksum": {"name": "sha256", "checksum": "d3f756b87cda3fc4cb9a05c04cbc7a1ab59561104efa877a9aa9a2c10205e3c8"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9729245, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_pipeline'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_pipeline"], ["hubspot", "deal_pipeline"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_pipeline_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_pipeline_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_pipeline_data\n\n\n select\n \"pipeline_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"display_order\",\n \"label\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"deal_pipeline_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__merged_deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__merged_deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__merged_deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__merged_deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__merged_deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__merged_deal_tmp"], "alias": "stg_hubspot__merged_deal_tmp", "checksum": {"name": "sha256", "checksum": "114faac6792c12abaf9c0652350fac34d524bce44187b37c1d41a7cb0cb8df04"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9814456, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled']) and var('hubspot_merged_deal_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='merged_deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "merged_deal"], ["hubspot", "merged_deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.merged_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__merged_deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_merged_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: merged_deal_data\n\n\n select\n \"deal_id\",\n \"merged_deal_id\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"merged_deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel_account_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_account_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_channel_account_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_channel_account_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel_account_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_channel_account_tmp"], "alias": "stg_hubspot__conversation_channel_account_tmp", "checksum": {"name": "sha256", "checksum": "65f90fcdaf5c0f9158dc17cc5784e3da8c572ea13ae73b253cb6b9711f90d882"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9905336, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_channel_account'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_channel_account"], ["hubspot", "conversation_channel_account"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_channel_account"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_channel_account_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_channel_account_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_channel_account_data\n\n\n select\n \"id\",\n \"channel_id\",\n \"inbox_id\",\n \"active\",\n \"authorized\",\n \"created_at\",\n \"name\",\n \"delivery_identifier_type\",\n \"delivery_identifier_value\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_channel_account_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_contact_tmp"], "alias": "stg_hubspot__deal_contact_tmp", "checksum": {"name": "sha256", "checksum": "f4cc39640f724550c34c01fb7bcd40024697aad8d9313c11cabf8b7681a6684b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398587.9990826, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_contact_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_contact_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_contact"], ["hubspot", "deal_contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_contact_data\n\n\n select\n \"contact_id\",\n \"deal_id\",\n \"_fivetran_synced\",\n \"type_id\",\n \"category\"\n from \"postgres\".\"public\".\"deal_contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_company_tmp"], "alias": "stg_hubspot__deal_company_tmp", "checksum": {"name": "sha256", "checksum": "6f6cc82e357546e0d7ad70beb98711c22e3e439e8b06d5412877f24de4d96629"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0076246, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_company_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_company_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_company"], ["hubspot", "deal_company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_company_data\n\n\n select\n \"company_id\",\n \"deal_id\",\n \"type_id\",\n \"category\"\n from \"postgres\".\"public\".\"deal_company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__role_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__role_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__role_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__role_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__role_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__role_tmp"], "alias": "stg_hubspot__role_tmp", "checksum": {"name": "sha256", "checksum": "ec17dc857f1373950abfb505988bf6d9bf71855273a9e22276d065e7685e61e3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0159473, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__role_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='role'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "role"], ["hubspot", "role"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.role"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__role_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_role_identifier\n -- database: postgres \n -- schema: public\n -- identifier: role_data\n\n\n select\n \"id\",\n \"name\",\n \"requires_billing_write\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"role_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_participant_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_participant_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_participant_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_participant_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_participant_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_participant_tmp"], "alias": "stg_hubspot__marketing_event_participant_tmp", "checksum": {"name": "sha256", "checksum": "da10f463771c9c0dc2123a70a46ed8ead3bc1ad402ab224616f6cfb2e40f191d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_participant_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0242531, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_participant_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event_participant'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event_participant"], ["hubspot", "marketing_event_participant"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event_participant"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_participant_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_participant_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_participant_data\n\n\n select\n \"id\",\n \"marketing_event_id\",\n \"contact_id\",\n \"created_at\",\n \"properties_occurred_at\",\n \"properties_attendance_percentage\",\n \"properties_attendance_state\",\n \"properties_attendance_duration_seconds\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_participant_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_engagement_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_engagement_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_engagement_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_engagement_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_engagement_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_engagement_tmp"], "alias": "stg_hubspot__ticket_engagement_tmp", "checksum": {"name": "sha256", "checksum": "9f0e02363af755fe5278720faa76f8270f10aeae3f21c895901e8af6dd57b218"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.033271, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_engagement_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_engagement'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_engagement"], ["hubspot", "ticket_engagement"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_engagement"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_engagement_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_engagement_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_engagement_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"engagement_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_engagement_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_form_submission_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_form_submission_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_form_submission_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_form_submission_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_form_submission_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_form_submission_tmp"], "alias": "stg_hubspot__contact_form_submission_tmp", "checksum": {"name": "sha256", "checksum": "a6af6c18e065285a47f7428e34b5511878c36861b7aba77b37bb80316367754a"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0413423, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_form_submission_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_form_submission'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_form_submission"], ["hubspot", "contact_form_submission"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_form_submission"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_form_submission_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_form_submission_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_form_submission_data\n\n\n select\n \"timestamp\",\n \"form_id\",\n \"contact_id\",\n \"conversion_id\",\n \"page_id\",\n \"page_url\",\n \"portal_id\",\n \"title\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"contact_form_submission_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_tmp"], "alias": "stg_hubspot__marketing_event_tmp", "checksum": {"name": "sha256", "checksum": "98fb2f6a2bb7df828a73a7809b646e597976d2e0f3492a65eaf31ad0ca77c77b"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0508056, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event"], ["hubspot", "marketing_event"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_data\n\n\n select\n \"id\",\n \"app_id\",\n \"app_name\",\n \"attendees\",\n \"cancellations\",\n \"created_at\",\n \"end_date_time\",\n \"event_cancelled\",\n \"event_completed\",\n \"event_description\",\n \"event_name\",\n \"event_organizer\",\n \"event_status\",\n \"event_type\",\n \"event_url\",\n \"external_event_id\",\n \"no_shows\",\n \"registrants\",\n \"start_date_time\",\n \"updated_at\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_message_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_message_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_message_history_tmp"], "alias": "stg_hubspot__conversation_message_history_tmp", "checksum": {"name": "sha256", "checksum": "b471ef84700edda942f5078bc50eef52729cbe6a7fc45b7facc79c9899d565eb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0592346, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_message_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_message_history"], ["hubspot", "conversation_message_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_message_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_message_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_message_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_message_history_data\n\n\n select\n \"id\",\n \"thread_id\",\n \"channel_account_id\",\n \"channel_id\",\n \"from_inbox_id\",\n \"to_inbox_id\",\n \"assigned_to\",\n \"assigned_from\",\n \"created_at\",\n \"created_by\",\n \"direction\",\n \"in_reply_to_id\",\n \"new_status\",\n \"rich_text\",\n \"subject\",\n \"text\",\n \"truncation_status\",\n \"type\",\n \"updated_at\",\n \"client_type\",\n \"status_type\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"conversation_message_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_call_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_call_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_call_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_call_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_call_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_call_tmp"], "alias": "stg_hubspot__engagement_call_tmp", "checksum": {"name": "sha256", "checksum": "3aef1f3c5ec606598957d13de131aeeebe7768cc9189d2c0f45cdef7148b6aa2"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_call_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0671806, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_call_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_call'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_call"], ["hubspot", "engagement_call"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_call"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_call_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_call_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_call_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_createdate\",\n \"property_hs_timestamp\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_call_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_deal_tmp"], "alias": "stg_hubspot__ticket_deal_tmp", "checksum": {"name": "sha256", "checksum": "d675322f483225022a3b77e3e847a6d203943c232b907d10dad53e77fa1979c6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False) and var('hubspot_ticket_deal_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.075569, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_deal_tmp\"", "raw_code": "{{ config(enabled=(var('hubspot_service_enabled', false) and var('hubspot_ticket_deal_enabled', false))) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_deal"], ["hubspot", "ticket_deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_deal_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"deal_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list_member_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list_member_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_list_member_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_list_member_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_list_member_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_list_member_tmp"], "alias": "stg_hubspot__company_list_member_tmp", "checksum": {"name": "sha256", "checksum": "4a0883ef68d7afe74309c32fc4a1bc173bd20908c614a68d11777bf642afd368"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0841835, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_member_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_member_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company_list_member'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company_list_member"], ["hubspot", "company_list_member"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company_list_member"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_list_member_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_list_member_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_list_member_data\n\n\n select\n \"company_id\",\n \"company_list_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"added_at\"\n from \"postgres\".\"public\".\"company_list_member_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_note_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_note_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_note_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_note_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_note_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_note_tmp"], "alias": "stg_hubspot__engagement_note_tmp", "checksum": {"name": "sha256", "checksum": "bc69a7ebfdf8a421cbf7e30c02f44b78b7ec838c2b9f718094a4fbf37c31783d"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_note_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.0927563, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_note_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_note'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_note"], ["hubspot", "engagement_note"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_note"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_note_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_note_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_note_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_body_preview\",\n \"property_hs_createdate\",\n \"property_hs_lastmodifieddate\",\n \"property_hs_note_body\",\n \"property_hs_timestamp\",\n \"property_hubspot_owner_id\",\n \"property_hubspot_team_id\",\n \"type\"\n from \"postgres\".\"public\".\"engagement_note_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_inbox_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_inbox_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_inbox_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_inbox_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_inbox_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_inbox_tmp"], "alias": "stg_hubspot__conversation_inbox_tmp", "checksum": {"name": "sha256", "checksum": "bcb810382efcdae23134cfbcecff2694f64e18f823f345c1775178ecbb9fdaf3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1012878, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_inbox'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_inbox"], ["hubspot", "conversation_inbox"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_inbox"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_inbox_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_inbox_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_inbox_data\n\n\n select\n \"id\",\n \"active\",\n \"created_at\",\n \"name\",\n \"type\",\n \"updated_at\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_inbox_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_contact_tmp"], "alias": "stg_hubspot__ticket_contact_tmp", "checksum": {"name": "sha256", "checksum": "e783c7fdd45189cdbb695f42e935d2096e3c275a34f99e407d28e1343f4d2948"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1092463, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_contact_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_contact"], ["hubspot", "ticket_contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_contact_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"contact_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_pipeline_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_pipeline_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_pipeline_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_pipeline_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_pipeline_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_pipeline_tmp"], "alias": "stg_hubspot__ticket_pipeline_tmp", "checksum": {"name": "sha256", "checksum": "2b2eb318f06552c90972b169e071eb7662b238075aede7944f5f0e2ac904b8fc"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1173892, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_pipeline_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_pipeline'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_pipeline"], ["hubspot", "ticket_pipeline"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_pipeline_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_pipeline_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_pipeline_data\n\n\n select\n \"pipeline_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"display_order\",\n \"label\",\n \"object_type_id\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"ticket_pipeline_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_open_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_open_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_open_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_open_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_open_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_open_tmp"], "alias": "stg_hubspot__email_event_open_tmp", "checksum": {"name": "sha256", "checksum": "1ffff7f296f0b19a5efe5aafddce47ec0e827cf85cf6b2d0907da043f80170af"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_open_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1255076, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_open_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_open'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_open"], ["hubspot", "email_event_open"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_open"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_open_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_open_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_open_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"duration\",\n \"browser\",\n \"ip_address\",\n \"location\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_open_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_tmp"], "alias": "stg_hubspot__company_tmp", "checksum": {"name": "sha256", "checksum": "55ed7f7f30880b56c358ff164ad46129da886260cc6ef5e8da94b2c9dfa3c34c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.133919, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_company_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company"], ["hubspot", "company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_data\n\n\n select\n \"id\",\n \"is_deleted\",\n \"_fivetran_synced\",\n \"property_name\",\n \"property_description\",\n \"property_createdate\",\n \"property_industry\",\n \"property_address\",\n \"property_address_2\",\n \"property_city\",\n \"property_state\",\n \"property_country\",\n \"property_annualrevenue\",\n \"property_hs_all-funky-a9384-syntax\"\n from \"postgres\".\"public\".\"company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_stage_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_stage_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_stage_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_stage_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_stage_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_stage_tmp"], "alias": "stg_hubspot__deal_stage_tmp", "checksum": {"name": "sha256", "checksum": "6427b897d438ebdf0a1680f85dd5b2ecac4c6275fe50cbc3a328e5916ea01788"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1423664, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_stage_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_stage'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_stage"], ["hubspot", "deal_stage"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_stage_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_stage_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_stage_data\n\n\n select\n \"_fivetran_start\",\n \"deal_id\",\n \"_fivetran_active\",\n \"_fivetran_end\",\n \"_fivetran_synced\",\n \"date_entered\",\n \"source\",\n \"source_id\",\n \"value\"\n from \"postgres\".\"public\".\"deal_stage_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_tmp"], "alias": "stg_hubspot__deal_tmp", "checksum": {"name": "sha256", "checksum": "832978a45c22d72dc41e9ec2c9d102d41379c00b17c6faedf72942619900a2e9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.150481, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal"], ["hubspot", "deal"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_data\n\n\n select\n \"deal_id\",\n \"is_deleted\",\n \"deal_pipeline_id\",\n \"deal_pipeline_stage_id\",\n \"owner_id\",\n \"portal_id\",\n \"property_dealname\",\n \"property_description\",\n \"property_amount\",\n \"property_closedate\",\n \"property_createdate\"\n from \"postgres\".\"public\".\"deal_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_channel_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_channel_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_channel_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_channel_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_channel_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_channel_tmp"], "alias": "stg_hubspot__conversation_channel_tmp", "checksum": {"name": "sha256", "checksum": "f2b1fc8aa99e949c40495b60da2ed7b6de2d75d8dd471da757f849e931081ce3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1587665, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_channel'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_channel"], ["hubspot", "conversation_channel"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_channel"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_channel_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_channel_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_channel_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_channel_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_delivered_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_delivered_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_delivered_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_delivered_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_delivered_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_delivered_tmp"], "alias": "stg_hubspot__email_event_delivered_tmp", "checksum": {"name": "sha256", "checksum": "3275a1d5c6314d9ccd0d45ec84d178beae5c5ccfbb6a274033bbd3816f1f31b6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_delivered_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1668575, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_delivered_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_delivered'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_delivered"], ["hubspot", "email_event_delivered"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_delivered"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_delivered_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_delivered_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_delivered_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"response\",\n \"smtp_id\"\n from \"postgres\".\"public\".\"email_event_delivered_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property_option_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property_option_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__property_option_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__property_option_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__property_option_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__property_option_tmp"], "alias": "stg_hubspot__property_option_tmp", "checksum": {"name": "sha256", "checksum": "c6623e478eb98eb7ae8f2a7d118816087de4341a8195ca5825b6fba27d618901"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1761813, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property_option_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='property_option'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "property_option"], ["hubspot", "property_option"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.property_option"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__property_option_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_property_option_identifier\n -- database: postgres \n -- schema: public\n -- identifier: property_option_data\n\n\n select\n \"label\",\n \"property_id\",\n \"_fivetran_synced\",\n \"display_order\",\n \"hidden\",\n \"value\",\n \"hubspot_object\",\n \"name\"\n from \"postgres\".\"public\".\"property_option_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_sent_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_sent_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_sent_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_sent_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_sent_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_sent_tmp"], "alias": "stg_hubspot__email_event_sent_tmp", "checksum": {"name": "sha256", "checksum": "e759682718a60625abbb2f0ba1b301ac8094003021f2300f9f4095ff9b69d612"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_sent_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.184406, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_sent_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_sent'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_sent"], ["hubspot", "email_event_sent"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_sent"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_sent_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_sent_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_sent_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"bcc\",\n \"cc\",\n \"from\",\n \"reply_to\",\n \"subject\"\n from \"postgres\".\"public\".\"email_event_sent_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__property_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__property_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__property_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__property_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__property_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__property_tmp"], "alias": "stg_hubspot__property_tmp", "checksum": {"name": "sha256", "checksum": "d72f385a3b0df3ac494b050e08eb1318e33e6b585180dd94ecfa13cb43f3e74e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.1928616, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__property_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_property_enabled', True)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='property'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "property"], ["hubspot", "property"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.property"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__property_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_property_identifier\n -- database: postgres \n -- schema: public\n -- identifier: property_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"calculated\",\n \"created_at\",\n \"description\",\n \"field_type\",\n \"group_name\",\n \"hubspot_defined\",\n \"hubspot_object\",\n \"label\",\n \"name\",\n \"show_currency_symbol\",\n \"type\",\n \"updated_at\"\n from \"postgres\".\"public\".\"property_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_tmp"], "alias": "stg_hubspot__ticket_tmp", "checksum": {"name": "sha256", "checksum": "59ee5b779d4d415a3f11e588fc0fce82a67fa2e484206450ff05a25f2d713751"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2009869, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket"], ["hubspot", "ticket"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_data\n\n\n select\n \"_fivetran_synced\",\n \"id\",\n \"is_deleted\",\n \"property_closed_date\",\n \"property_createdate\",\n \"property_first_agent_reply_date\",\n \"property_hs_pipeline\",\n \"property_hs_pipeline_stage\",\n \"property_hs_ticket_category\",\n \"property_hs_ticket_priority\",\n \"property_hubspot_owner_id\",\n \"property_subject\",\n \"property_content\"\n from \"postgres\".\"public\".\"ticket_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_meeting_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_meeting_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_meeting_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_meeting_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_meeting_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_meeting_tmp"], "alias": "stg_hubspot__engagement_meeting_tmp", "checksum": {"name": "sha256", "checksum": "2513acf365ad94d47300fe36ceee819b577bb0d0c681b71bfb62452f82149a53"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_meeting_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2094681, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_meeting_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_meeting'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_meeting"], ["hubspot", "engagement_meeting"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_meeting"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_meeting_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_meeting_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_meeting_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_synced\",\n \"created_from_link_id\",\n \"end_time\",\n \"pre_meeting_prospect_reminders\",\n \"source\",\n \"source_id\",\n \"start_time\",\n \"web_conference_meeting_id\",\n \"meeting_outcome\",\n \"body\",\n \"external_url\",\n \"title\"\n from \"postgres\".\"public\".\"engagement_meeting_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_deferred_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_deferred_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_deferred_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_deferred_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_deferred_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_deferred_tmp"], "alias": "stg_hubspot__email_event_deferred_tmp", "checksum": {"name": "sha256", "checksum": "b8d3b04d270d6cdc08bf3b7e2a66217208dfb0d70f4e4dcc64f6c747229cd962"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_deferred_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2181695, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_deferred_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_deferred'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_deferred"], ["hubspot", "email_event_deferred"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_deferred"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_deferred_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_deferred_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_deferred_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"attempt\",\n \"response\"\n from \"postgres\".\"public\".\"email_event_deferred_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_property_history_tmp"], "alias": "stg_hubspot__contact_property_history_tmp", "checksum": {"name": "sha256", "checksum": "43d6741566a336e312b3b3a4b34a1174a5a360f8f3beb7e2eead4899d3c4b6c9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2270012, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_property_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_property_history"], ["hubspot", "contact_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_property_history_data\n\n\n select\n \"contact_id\",\n \"timestamp\",\n \"_fivetran_synced\",\n \"source\",\n \"name\",\n \"value\",\n \"source_id\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"contact_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_company_tmp"], "alias": "stg_hubspot__ticket_company_tmp", "checksum": {"name": "sha256", "checksum": "9c45f8bc1140173eccaa15cda4e34667b41d5dd370cc06bc5bc39a2e655a128c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2358096, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_company_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_company"], ["hubspot", "ticket_company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_company_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"company_id\",\n \"category\"\n from \"postgres\".\"public\".\"ticket_company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_status_change_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_status_change_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_status_change_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_status_change_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_status_change_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_status_change_tmp"], "alias": "stg_hubspot__email_event_status_change_tmp", "checksum": {"name": "sha256", "checksum": "fc8678808b62f257fdb4da8d956b66ba16536da2551fc7227b464163683633b1"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_status_change_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2441146, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_status_change'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_status_change"], ["hubspot", "email_event_status_change"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_status_change_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_status_change_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_status_change_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"bounced\",\n \"portal_subscription_status\",\n \"requested_by\",\n \"source\",\n \"subscriptions\"\n from \"postgres\".\"public\".\"email_event_status_change_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_merge_audit_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_merge_audit_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_merge_audit_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_merge_audit_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_merge_audit_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_merge_audit_tmp"], "alias": "stg_hubspot__contact_merge_audit_tmp", "checksum": {"name": "sha256", "checksum": "fd7acf48a3fe7dfbf82fd4dca35b574d0ba1a028b79318a9ff5829595c675ed7"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_contact_merge_audit_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2526712, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_merge_audit_tmp\"", "raw_code": "{{ config(enabled=(var('hubspot_marketing_enabled', true) and var('hubspot_contact_merge_audit_enabled', false))) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_merge_audit'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_merge_audit"], ["hubspot", "contact_merge_audit"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_merge_audit"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_merge_audit_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_merge_audit_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_merge_audit_data\n\n\n select\n \"canonical_vid\",\n \"contact_id\",\n \"vid_to_merge\",\n \"_fivetran_synced\",\n \"entity_id\",\n \"first_name\",\n \"last_name\",\n \"num_properties_moved\",\n \"timestamp\",\n \"user_id\"\n from \"postgres\".\"public\".\"contact_merge_audit_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_list_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_list_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_list_tmp"], "alias": "stg_hubspot__contact_list_tmp", "checksum": {"name": "sha256", "checksum": "f8b3df675d1db3217b35e7c15b31bd7d51e62bed698c77eaa89e2e0602c7b9b9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.261309, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_list'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_list"], ["hubspot", "contact_list"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_list_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_list_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_list_data\n\n\n select\n \"id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"created_at\",\n \"updated_at\",\n \"name\",\n \"created_by_id\",\n \"object_type_id\",\n \"processing_status\",\n \"processing_type\",\n \"list_version\",\n \"filters_updated_at\",\n \"custom_field\"\n from \"postgres\".\"public\".\"contact_list_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_actor_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_actor_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_actor_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_actor_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_actor_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_actor_tmp"], "alias": "stg_hubspot__conversation_actor_tmp", "checksum": {"name": "sha256", "checksum": "fa722eb4821c49a39e06261872f8ca7a5b926200bf5e4bd3915a357c1ef89fe0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.2696216, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_actor'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_actor"], ["hubspot", "conversation_actor"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_actor"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_actor_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_actor_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_actor_data\n\n\n select\n \"id\",\n \"avatar\",\n \"email\",\n \"name\",\n \"type\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_actor_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_tmp"], "alias": "stg_hubspot__email_event_tmp", "checksum": {"name": "sha256", "checksum": "0d06ffe9ab7ed1d6fbacbbf707b45bbc7eeb2e44e549b8bfe63e9fd50d84692e"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.277694, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event"], ["hubspot", "email_event"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"app_id\",\n \"caused_by_created\",\n \"caused_by_id\",\n \"created\",\n \"email_campaign_id\",\n \"obsoleted_by_created\",\n \"obsoleted_by_id\",\n \"portal_id\",\n \"sent_by_created\",\n \"sent_by_id\",\n \"type\",\n \"filtered_event\",\n \"recipient\"\n from \"postgres\".\"public\".\"email_event_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_pipeline_stage_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_pipeline_stage_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_pipeline_stage_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_pipeline_stage_tmp"], "alias": "stg_hubspot__deal_pipeline_stage_tmp", "checksum": {"name": "sha256", "checksum": "607c3e3828b148170af9e8d07013eb9eab7b519aaec76a167ce2638201bb9827"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.286004, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_pipeline_stage'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_pipeline_stage"], ["hubspot", "deal_pipeline_stage"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_pipeline_stage_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_pipeline_stage_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_pipeline_stage_data\n\n\n select\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"active\",\n \"closed_won\",\n \"is_closed\",\n \"display_order\",\n \"probability\",\n \"stage_id\",\n \"label\",\n \"pipeline_id\",\n \"created_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"deal_pipeline_stage_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_campaign_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_campaign_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_campaign_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_campaign_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_campaign_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_campaign_tmp"], "alias": "stg_hubspot__email_campaign_tmp", "checksum": {"name": "sha256", "checksum": "bde16718bff3684b9d59975c313f335f4528c0b84d22f0adf20ecbbbf2a6ec67"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.29412, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_campaign'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_campaign"], ["hubspot", "email_campaign"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_campaign"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_campaign_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_campaign_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_campaign_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"app_id\",\n \"content_id\",\n \"num_included\",\n \"num_queued\",\n \"sub_type\",\n \"type\",\n \"app_name\",\n \"name\",\n \"subject\"\n from \"postgres\".\"public\".\"email_campaign_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team_user_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team_user_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__team_user_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__team_user_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__team_user_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__team_user_tmp"], "alias": "stg_hubspot__team_user_tmp", "checksum": {"name": "sha256", "checksum": "03d010e98d51384e71be913a735cce89a4092bf24a3df82cadcfec1d5e9cf277"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3034875, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team_user_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled', 'hubspot_team_user_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='team_user'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "team_user"], ["hubspot", "team_user"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.team_user"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__team_user_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_team_user_identifier\n -- database: postgres \n -- schema: public\n -- identifier: team_user_data\n\n\n select\n \"user_id\",\n \"team_id\",\n \"is_secondary_user\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"team_user_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_company_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_company_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_company_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_company_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_company_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_company_tmp"], "alias": "stg_hubspot__engagement_company_tmp", "checksum": {"name": "sha256", "checksum": "9b43e4143e530556e9b48f7dabd528376c9d701c6d68319095533c6ca132654c"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_company_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3117232, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_company_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_company_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_company'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_company"], ["hubspot", "engagement_company"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_company"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_company_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_company_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_company_data\n\n\n select\n \"company_id\",\n \"engagement_id\",\n \"engagement_type\",\n \"type_id\",\n \"_fivetran_synced\",\n \"category\"\n from \"postgres\".\"public\".\"engagement_company_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__marketing_event_custom_property_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__marketing_event_custom_property_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__marketing_event_custom_property_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__marketing_event_custom_property_tmp"], "alias": "stg_hubspot__marketing_event_custom_property_tmp", "checksum": {"name": "sha256", "checksum": "8e5295986c4cce18266020fd68626c70c7aded8fe7922a55ea25a7115e310270"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True) and var('hubspot_marketing_event_custom_property_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3200734, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_custom_property_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true) and var('hubspot_marketing_event_custom_property_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='marketing_event_custom_property'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "marketing_event_custom_property"], ["hubspot", "marketing_event_custom_property"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.marketing_event_custom_property"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__marketing_event_custom_property_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_marketing_event_custom_property_identifier\n -- database: postgres \n -- schema: public\n -- identifier: marketing_event_custom_property_data\n\n\n select\n \"marketing_event_id\",\n \"name\",\n \"value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"marketing_event_custom_property_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner_team_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner_team_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__owner_team_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__owner_team_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__owner_team_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__owner_team_tmp"], "alias": "stg_hubspot__owner_team_tmp", "checksum": {"name": "sha256", "checksum": "e846c4ad7a2dffab89f21bc5d8fd8ad8ae490767d4ed645ba81359fe1750a0e3"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3290496, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner_team_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='owner_team'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "owner_team"], ["hubspot", "owner_team"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.owner_team"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__owner_team_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_owner_team_identifier\n -- database: postgres \n -- schema: public\n -- identifier: owner_team_data\n\n\n select\n \"owner_id\",\n \"team_id\",\n \"is_team_primary\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"owner_team_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_forward_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_forward_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_forward_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_forward_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_forward_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_forward_tmp"], "alias": "stg_hubspot__email_event_forward_tmp", "checksum": {"name": "sha256", "checksum": "7c1387311f54b533a9bce9294ff52157c82253f3824b60bbdbbfec87016bd9a6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_forward_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3373058, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_forward_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_forward'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_forward"], ["hubspot", "email_event_forward"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_forward"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_forward_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_forward_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_forward_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"browser\",\n \"ip_address\",\n \"location\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_forward_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_dropped_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_dropped_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_dropped_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_dropped_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_dropped_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_dropped_tmp"], "alias": "stg_hubspot__email_event_dropped_tmp", "checksum": {"name": "sha256", "checksum": "e4da8b77851bf0c81eea80284ee3fdee8365fe43e90fa743b3244477a15f2ddf"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_dropped_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3456366, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_dropped_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_dropped'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_dropped"], ["hubspot", "email_event_dropped"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_dropped"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_dropped_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_dropped_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_dropped_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"drop_reason\",\n \"bcc\",\n \"cc\",\n \"drop_message\",\n \"from\",\n \"reply_to\",\n \"subject\"\n from \"postgres\".\"public\".\"email_event_dropped_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__team_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__team_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__team_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__team_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__team_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__team_tmp"], "alias": "stg_hubspot__team_tmp", "checksum": {"name": "sha256", "checksum": "dc39a222b4e9a3af3c3417fcc3b46b02e2a361080ef36113bf3f46735562b8d6"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_team_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3541703, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__team_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_team_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='team'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "team"], ["hubspot", "team"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.team"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__team_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_team_identifier\n -- database: postgres \n -- schema: public\n -- identifier: team_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"team_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__users_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__users_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__users_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__users_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__users_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__users_tmp"], "alias": "stg_hubspot__users_tmp", "checksum": {"name": "sha256", "checksum": "3f0f4bc069efa31265b26805e16bb7aec2f22d4596abfc1cef14848760823b64"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_role_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3624008, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__users_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_role_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='users'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "users"], ["hubspot", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.users"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__users_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_users_identifier\n -- database: postgres \n -- schema: public\n -- identifier: users_data\n\n\n select\n \"id\",\n \"primary_team_id\",\n \"role_id\",\n \"email\",\n \"first_name\",\n \"last_name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"users_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_task_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_task_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_task_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_task_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_task_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_task_tmp"], "alias": "stg_hubspot__engagement_task_tmp", "checksum": {"name": "sha256", "checksum": "e0defe8ab71be43e2345bf3d62de3ce473035a6898e13e36c0aa60987bfe8ad9"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_task_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3705673, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_task_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_task'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_task"], ["hubspot", "engagement_task"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_task"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_task_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_task_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_task_data\n\n\n select\n \"engagement_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_hs_createdate\",\n \"property_hs_object_id\",\n \"property_hs_task_type\",\n \"property_hs_timestamp\",\n \"property_hubspot_owner_id\",\n \"property_hubspot_team_id\",\n \"type\",\n \"task_type\",\n \"property_hs_engagement_source\"\n from \"postgres\".\"public\".\"engagement_task_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_tmp"], "alias": "stg_hubspot__contact_tmp", "checksum": {"name": "sha256", "checksum": "d10790aa71c3fb70c06dad4df81c8bfaf6606ba7115bdbec55c2316449d56094"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3789475, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact"], ["hubspot", "contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_data\n\n\n select\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"property_email\",\n \"id\",\n \"property_company\",\n \"property_firstname\",\n \"property_lastname\",\n \"property_email_1\",\n \"property_createdate\",\n \"property_jobtitle\",\n \"property_annualrevenue\",\n \"property_hs_merged_object_ids\",\n \"property_created_at\",\n \"property_first_conversion_date\"\n from \"postgres\".\"public\".\"contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__submission_response_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__submission_response_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__submission_response_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__submission_response_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__submission_response_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__submission_response_tmp"], "alias": "stg_hubspot__submission_response_tmp", "checksum": {"name": "sha256", "checksum": "5a35d8014c42b7af0d9bce0f5a2a7bcf83d72647e6e71a5e5d9b8dc3c1406cb0"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3871891, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled', 'hubspot_submission_response_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='submission_response'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "submission_response"], ["hubspot", "submission_response"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.submission_response"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__submission_response_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_submission_response_identifier\n -- database: postgres \n -- schema: public\n -- identifier: submission_response_data\n\n\n select\n \"conversion_id\",\n \"form_id\",\n \"field_name\",\n \"field_value\",\n \"submitted_at\",\n \"page_url\",\n \"object_type_id\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"submission_response_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__ticket_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__ticket_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__ticket_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__ticket_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__ticket_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__ticket_property_history_tmp"], "alias": "stg_hubspot__ticket_property_history_tmp", "checksum": {"name": "sha256", "checksum": "1f8b813f23af217a1b491c902e82a72e11afb2ae3db34d2f3addc23f3ab83fb5"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_service_enabled', False)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.3955164, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__ticket_property_history_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_service_enabled', False)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='ticket_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "ticket_property_history"], ["hubspot", "ticket_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.ticket_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__ticket_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_ticket_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: ticket_property_history_data\n\n\n select\n \"_fivetran_synced\",\n \"ticket_id\",\n \"name\",\n \"source\",\n \"source_id\",\n \"timestamp_instant\",\n \"value\",\n \"_fivetran_start\",\n \"_fivetran_end\"\n from \"postgres\".\"public\".\"ticket_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_bounce_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_bounce_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_bounce_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_bounce_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_bounce_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_bounce_tmp"], "alias": "stg_hubspot__email_event_bounce_tmp", "checksum": {"name": "sha256", "checksum": "c60e54463b5bc144036766c9b4dc6e01c6cc3d9ebd6e303b51be6e439dca6898"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_bounce_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.403484, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_bounce_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_bounce'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_bounce"], ["hubspot", "email_event_bounce"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_bounce"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_bounce_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_bounce_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_bounce_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"category\",\n \"status\",\n \"response\"\n from \"postgres\".\"public\".\"email_event_bounce_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__contact_list_member_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__contact_list_member_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__contact_list_member_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__contact_list_member_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__contact_list_member_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__contact_list_member_tmp"], "alias": "stg_hubspot__contact_list_member_tmp", "checksum": {"name": "sha256", "checksum": "db622924ab3309fb61d4642fb381e559bd2d1ab7e7701608b2488dd14e015d46"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4117665, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list_member_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_list_member_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='contact_list_member'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "contact_list_member"], ["hubspot", "contact_list_member"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.contact_list_member"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__contact_list_member_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_contact_list_member_identifier\n -- database: postgres \n -- schema: public\n -- identifier: contact_list_member_data\n\n\n select\n \"contact_id\",\n \"contact_list_id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"added_at\"\n from \"postgres\".\"public\".\"contact_list_member_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__company_list_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__company_list_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__company_list_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__company_list_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__company_list_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__company_list_tmp"], "alias": "stg_hubspot__company_list_tmp", "checksum": {"name": "sha256", "checksum": "cfdd250e355a81520b821508597264a9243affff3adc15984ef07a5303594c15"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4208624, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__company_list_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_list_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='company_list'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "company_list"], ["hubspot", "company_list"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.company_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__company_list_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_company_list_identifier\n -- database: postgres \n -- schema: public\n -- identifier: company_list_data\n\n\n select\n \"id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"created_at\",\n \"updated_at\",\n \"name\",\n \"created_by_id\",\n \"object_type_id\",\n \"processing_status\",\n \"processing_type\",\n \"list_version\",\n \"filters_updated_at\",\n \"custom_field\"\n from \"postgres\".\"public\".\"company_list_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__email_event_spam_report_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__email_event_spam_report_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__email_event_spam_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__email_event_spam_report_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__email_event_spam_report_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__email_event_spam_report_tmp"], "alias": "stg_hubspot__email_event_spam_report_tmp", "checksum": {"name": "sha256", "checksum": "6ca1479d0ea2b2b71242564a5e8f517ef45b3b46da90caa3b9a2f68b8ee5ca79"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_email_event_enabled', 'hubspot_email_event_spam_report_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4289944, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_spam_report_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='email_event_spam_report'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "email_event_spam_report"], ["hubspot", "email_event_spam_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.email_event_spam_report"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__email_event_spam_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_email_event_spam_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: email_event_spam_report_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"ip_address\",\n \"user_agent\"\n from \"postgres\".\"public\".\"email_event_spam_report_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__deal_property_history_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__deal_property_history_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__deal_property_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__deal_property_history_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__deal_property_history_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__deal_property_history_tmp"], "alias": "stg_hubspot__deal_property_history_tmp", "checksum": {"name": "sha256", "checksum": "49c65c0797cb196c0c30203775ca8f6037a5808a1994fceb6606e01a2f8b4dac"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_deal_enabled', 'hubspot_deal_property_history_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.437056, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__deal_property_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='deal_property_history'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "deal_property_history"], ["hubspot", "deal_property_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.deal_property_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__deal_property_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_deal_property_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: deal_property_history_data\n\n\n select\n \"deal_id\",\n \"timestamp\",\n \"_fivetran_synced\",\n \"source\",\n \"name\",\n \"source_id\",\n \"value\",\n \"_fivetran_start\",\n \"_fivetran_end\",\n \"_fivetran_active\"\n from \"postgres\".\"public\".\"deal_property_history_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__form_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__form_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__form_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__form_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__form_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__form_tmp"], "alias": "stg_hubspot__form_tmp", "checksum": {"name": "sha256", "checksum": "d4d20c15c3247f9e3dbec803e393f40d9dbea3dc925da1a43099fd7eebdcd088"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4454284, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__form_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_form_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='form'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "form"], ["hubspot", "form"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.form"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__form_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_form_identifier\n -- database: postgres \n -- schema: public\n -- identifier: form_data\n\n\n select\n \"guid\",\n \"action\",\n \"created_at\",\n \"css_class\",\n \"follow_up_id\",\n \"form_type\",\n \"lead_nurturing_campaign_id\",\n \"method\",\n \"name\",\n \"notify_recipients\",\n \"portal_id\",\n \"redirect\",\n \"submit_text\",\n \"updated_at\"\n from \"postgres\".\"public\".\"form_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__engagement_contact_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__engagement_contact_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__engagement_contact_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__engagement_contact_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__engagement_contact_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__engagement_contact_tmp"], "alias": "stg_hubspot__engagement_contact_tmp", "checksum": {"name": "sha256", "checksum": "f9cb2e8c733e0ff9cc99d7a468a3a34e353a935e9af22e398de63add3f3349da"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_engagement_enabled', 'hubspot_engagement_contact_enabled'])", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4536545, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_contact_enabled'])) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='engagement_contact'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "engagement_contact"], ["hubspot", "engagement_contact"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.engagement_contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__engagement_contact_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_engagement_contact_identifier\n -- database: postgres \n -- schema: public\n -- identifier: engagement_contact_data\n\n\n select\n \"contact_id\",\n \"engagement_id\",\n \"engagement_type\",\n \"type_id\",\n \"_fivetran_synced\",\n \"category\"\n from \"postgres\".\"public\".\"engagement_contact_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__owner_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__owner_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__owner_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__owner_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__owner_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__owner_tmp"], "alias": "stg_hubspot__owner_tmp", "checksum": {"name": "sha256", "checksum": "b070e77a7e44eb3868f48e63868b96721ae34d6e0a52aa46186e506abe6de3ef"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_owner_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4619606, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__owner_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_owner_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='owner'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "owner"], ["hubspot", "owner"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.owner"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__owner_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_owner_identifier\n -- database: postgres \n -- schema: public\n -- identifier: owner_data\n\n\n select\n \"owner_id\",\n \"_fivetran_synced\",\n \"created_at\",\n \"portal_id\",\n \"type\",\n \"updated_at\",\n \"email\",\n \"first_name\",\n \"last_name\",\n \"active_user_id\"\n from \"postgres\".\"public\".\"owner_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": {"database": "postgres", "schema": "public_hubspot", "name": "stg_hubspot__conversation_message_recipient_tmp", "resource_type": "model", "package_name": "hubspot", "path": "staging/tmp/stg_hubspot__conversation_message_recipient_tmp.sql", "original_file_path": "models/staging/tmp/stg_hubspot__conversation_message_recipient_tmp.sql", "unique_id": "model.hubspot.stg_hubspot__conversation_message_recipient_tmp", "fqn": ["hubspot", "staging", "tmp", "stg_hubspot__conversation_message_recipient_tmp"], "alias": "stg_hubspot__conversation_message_recipient_tmp", "checksum": {"name": "sha256", "checksum": "f5db62674be3e2828b705dbadcc3c70ebc8234bc81b1bd5c98af2bd8f44ba9fb"}, "config": {"enabled": true, "alias": null, "schema": "hubspot", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null, "on_error": null, "latest_version_pointer": {"enabled": null, "alias": null}}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}", "enabled": "var('hubspot_conversation_enabled', True)", "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1786398588.4698763, "relation_name": "\"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient_tmp\"", "raw_code": "{{ config(enabled=var('hubspot_conversation_enabled', true)) }}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='hubspot_sources',\n single_source_name='hubspot',\n single_table_name='conversation_message_recipient'\n )\n}}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["hubspot", "conversation_message_recipient"], ["hubspot", "conversation_message_recipient"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.hubspot.hubspot.conversation_message_recipient"]}, "compiled_path": "target/compiled/hubspot/models/staging/tmp/stg_hubspot__conversation_message_recipient_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: hubspot_conversation_message_recipient_identifier\n -- database: postgres \n -- schema: public\n -- identifier: conversation_message_recipient_data\n\n\n select\n \"_fivetran_id\",\n \"actor_id\",\n \"message_id\",\n \"thread_id\",\n \"name\",\n \"recipient_field\",\n \"delivery_identifier_type\",\n \"delivery_identifier_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"conversation_message_recipient_data\" as source_table\n\n ", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__marketing_event_performance_marketing_event_performance_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb", "fqn": ["hubspot", "marketing", "not_null_hubspot__marketing_event_performance_marketing_event_performance_id"], "alias": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d"}, "created_at": 1786398588.8788397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__marketing_event_performance", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__marketing_event_performance"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__marketing_ev_3c9bc3fd948401f53aeb11c0eec5274d.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_performance_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__marketing_event_performance\"\nwhere marketing_event_performance_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_performance_id", "file_key_name": "models.hubspot__marketing_event_performance", "attached_node": "model.hubspot.hubspot__marketing_event_performance", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_performance_id", "model": "{{ get_where_subquery(ref('hubspot__marketing_event_performance')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__marketing_event_performance_marketing_event_performance_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712", "fqn": ["hubspot", "marketing", "unique_hubspot__marketing_event_performance_marketing_event_performance_id"], "alias": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9"}, "created_at": 1786398588.8822927, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__marketing_event_performance", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__marketing_event_performance"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/unique_hubspot__marketing_even_a7cb5a2a8e9772452100c53abf43a8a9.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n marketing_event_performance_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__marketing_event_performance\"\nwhere marketing_event_performance_id is not null\ngroup by marketing_event_performance_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_performance_id", "file_key_name": "models.hubspot__marketing_event_performance", "attached_node": "model.hubspot.hubspot__marketing_event_performance", "test_metadata": {"name": "unique", "kwargs": {"column_name": "marketing_event_performance_id", "model": "{{ get_where_subquery(ref('hubspot__marketing_event_performance')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_sends_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_sends_event_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3", "fqn": ["hubspot", "marketing", "not_null_hubspot__email_sends_event_id"], "alias": "not_null_hubspot__email_sends_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.8853543, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_sends"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__email_sends_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_sends\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_sends", "attached_node": "model.hubspot.hubspot__email_sends", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_sends')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_campaigns_email_campaign_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_campaigns_email_campaign_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0", "fqn": ["hubspot", "marketing", "not_null_hubspot__email_campaigns_email_campaign_id"], "alias": "not_null_hubspot__email_campaigns_email_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.8882842, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_campaigns", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_campaigns"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__email_campaigns_email_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect email_campaign_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_campaigns\"\nwhere email_campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email_campaign_id", "file_key_name": "models.hubspot__email_campaigns", "attached_node": "model.hubspot.hubspot__email_campaigns", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email_campaign_id", "model": "{{ get_where_subquery(ref('hubspot__email_campaigns')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__contacts_contact_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__contacts_contact_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3", "fqn": ["hubspot", "marketing", "not_null_hubspot__contacts_contact_id"], "alias": "not_null_hubspot__contacts_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.8911154, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contacts", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contacts"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__contacts_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contacts\"\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.hubspot__contacts", "attached_node": "model.hubspot.hubspot__contacts", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('hubspot__contacts')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__contact_lists_contact_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__contact_lists_contact_list_id.sql", "original_file_path": "models/marketing/marketing.yml", "unique_id": "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891", "fqn": ["hubspot", "marketing", "not_null_hubspot__contact_lists_contact_list_id"], "alias": "not_null_hubspot__contact_lists_contact_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.8942137, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contact_lists"]}, "compiled_path": "target/compiled/hubspot/models/marketing/marketing.yml/not_null_hubspot__contact_lists_contact_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_list_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contact_lists\"\nwhere contact_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_list_id", "file_key_name": "models.hubspot__contact_lists", "attached_node": "model.hubspot.hubspot__contact_lists", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_list_id", "model": "{{ get_where_subquery(ref('hubspot__contact_lists')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_bounce_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_bounce_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_bounce_event_id"], "alias": "not_null_hubspot__email_event_bounce_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.918375, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_bounce", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_bounce"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_bounce_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_bounce\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_bounce", "attached_node": "model.hubspot.hubspot__email_event_bounce", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_bounce')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_clicks_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_clicks_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_clicks_event_id"], "alias": "not_null_hubspot__email_event_clicks_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9213274, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_clicks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_clicks"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_clicks_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_clicks\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_clicks", "attached_node": "model.hubspot.hubspot__email_event_clicks", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_clicks')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_deferred_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_deferred_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_deferred_event_id"], "alias": "not_null_hubspot__email_event_deferred_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9241712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_deferred", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_deferred"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_deferred_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_deferred\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_deferred", "attached_node": "model.hubspot.hubspot__email_event_deferred", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_deferred')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_delivered_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_delivered_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_delivered_event_id"], "alias": "not_null_hubspot__email_event_delivered_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.92697, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_delivered", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_delivered"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_delivered_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_delivered\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_delivered", "attached_node": "model.hubspot.hubspot__email_event_delivered", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_delivered')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_dropped_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_dropped_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_dropped_event_id"], "alias": "not_null_hubspot__email_event_dropped_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9309108, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_dropped", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_dropped"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_dropped_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_dropped\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_dropped", "attached_node": "model.hubspot.hubspot__email_event_dropped", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_dropped')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_forward_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_forward_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_forward_event_id"], "alias": "not_null_hubspot__email_event_forward_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9337804, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_forward", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_forward"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_forward_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_forward\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_forward", "attached_node": "model.hubspot.hubspot__email_event_forward", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_forward')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_opens_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_opens_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_opens_event_id"], "alias": "not_null_hubspot__email_event_opens_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9365914, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_opens", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_opens"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_opens_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_opens\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_opens", "attached_node": "model.hubspot.hubspot__email_event_opens", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_opens')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_print_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_print_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_print_event_id"], "alias": "not_null_hubspot__email_event_print_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9394238, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_print", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_print"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_print_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_print\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_print", "attached_node": "model.hubspot.hubspot__email_event_print", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_print')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_sent_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_sent_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_sent_event_id"], "alias": "not_null_hubspot__email_event_sent_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9423199, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_sent"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_sent_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_sent\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_sent", "attached_node": "model.hubspot.hubspot__email_event_sent", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_sent')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_spam_report_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_spam_report_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_spam_report_event_id"], "alias": "not_null_hubspot__email_event_spam_report_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9452562, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_spam_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_spam_report"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_spam_report_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_spam_report\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_spam_report", "attached_node": "model.hubspot.hubspot__email_event_spam_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_spam_report')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__email_event_status_change_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__email_event_status_change_event_id.sql", "original_file_path": "models/marketing/email_events/email_events.yml", "unique_id": "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3", "fqn": ["hubspot", "marketing", "email_events", "not_null_hubspot__email_event_status_change_event_id"], "alias": "not_null_hubspot__email_event_status_change_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9480898, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/email_events/email_events.yml/not_null_hubspot__email_event_status_change_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.hubspot__email_event_status_change", "attached_node": "model.hubspot.hubspot__email_event_status_change", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('hubspot__email_event_status_change')) }}"}, "namespace": null}}, "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_int_hubspot__email_aggregate_status_change_unique_key", "resource_type": "test", "package_name": "hubspot", "path": "unique_int_hubspot__email_aggregate_status_change_unique_key.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a", "fqn": ["hubspot", "marketing", "intermediate", "unique_int_hubspot__email_aggregate_status_change_unique_key"], "alias": "unique_int_hubspot__email_aggregate_status_change_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9543033, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_aggregate_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_aggregate_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/unique_int_hubspot__email_aggregate_status_change_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\nwith __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n) select\n unique_key as unique_field,\n count(*) as n_records\n\nfrom __dbt__cte__int_hubspot__email_aggregate_status_change\nwhere unique_key is not null\ngroup by unique_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_aggregate_status_change", "sql": " __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "unique_key", "file_key_name": "models.int_hubspot__email_aggregate_status_change", "attached_node": "model.hubspot.int_hubspot__email_aggregate_status_change", "test_metadata": {"name": "unique", "kwargs": {"column_name": "unique_key", "model": "{{ get_where_subquery(ref('int_hubspot__email_aggregate_status_change')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__email_aggregate_status_change_unique_key", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__email_aggregate_status_change_unique_key.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__email_aggregate_status_change_unique_key"], "alias": "not_null_int_hubspot__email_aggregate_status_change_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9571536, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_aggregate_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_aggregate_status_change"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__email_aggregate_status_change_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n) select unique_key\nfrom __dbt__cte__int_hubspot__email_aggregate_status_change\nwhere unique_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_aggregate_status_change", "sql": " __dbt__cte__int_hubspot__email_aggregate_status_change as (\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__email_event_status_change\"\n\n), aggregates as (\n\n select\n source_relation,\n email_campaign_id,\n email_send_id,\n count(case when subscription_status = 'UNSUBSCRIBED' then 1 end) as unsubscribes\n from base\n where email_send_id is not null\n group by 1,2,3\n\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(email_send_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as unique_key\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "unique_key", "file_key_name": "models.int_hubspot__email_aggregate_status_change", "attached_node": "model.hubspot.int_hubspot__email_aggregate_status_change", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "unique_key", "model": "{{ get_where_subquery(ref('int_hubspot__email_aggregate_status_change')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id"], "alias": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33"}, "created_at": 1786398588.9602325, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_metrics__by_contact_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_metrics__by_contact_list"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__email_me_a72a3c877d9529cf35305d2d29199a33.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_list_id\nfrom \"postgres\".\"public_hubspot\".\"int_hubspot__email_metrics__by_contact_list\"\nwhere contact_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_list_id", "file_key_name": "models.int_hubspot__email_metrics__by_contact_list", "attached_node": "model.hubspot.int_hubspot__email_metrics__by_contact_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_list_id", "model": "{{ get_where_subquery(ref('int_hubspot__email_metrics__by_contact_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__email_event_aggregates_email_send_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__email_event_aggregates_email_send_id.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__email_event_aggregates_email_send_id"], "alias": "not_null_int_hubspot__email_event_aggregates_email_send_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9630725, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__email_event_aggregates", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__email_event_aggregates"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__email_event_aggregates_email_send_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n) select email_send_id\nfrom __dbt__cte__int_hubspot__email_event_aggregates\nwhere email_send_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__email_event_aggregates", "sql": " __dbt__cte__int_hubspot__email_event_aggregates as (\n\n\nwith events as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\n\n), aggregates as (\n\n select\n source_relation,\n sent_by_event_id as email_send_id,\n count(case when event_type = 'OPEN' then sent_by_event_id end) as opens,\n count(case when event_type = 'SENT' then sent_by_event_id end) as sends,\n count(case when event_type = 'DELIVERED' then sent_by_event_id end) as deliveries,\n count(case when event_type = 'DROPPED' then sent_by_event_id end) as drops,\n count(case when event_type = 'CLICK' then sent_by_event_id end) as clicks,\n count(case when event_type = 'FORWARD' then sent_by_event_id end) as forwards,\n count(case when event_type = 'DEFERRED' then sent_by_event_id end) as deferrals,\n count(case when event_type = 'BOUNCE' then sent_by_event_id end) as bounces,\n count(case when event_type = 'SPAMREPORT' then sent_by_event_id end) as spam_reports,\n count(case when event_type = 'PRINT' then sent_by_event_id end) as prints\n from events\n where sent_by_event_id is not null\n group by 1,2\n\n)\n\nselect *\nfrom aggregates\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email_send_id", "file_key_name": "models.int_hubspot__email_event_aggregates", "attached_node": "model.hubspot.int_hubspot__email_event_aggregates", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email_send_id", "model": "{{ get_where_subquery(ref('int_hubspot__email_event_aggregates')) }}"}, "namespace": null}}, "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_int_hubspot__engagement_metrics__by_contact_contact_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_int_hubspot__engagement_metrics__by_contact_contact_id.sql", "original_file_path": "models/marketing/intermediate/intermediate.yml", "unique_id": "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b", "fqn": ["hubspot", "marketing", "intermediate", "not_null_int_hubspot__engagement_metrics__by_contact_contact_id"], "alias": "not_null_int_hubspot__engagement_metrics__by_contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9658904, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_hubspot__engagement_metrics__by_contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.int_hubspot__engagement_metrics__by_contact"]}, "compiled_path": "target/compiled/hubspot/models/marketing/intermediate/intermediate.yml/not_null_int_hubspot__engagement_metrics__by_contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nwith __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n) select contact_id\nfrom __dbt__cte__int_hubspot__engagement_metrics__by_contact\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "sql": " __dbt__cte__int_hubspot__engagement_metrics__by_contact as (\n\n\nwith engagements as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\n\n), engagement_contacts as (\n\n select *\n from \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_contact\"\n\n), engagement_contacts_joined as (\n\n select\n engagements.engagement_type,\n engagement_contacts.contact_id,\n engagement_contacts.source_relation\n from engagements\n inner join engagement_contacts\n on engagements.engagement_id = engagement_contacts.engagement_id\n and engagements.source_relation = engagement_contacts.source_relation\n\n), engagement_contacts_agg as (\n\n \n\n select\n source_relation,\n contact_id,\n count(case when engagement_type = 'NOTE' then contact_id end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then contact_id end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then contact_id end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then contact_id end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then contact_id end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then contact_id end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then contact_id end) as count_engagement_forwarded_emails\n from engagement_contacts_joined\n group by 1,2\n\n\n\n)\n\nselect *\nfrom engagement_contacts_agg\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.int_hubspot__engagement_metrics__by_contact", "attached_node": "model.hubspot.int_hubspot__engagement_metrics__by_contact", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('int_hubspot__engagement_metrics__by_contact')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_contact_history_contact_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_contact_history_contact_day_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba", "fqn": ["hubspot", "marketing", "history", "unique_hubspot__daily_contact_history_contact_day_id"], "alias": "unique_hubspot__daily_contact_history_contact_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9790275, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/unique_hubspot__daily_contact_history_contact_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n contact_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\nwhere contact_day_id is not null\ngroup by contact_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_day_id", "file_key_name": "models.hubspot__daily_contact_history", "attached_node": "model.hubspot.hubspot__daily_contact_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "contact_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_contact_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_contact_history_contact_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_contact_history_contact_day_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d", "fqn": ["hubspot", "marketing", "history", "not_null_hubspot__daily_contact_history_contact_day_id"], "alias": "not_null_hubspot__daily_contact_history_contact_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9821644, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/not_null_hubspot__daily_contact_history_contact_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_contact_history\"\nwhere contact_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_day_id", "file_key_name": "models.hubspot__daily_contact_history", "attached_node": "model.hubspot.hubspot__daily_contact_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_contact_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__contact_history_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__contact_history_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec", "fqn": ["hubspot", "marketing", "history", "unique_hubspot__contact_history_id"], "alias": "unique_hubspot__contact_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9851027, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/unique_hubspot__contact_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contact_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__contact_history", "attached_node": "model.hubspot.hubspot__contact_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__contact_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__contact_history_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__contact_history_id.sql", "original_file_path": "models/marketing/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088", "fqn": ["hubspot", "marketing", "history", "not_null_hubspot__contact_history_id"], "alias": "not_null_hubspot__contact_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398588.9879496, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__contact_history"]}, "compiled_path": "target/compiled/hubspot/models/marketing/history/history.yml/not_null_hubspot__contact_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__contact_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__contact_history", "attached_node": "model.hubspot.hubspot__contact_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__contact_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_ticket_history_ticket_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_ticket_history_ticket_day_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c", "fqn": ["hubspot", "service", "unique_hubspot__daily_ticket_history_ticket_day_id"], "alias": "unique_hubspot__daily_ticket_history_ticket_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0295234, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/unique_hubspot__daily_ticket_history_ticket_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n ticket_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\nwhere ticket_day_id is not null\ngroup by ticket_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_day_id", "file_key_name": "models.hubspot__daily_ticket_history", "attached_node": "model.hubspot.hubspot__daily_ticket_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "ticket_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_ticket_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_ticket_history_ticket_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_ticket_history_ticket_day_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e", "fqn": ["hubspot", "service", "not_null_hubspot__daily_ticket_history_ticket_day_id"], "alias": "not_null_hubspot__daily_ticket_history_ticket_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0325286, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_ticket_history"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/not_null_hubspot__daily_ticket_history_ticket_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ticket_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_ticket_history\"\nwhere ticket_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_day_id", "file_key_name": "models.hubspot__daily_ticket_history", "attached_node": "model.hubspot.hubspot__daily_ticket_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ticket_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_ticket_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__tickets_ticket_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__tickets_ticket_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7", "fqn": ["hubspot", "service", "not_null_hubspot__tickets_ticket_id"], "alias": "not_null_hubspot__tickets_ticket_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.035434, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__tickets", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__tickets"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/not_null_hubspot__tickets_ticket_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ticket_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__tickets\"\nwhere ticket_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_id", "file_key_name": "models.hubspot__tickets", "attached_node": "model.hubspot.hubspot__tickets", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ticket_id", "model": "{{ get_where_subquery(ref('hubspot__tickets')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__conversations_conversation_thread_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__conversations_conversation_thread_id.sql", "original_file_path": "models/service/service.yml", "unique_id": "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084", "fqn": ["hubspot", "service", "not_null_hubspot__conversations_conversation_thread_id"], "alias": "not_null_hubspot__conversations_conversation_thread_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.038233, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__conversations", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__conversations"]}, "compiled_path": "target/compiled/hubspot/models/service/service.yml/not_null_hubspot__conversations_conversation_thread_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect conversation_thread_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__conversations\"\nwhere conversation_thread_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "conversation_thread_id", "file_key_name": "models.hubspot__conversations", "attached_node": "model.hubspot.hubspot__conversations", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "conversation_thread_id", "model": "{{ get_where_subquery(ref('hubspot__conversations')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__company_lists_company_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__company_lists_company_list_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f", "fqn": ["hubspot", "sales", "not_null_hubspot__company_lists_company_list_id"], "alias": "not_null_hubspot__company_lists_company_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0609102, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__company_lists"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__company_lists_company_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_list_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__company_lists\"\nwhere company_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_list_id", "file_key_name": "models.hubspot__company_lists", "attached_node": "model.hubspot.hubspot__company_lists", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_list_id", "model": "{{ get_where_subquery(ref('hubspot__company_lists')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__deals_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__deals_deal_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd", "fqn": ["hubspot", "sales", "not_null_hubspot__deals_deal_id"], "alias": "not_null_hubspot__deals_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0639038, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deals", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deals"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__deals_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deals\"\nwhere deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_id", "file_key_name": "models.hubspot__deals", "attached_node": "model.hubspot.hubspot__deals", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_id", "model": "{{ get_where_subquery(ref('hubspot__deals')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__deal_stages_deal_stage_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__deal_stages_deal_stage_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b", "fqn": ["hubspot", "sales", "not_null_hubspot__deal_stages_deal_stage_id"], "alias": "not_null_hubspot__deal_stages_deal_stage_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0667353, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_stages", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deal_stages"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__deal_stages_deal_stage_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_stage_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deal_stages\"\nwhere deal_stage_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_stage_id", "file_key_name": "models.hubspot__deal_stages", "attached_node": "model.hubspot.hubspot__deal_stages", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_stage_id", "model": "{{ get_where_subquery(ref('hubspot__deal_stages')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__companies_company_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__companies_company_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97", "fqn": ["hubspot", "sales", "not_null_hubspot__companies_company_id"], "alias": "not_null_hubspot__companies_company_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0695336, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__companies", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__companies"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__companies_company_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__companies\"\nwhere company_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_id", "file_key_name": "models.hubspot__companies", "attached_node": "model.hubspot.hubspot__companies", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_id", "model": "{{ get_where_subquery(ref('hubspot__companies')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagements_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagements_engagement_id.sql", "original_file_path": "models/sales/sales.yml", "unique_id": "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7", "fqn": ["hubspot", "sales", "not_null_hubspot__engagements_engagement_id"], "alias": "not_null_hubspot__engagements_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0723395, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagements"]}, "compiled_path": "target/compiled/hubspot/models/sales/sales.yml/not_null_hubspot__engagements_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagements\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagements", "attached_node": "model.hubspot.hubspot__engagements", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagements')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_calls_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_calls_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_calls_engagement_id"], "alias": "not_null_hubspot__engagement_calls_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0829568, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_calls", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_calls"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_calls_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_calls\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_calls", "attached_node": "model.hubspot.hubspot__engagement_calls", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_calls')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_communication_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_communication_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_communication_engagement_id"], "alias": "not_null_hubspot__engagement_communication_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0859876, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_communication_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_communication\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_communication", "attached_node": "model.hubspot.hubspot__engagement_communication", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_communication')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_emails_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_emails_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_emails_engagement_id"], "alias": "not_null_hubspot__engagement_emails_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0888617, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_emails", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_emails"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_emails_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_emails\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_emails", "attached_node": "model.hubspot.hubspot__engagement_emails", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_emails')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_meetings_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_meetings_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_meetings_engagement_id"], "alias": "not_null_hubspot__engagement_meetings_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0917404, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_meetings", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_meetings"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_meetings_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_meetings\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_meetings", "attached_node": "model.hubspot.hubspot__engagement_meetings", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_meetings')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_notes_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_notes_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_notes_engagement_id"], "alias": "not_null_hubspot__engagement_notes_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.0945385, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_notes", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_notes"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_notes_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_notes\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_notes", "attached_node": "model.hubspot.hubspot__engagement_notes", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_notes')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__engagement_tasks_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__engagement_tasks_engagement_id.sql", "original_file_path": "models/sales/engagement_events/engagement_events.yml", "unique_id": "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae", "fqn": ["hubspot", "sales", "engagement_events", "not_null_hubspot__engagement_tasks_engagement_id"], "alias": "not_null_hubspot__engagement_tasks_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.09732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_tasks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__engagement_tasks"]}, "compiled_path": "target/compiled/hubspot/models/sales/engagement_events/engagement_events.yml/not_null_hubspot__engagement_tasks_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__engagement_tasks\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.hubspot__engagement_tasks", "attached_node": "model.hubspot.hubspot__engagement_tasks", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('hubspot__engagement_tasks')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_deal_history_deal_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_deal_history_deal_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8", "fqn": ["hubspot", "sales", "history", "unique_hubspot__daily_deal_history_deal_day_id"], "alias": "unique_hubspot__daily_deal_history_deal_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1078794, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__daily_deal_history_deal_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n deal_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\nwhere deal_day_id is not null\ngroup by deal_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_day_id", "file_key_name": "models.hubspot__daily_deal_history", "attached_node": "model.hubspot.hubspot__daily_deal_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "deal_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_deal_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_deal_history_deal_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_deal_history_deal_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__daily_deal_history_deal_day_id"], "alias": "not_null_hubspot__daily_deal_history_deal_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.11076, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__daily_deal_history_deal_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_deal_history\"\nwhere deal_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_day_id", "file_key_name": "models.hubspot__daily_deal_history", "attached_node": "model.hubspot.hubspot__daily_deal_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_deal_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__daily_company_history_company_day_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__daily_company_history_company_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe", "fqn": ["hubspot", "sales", "history", "unique_hubspot__daily_company_history_company_day_id"], "alias": "unique_hubspot__daily_company_history_company_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.113581, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__daily_company_history_company_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n company_day_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\nwhere company_day_id is not null\ngroup by company_day_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_day_id", "file_key_name": "models.hubspot__daily_company_history", "attached_node": "model.hubspot.hubspot__daily_company_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "company_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_company_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__daily_company_history_company_day_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__daily_company_history_company_day_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__daily_company_history_company_day_id"], "alias": "not_null_hubspot__daily_company_history_company_day_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.116374, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__daily_company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__daily_company_history_company_day_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_day_id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__daily_company_history\"\nwhere company_day_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_day_id", "file_key_name": "models.hubspot__daily_company_history", "attached_node": "model.hubspot.hubspot__daily_company_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_day_id", "model": "{{ get_where_subquery(ref('hubspot__daily_company_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__company_history_id.f1af964b1f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__company_history_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__company_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__company_history_id.f1af964b1f", "fqn": ["hubspot", "sales", "history", "unique_hubspot__company_history_id"], "alias": "unique_hubspot__company_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.11924, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__company_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__company_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__company_history", "attached_node": "model.hubspot.hubspot__company_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__company_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__company_history_id.33035793ff": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__company_history_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__company_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__company_history_id.33035793ff", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__company_history_id"], "alias": "not_null_hubspot__company_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1220024, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__company_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__company_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__company_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__company_history", "attached_node": "model.hubspot.hubspot__company_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__company_history')) }}"}, "namespace": null}}, "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_hubspot__deal_history_id", "resource_type": "test", "package_name": "hubspot", "path": "unique_hubspot__deal_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79", "fqn": ["hubspot", "sales", "history", "unique_hubspot__deal_history_id"], "alias": "unique_hubspot__deal_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1248372, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/unique_hubspot__deal_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deal_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__deal_history", "attached_node": "model.hubspot.hubspot__deal_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__deal_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_hubspot__deal_history_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_hubspot__deal_history_id.sql", "original_file_path": "models/sales/history/history.yml", "unique_id": "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75", "fqn": ["hubspot", "sales", "history", "not_null_hubspot__deal_history_id"], "alias": "not_null_hubspot__deal_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1276422, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.hubspot__deal_history"]}, "compiled_path": "target/compiled/hubspot/models/sales/history/history.yml/not_null_hubspot__deal_history_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect id\nfrom \"postgres\".\"public_hubspot\".\"hubspot__deal_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "models.hubspot__deal_history", "attached_node": "model.hubspot.hubspot__deal_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(ref('hubspot__deal_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__form_form_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__form_form_id.sql", "original_file_path": "models/staging/stg_hubspot__form.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__form_form_id"], "alias": "not_null_stg_hubspot__form_form_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1388648, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__form", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__form"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__form.yml/not_null_stg_hubspot__form_form_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect form_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__form\"\nwhere form_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "form_id", "file_key_name": "models.stg_hubspot__form", "attached_node": "model.hubspot.stg_hubspot__form", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "form_id", "model": "{{ get_where_subquery(ref('stg_hubspot__form')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__submission_response_conversion_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__submission_response_conversion_id.sql", "original_file_path": "models/staging/stg_hubspot__form.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__submission_response_conversion_id"], "alias": "not_null_stg_hubspot__submission_response_conversion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.141804, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__submission_response", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__submission_response"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__form.yml/not_null_stg_hubspot__submission_response_conversion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect conversion_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__submission_response\"\nwhere conversion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "conversion_id", "file_key_name": "models.stg_hubspot__submission_response", "attached_node": "model.hubspot.stg_hubspot__submission_response", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "conversion_id", "model": "{{ get_where_subquery(ref('stg_hubspot__submission_response')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_bounce_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_bounce_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_bounce_event_id"], "alias": "not_null_stg_hubspot__email_event_bounce_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1596677, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_bounce", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_bounce"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_bounce_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_bounce\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_bounce", "attached_node": "model.hubspot.stg_hubspot__email_event_bounce", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_bounce')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_click_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_click_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_click_event_id"], "alias": "not_null_stg_hubspot__email_event_click_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1625316, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_click", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_click"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_click_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_click\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_click", "attached_node": "model.hubspot.stg_hubspot__email_event_click", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_click')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_deferred_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_deferred_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_deferred_event_id"], "alias": "not_null_stg_hubspot__email_event_deferred_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1653504, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_deferred", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_deferred"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_deferred_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_deferred\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_deferred", "attached_node": "model.hubspot.stg_hubspot__email_event_deferred", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_deferred')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_delivered_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_delivered_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_delivered_event_id"], "alias": "not_null_stg_hubspot__email_event_delivered_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1681066, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_delivered", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_delivered"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_delivered_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_delivered\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_delivered", "attached_node": "model.hubspot.stg_hubspot__email_event_delivered", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_delivered')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_dropped_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_dropped_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_dropped_event_id"], "alias": "not_null_stg_hubspot__email_event_dropped_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1709602, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_dropped", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_dropped"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_dropped_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_dropped\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_dropped", "attached_node": "model.hubspot.stg_hubspot__email_event_dropped", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_dropped')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_forward_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_forward_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_forward_event_id"], "alias": "not_null_stg_hubspot__email_event_forward_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.173744, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_forward", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_forward"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_forward_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_forward\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_forward", "attached_node": "model.hubspot.stg_hubspot__email_event_forward", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_forward')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_open_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_open_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_open_event_id"], "alias": "not_null_stg_hubspot__email_event_open_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1765106, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_open", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_open"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_open_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_open\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_open", "attached_node": "model.hubspot.stg_hubspot__email_event_open", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_open')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_print_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_print_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_print_event_id"], "alias": "not_null_stg_hubspot__email_event_print_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1792593, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_print", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_print"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_print_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_print\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_print", "attached_node": "model.hubspot.stg_hubspot__email_event_print", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_print')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_sent_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_sent_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_sent_event_id"], "alias": "not_null_stg_hubspot__email_event_sent_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1820214, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_sent", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_sent"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_sent_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_sent\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_sent", "attached_node": "model.hubspot.stg_hubspot__email_event_sent", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_sent')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_spam_report_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_spam_report_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_spam_report_event_id"], "alias": "not_null_stg_hubspot__email_event_spam_report_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1849475, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_spam_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_spam_report"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_spam_report_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_spam_report\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_spam_report", "attached_node": "model.hubspot.stg_hubspot__email_event_spam_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_spam_report')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_status_change_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_status_change_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_status_change_event_id"], "alias": "not_null_stg_hubspot__email_event_status_change_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1877272, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event_status_change"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_status_change_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event_status_change\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event_status_change", "attached_node": "model.hubspot.stg_hubspot__email_event_status_change", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event_status_change')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_event_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_event_event_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_event_event_id"], "alias": "not_null_stg_hubspot__email_event_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1905322, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_event", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_event_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_event\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_hubspot__email_event", "attached_node": "model.hubspot.stg_hubspot__email_event", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_event')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__email_campaign_email_campaign_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__email_campaign_email_campaign_id.sql", "original_file_path": "models/staging/stg_hubspot__email.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__email_campaign_email_campaign_id"], "alias": "not_null_stg_hubspot__email_campaign_email_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.1933434, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__email_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__email_campaign"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__email.yml/not_null_stg_hubspot__email_campaign_email_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect email_campaign_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__email_campaign\"\nwhere email_campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email_campaign_id", "file_key_name": "models.stg_hubspot__email_campaign", "attached_node": "model.hubspot.stg_hubspot__email_campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email_campaign_id", "model": "{{ get_where_subquery(ref('stg_hubspot__email_campaign')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__contact_list_contact_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__contact_list_contact_list_id.sql", "original_file_path": "models/staging/stg_hubspot__contact.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__contact_list_contact_list_id"], "alias": "not_null_stg_hubspot__contact_list_contact_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2083826, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__contact_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact.yml/not_null_stg_hubspot__contact_list_contact_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_list_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__contact_list\"\nwhere contact_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_list_id", "file_key_name": "models.stg_hubspot__contact_list", "attached_node": "model.hubspot.stg_hubspot__contact_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_list_id", "model": "{{ get_where_subquery(ref('stg_hubspot__contact_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__contact_contact_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__contact_contact_id.sql", "original_file_path": "models/staging/stg_hubspot__contact.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__contact_contact_id"], "alias": "not_null_stg_hubspot__contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2115388, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__contact"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__contact.yml/not_null_stg_hubspot__contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__contact\"\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.stg_hubspot__contact", "attached_node": "model.hubspot.stg_hubspot__contact", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('stg_hubspot__contact')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_call_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_call_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_call_engagement_id"], "alias": "not_null_stg_hubspot__engagement_call_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2252324, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_call", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_call"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_call_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_call\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_call", "attached_node": "model.hubspot.stg_hubspot__engagement_call", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_call')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_communication_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_communication_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_communication_engagement_id"], "alias": "not_null_stg_hubspot__engagement_communication_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.228276, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_communication"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_communication_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_communication\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_communication", "attached_node": "model.hubspot.stg_hubspot__engagement_communication", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_communication')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_email_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_email_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_email_engagement_id"], "alias": "not_null_stg_hubspot__engagement_email_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2311018, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_email", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_email"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_email_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_email\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_email", "attached_node": "model.hubspot.stg_hubspot__engagement_email", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_email')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_meeting_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_meeting_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_meeting_engagement_id"], "alias": "not_null_stg_hubspot__engagement_meeting_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2339234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_meeting", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_meeting"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_meeting_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_meeting\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_meeting", "attached_node": "model.hubspot.stg_hubspot__engagement_meeting", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_meeting')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_note_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_note_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_note_engagement_id"], "alias": "not_null_stg_hubspot__engagement_note_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2367, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_note", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_note"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_note_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_note\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_note", "attached_node": "model.hubspot.stg_hubspot__engagement_note", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_note')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_task_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_task_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_task_engagement_id"], "alias": "not_null_stg_hubspot__engagement_task_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.239573, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement_task", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement_task"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_task_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement_task\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement_task", "attached_node": "model.hubspot.stg_hubspot__engagement_task", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement_task')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__engagement_engagement_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__engagement_engagement_id.sql", "original_file_path": "models/staging/stg_hubspot__engagement.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__engagement_engagement_id"], "alias": "not_null_stg_hubspot__engagement_engagement_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2423518, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__engagement", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__engagement"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__engagement.yml/not_null_stg_hubspot__engagement_engagement_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect engagement_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__engagement\"\nwhere engagement_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "engagement_id", "file_key_name": "models.stg_hubspot__engagement", "attached_node": "model.hubspot.stg_hubspot__engagement", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "engagement_id", "model": "{{ get_where_subquery(ref('stg_hubspot__engagement')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__company_list_company_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__company_list_company_list_id.sql", "original_file_path": "models/staging/stg_hubspot__company.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__company_list_company_list_id"], "alias": "not_null_stg_hubspot__company_list_company_list_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.2527254, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__company_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company.yml/not_null_stg_hubspot__company_list_company_list_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_list_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__company_list\"\nwhere company_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_list_id", "file_key_name": "models.stg_hubspot__company_list", "attached_node": "model.hubspot.stg_hubspot__company_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_list_id", "model": "{{ get_where_subquery(ref('stg_hubspot__company_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__company_company_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__company_company_id.sql", "original_file_path": "models/staging/stg_hubspot__company.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__company_company_id"], "alias": "not_null_stg_hubspot__company_company_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.25571, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__company", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__company"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__company.yml/not_null_stg_hubspot__company_company_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect company_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__company\"\nwhere company_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "company_id", "file_key_name": "models.stg_hubspot__company", "attached_node": "model.hubspot.stg_hubspot__company", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "company_id", "model": "{{ get_where_subquery(ref('stg_hubspot__company')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__marketing_event_marketing_event_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__marketing_event_marketing_event_id.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__marketing_event_marketing_event_id"], "alias": "not_null_stg_hubspot__marketing_event_marketing_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.741936, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__marketing_event"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.yml/not_null_stg_hubspot__marketing_event_marketing_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event\"\nwhere marketing_event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_id", "file_key_name": "models.stg_hubspot__marketing_event", "attached_node": "model.hubspot.stg_hubspot__marketing_event", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_id", "model": "{{ get_where_subquery(ref('stg_hubspot__marketing_event')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__marketing_event_list_marketing_event_list_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__marketing_event_list_marketing_event_list_id"], "alias": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc"}, "created_at": 1786398589.7450678, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_list"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.yml/not_null_stg_hubspot__marketin_8288bebf257f66b287052c09db60edbc.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_list_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_list\"\nwhere marketing_event_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_list_id", "file_key_name": "models.stg_hubspot__marketing_event_list", "attached_node": "model.hubspot.stg_hubspot__marketing_event_list", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_list_id", "model": "{{ get_where_subquery(ref('stg_hubspot__marketing_event_list')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905.sql", "original_file_path": "models/staging/stg_hubspot__marketing_event.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id"], "alias": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905"}, "created_at": 1786398589.7479293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__marketing_event_participant", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__marketing_event_participant"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__marketing_event.yml/not_null_stg_hubspot__marketin_7a9bcfc213757d5330ff6830addad905.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect marketing_event_participant_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__marketing_event_participant\"\nwhere marketing_event_participant_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marketing_event_participant_id", "file_key_name": "models.stg_hubspot__marketing_event_participant", "attached_node": "model.hubspot.stg_hubspot__marketing_event_participant", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "marketing_event_participant_id", "model": "{{ get_where_subquery(ref('stg_hubspot__marketing_event_participant')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_actor_actor_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_actor_actor_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_actor_actor_id"], "alias": "not_null_stg_hubspot__conversation_actor_actor_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.7611706, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_actor", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_actor"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_actor_actor_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect actor_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_actor\"\nwhere actor_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "actor_id", "file_key_name": "models.stg_hubspot__conversation_actor", "attached_node": "model.hubspot.stg_hubspot__conversation_actor", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "actor_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_actor')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_inbox_inbox_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_inbox_inbox_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_inbox_inbox_id"], "alias": "not_null_stg_hubspot__conversation_inbox_inbox_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.7640283, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_inbox", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_inbox"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_inbox_inbox_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect inbox_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_inbox\"\nwhere inbox_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "inbox_id", "file_key_name": "models.stg_hubspot__conversation_inbox", "attached_node": "model.hubspot.stg_hubspot__conversation_inbox", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "inbox_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_inbox')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_channel_channel_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_channel_channel_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_channel_channel_id"], "alias": "not_null_stg_hubspot__conversation_channel_channel_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.7668517, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_channel_channel_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect channel_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel\"\nwhere channel_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "channel_id", "file_key_name": "models.stg_hubspot__conversation_channel", "attached_node": "model.hubspot.stg_hubspot__conversation_channel", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "channel_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_channel')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_channel_account_channel_account_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_channel_account_channel_account_id"], "alias": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe"}, "created_at": 1786398589.769686, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_channel_account", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_channel_account"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversa_0cf8b638ec326c6a9dbc55671880d5fe.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect channel_account_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_channel_account\"\nwhere channel_account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "channel_account_id", "file_key_name": "models.stg_hubspot__conversation_channel_account", "attached_node": "model.hubspot.stg_hubspot__conversation_channel_account", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "channel_account_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_channel_account')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_thread_conversation_thread_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_thread_conversation_thread_id"], "alias": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3"}, "created_at": 1786398589.772584, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_thread", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_thread"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversa_02d35ce48cca583acd288b1c39298ab3.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect conversation_thread_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_thread\"\nwhere conversation_thread_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "conversation_thread_id", "file_key_name": "models.stg_hubspot__conversation_thread", "attached_node": "model.hubspot.stg_hubspot__conversation_thread", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "conversation_thread_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_thread')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_message_history_message_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversation_message_history_message_id.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_message_history_message_id"], "alias": "not_null_stg_hubspot__conversation_message_history_message_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.775379, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_history"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversation_message_history_message_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect message_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_history\"\nwhere message_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "message_id", "file_key_name": "models.stg_hubspot__conversation_message_history", "attached_node": "model.hubspot.stg_hubspot__conversation_message_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "message_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_message_history')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__conversation_message_recipient__fivetran_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe.sql", "original_file_path": "models/staging/stg_hubspot__conversation.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__conversation_message_recipient__fivetran_id"], "alias": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe"}, "created_at": 1786398589.7781737, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__conversation_message_recipient", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__conversation_message_recipient"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__conversation.yml/not_null_stg_hubspot__conversa_324915d80ef733b0877f047b66bd5bbe.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__conversation_message_recipient\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_id", "file_key_name": "models.stg_hubspot__conversation_message_recipient", "attached_node": "model.hubspot.stg_hubspot__conversation_message_recipient", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_hubspot__conversation_message_recipient')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__ticket_ticket_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__ticket_ticket_id.sql", "original_file_path": "models/staging/stg_hubspot__ticket.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__ticket_ticket_id"], "alias": "not_null_stg_hubspot__ticket_ticket_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.7902262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__ticket", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__ticket"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__ticket.yml/not_null_stg_hubspot__ticket_ticket_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ticket_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__ticket\"\nwhere ticket_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ticket_id", "file_key_name": "models.stg_hubspot__ticket", "attached_node": "model.hubspot.stg_hubspot__ticket", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ticket_id", "model": "{{ get_where_subquery(ref('stg_hubspot__ticket')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id"], "alias": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b"}, "created_at": 1786398589.8061905, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline_stage", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline_stage"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__deal_pip_5a707b4fbec8bec07f54d0383d90ea2b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_pipeline_stage_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline_stage\"\nwhere deal_pipeline_stage_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_pipeline_stage_id", "file_key_name": "models.stg_hubspot__deal_pipeline_stage", "attached_node": "model.hubspot.stg_hubspot__deal_pipeline_stage", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_pipeline_stage_id", "model": "{{ get_where_subquery(ref('stg_hubspot__deal_pipeline_stage')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id"], "alias": "not_null_stg_hubspot__deal_pipeline_deal_pipeline_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8091586, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal_pipeline", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__deal_pipeline"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_pipeline_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__deal_pipeline\"\nwhere deal_pipeline_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_pipeline_id", "file_key_name": "models.stg_hubspot__deal_pipeline", "attached_node": "model.hubspot.stg_hubspot__deal_pipeline", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_pipeline_id", "model": "{{ get_where_subquery(ref('stg_hubspot__deal_pipeline')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__deal_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__deal_deal_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__deal_deal_id"], "alias": "not_null_stg_hubspot__deal_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.812074, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__deal_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__deal\"\nwhere deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_id", "file_key_name": "models.stg_hubspot__deal", "attached_node": "model.hubspot.stg_hubspot__deal", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_id", "model": "{{ get_where_subquery(ref('stg_hubspot__deal')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__merged_deal_merged_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__merged_deal_merged_deal_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__merged_deal_merged_deal_id"], "alias": "not_null_stg_hubspot__merged_deal_merged_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8149638, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__merged_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__merged_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__merged_deal_merged_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect merged_deal_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"\nwhere merged_deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "merged_deal_id", "file_key_name": "models.stg_hubspot__merged_deal", "attached_node": "model.hubspot.stg_hubspot__merged_deal", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "merged_deal_id", "model": "{{ get_where_subquery(ref('stg_hubspot__merged_deal')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__merged_deal_deal_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__merged_deal_deal_id.sql", "original_file_path": "models/staging/stg_hubspot__deal.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__merged_deal_deal_id"], "alias": "not_null_stg_hubspot__merged_deal_deal_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8178139, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__merged_deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__merged_deal"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__deal.yml/not_null_stg_hubspot__merged_deal_deal_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect deal_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__merged_deal\"\nwhere deal_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deal_id", "file_key_name": "models.stg_hubspot__merged_deal", "attached_node": "model.hubspot.stg_hubspot__merged_deal", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "deal_id", "model": "{{ get_where_subquery(ref('stg_hubspot__merged_deal')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__role_role_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__role_role_id.sql", "original_file_path": "models/staging/stg_hubspot__team.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__role_role_id"], "alias": "not_null_stg_hubspot__role_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8261144, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__role", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__role"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.yml/not_null_stg_hubspot__role_role_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect role_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__role\"\nwhere role_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "role_id", "file_key_name": "models.stg_hubspot__role", "attached_node": "model.hubspot.stg_hubspot__role", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "role_id", "model": "{{ get_where_subquery(ref('stg_hubspot__role')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__team_team_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__team_team_id.sql", "original_file_path": "models/staging/stg_hubspot__team.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__team_team_id"], "alias": "not_null_stg_hubspot__team_team_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8289998, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__team", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__team"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.yml/not_null_stg_hubspot__team_team_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect team_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__team\"\nwhere team_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "team_id", "file_key_name": "models.stg_hubspot__team", "attached_node": "model.hubspot.stg_hubspot__team", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "team_id", "model": "{{ get_where_subquery(ref('stg_hubspot__team')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__users_user_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__users_user_id.sql", "original_file_path": "models/staging/stg_hubspot__team.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__users_user_id"], "alias": "not_null_stg_hubspot__users_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8318868, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__users", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__users"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__team.yml/not_null_stg_hubspot__users_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__users\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_hubspot__users", "attached_node": "model.hubspot.stg_hubspot__users", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_hubspot__users')) }}"}, "namespace": null}}, "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_hubspot__owner_owner_id", "resource_type": "test", "package_name": "hubspot", "path": "not_null_stg_hubspot__owner_owner_id.sql", "original_file_path": "models/staging/stg_hubspot__owner.yml", "unique_id": "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4", "fqn": ["hubspot", "staging", "not_null_stg_hubspot__owner_owner_id"], "alias": "not_null_stg_hubspot__owner_owner_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1786398589.8372977, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_hubspot__owner", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.hubspot.stg_hubspot__owner"]}, "compiled_path": "target/compiled/hubspot/models/staging/stg_hubspot__owner.yml/not_null_stg_hubspot__owner_owner_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect owner_id\nfrom \"postgres\".\"public_hubspot\".\"stg_hubspot__owner\"\nwhere owner_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "owner_id", "file_key_name": "models.stg_hubspot__owner", "attached_node": "model.hubspot.stg_hubspot__owner", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "owner_id", "model": "{{ get_where_subquery(ref('stg_hubspot__owner')) }}"}, "namespace": null}}}, "sources": {"source.hubspot.hubspot.calendar_event": {"database": "postgres", "schema": "public", "name": "calendar_event", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.calendar_event", "fqn": ["hubspot", "staging", "hubspot", "calendar_event"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "calendar_event", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a calendar event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "avatar_url": {"name": "avatar_url", "description": "URL of image associated with social media event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "campaign_guid": {"name": "campaign_guid", "description": "Value of campaign GUID associated with Task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Type of event. If the event type is PUBLISHING_TASK, it is one of BLOG_POST, EMAIL, LANDING_PAGE, CUSTOM.\nIf event type is SOCIAL, it is one of twitter, facebook, linkedin, googlepluspages.\nIf event type is CONTENT, it is one of email, recurring-email, blog-post, landing-page, legacy-page, site-page.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category_id": {"name": "category_id", "description": "For event type of PUBLISHING_TASK, a numeric value corresponding to the type of task; one of 3 (BLOG_POST), 2 (EMAIL), 1 (LANDING_PAGE), 0 (CUSTOM).\nFor event type of SOCIAL, this is 0.\nIf event type is CONTENT, it is one of 2 (email, recurring-email), 3 (blog-post), 1 (landing-page), 5 (legacy-page), 4 (site-page).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_group_id": {"name": "content_group_id", "description": "The ID of the content group (aka blog) that the associated Blog Post belongs to, if any.\nOtherwise null. Only populated for single task GETs and for Blog Post Tasks.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "ID value of the COS content object associated with the event, null for social or if nothing associated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by": {"name": "created_by", "description": "HubSpot ID of the user that the event was created by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "Description of Event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_date": {"name": "event_date", "description": "If task, When the task is set to be due, otherwise when the event is/ was scheduled for; in milliseconds since the epoch.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "Type of calendar event; for tasks this is PUBLISHING_TASK, for COS Items, this is CONTENT, for social media events, this is SOCIAL", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The unique ID of the task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_recurring": {"name": "is_recurring", "description": "Whether the event is recurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of Event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "TASK - HubSpot ID of the user that the task is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "preview_key": {"name": "preview_key", "description": "Preview key of content object; used for showing previews of unpublished items.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "social_display_name": {"name": "social_display_name", "description": "Social media full name associate with event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "social_username": {"name": "social_username", "description": "Social media user name associated with event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "state": {"name": "state", "description": "For type publishing task, value of TODO or DONE, for others, a value of SCHEDULED, PUBLISHED, PUBLISHED_OR_SCHEDULED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "topic_ids": {"name": "topic_ids", "description": "The list of IDs of topics associated with the associated Blog Post, if any. Otherwise null. Only populated for single task GETs and for Blog Post Tasks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "url": {"name": "url", "description": "Public URL of content item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"calendar_event\"", "created_at": 1786398589.8752444, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company": {"database": "postgres", "schema": "public", "name": "company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company", "fqn": ["hubspot", "staging", "hubspot", "company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a company in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "id": {"name": "id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "is_deleted": {"name": "is_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.is_deleted"]}, "property_name": {"name": "property_name", "description": "The name of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_description": {"name": "property_description", "description": "A short statement about the company's mission and goals.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date the company was added to your account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_industry": {"name": "property_industry", "description": "The type of business the company performs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_address": {"name": "property_address", "description": "The street address of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_address_2": {"name": "property_address_2", "description": "Additional address information for the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_city": {"name": "property_city", "description": "The city where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_state": {"name": "property_state", "description": "The state where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_country": {"name": "property_country", "description": "The country where the company is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_annualrevenue": {"name": "property_annualrevenue", "description": "The actual or estimated annual revenue of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_data\"", "created_at": 1786398589.8775623, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company_list": {"database": "postgres", "schema": "public", "name": "company_list", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company_list", "fqn": ["hubspot", "staging", "hubspot", "company_list"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_list_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a company list in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'CANCELED', 'PENDING', or 'PROCESSING'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, such as 'MANUAL', 'DYNAMIC', or 'SNAPSHOT'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_list_data\"", "created_at": 1786398589.8784866, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company_list_member": {"database": "postgres", "schema": "public", "name": "company_list_member", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company_list_member", "fqn": ["hubspot", "staging", "hubspot", "company_list_member"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_list_member_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a company and a company list.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_list_id": {"name": "company_list_id", "description": "The ID of the related company list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "added_at": {"name": "added_at", "description": "The timestamp a company was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_list_member_data\"", "created_at": 1786398589.8791916, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.company_property_history": {"database": "postgres", "schema": "public", "name": "company_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.company_property_history", "fqn": ["hubspot", "staging", "hubspot", "company_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "company_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to company record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the company property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the company property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the company property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp": {"name": "timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"company_property_history_data\"", "created_at": 1786398589.8798919, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_merge_audit": {"database": "postgres", "schema": "public", "name": "contact_merge_audit", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_merge_audit", "fqn": ["hubspot", "staging", "hubspot", "contact_merge_audit"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_merge_audit_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "DEPRECATED FOR NON-BIGQUERY USERS (will be deprecated on BigQuery as well). Each record contains a contact merge event and the contacts effected by the merge.\n", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "canonical_vid": {"name": "canonical_vid", "description": "The contact ID of the contact which the vid_to_merge contact was merged into.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "entity_id": {"name": "entity_id", "description": "The ID of the related entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_properties_moved": {"name": "num_properties_moved", "description": "The number of properties which were removed from the merged contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "Timestamp of when the contacts were merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_id": {"name": "user_id", "description": "The ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "vid_to_merge": {"name": "vid_to_merge", "description": "The ID of the contact which was merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_merge_audit_data\"", "created_at": 1786398589.8806057, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact": {"database": "postgres", "schema": "public", "name": "contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact", "fqn": ["hubspot", "staging", "hubspot", "contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a contact in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_email_1": {"name": "property_email_1", "description": "The email address of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_company": {"name": "property_company", "description": "The name of the contact's company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_firstname": {"name": "property_firstname", "description": "The contact's first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_lastname": {"name": "property_lastname", "description": "The contact's last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_email": {"name": "property_email", "description": "The contact's email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date that the contact was created in your HubSpot account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_jobtitle": {"name": "property_jobtitle", "description": "The contact's job title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_annualrevenue": {"name": "property_annualrevenue", "description": "The contact's annual company revenue.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_merged_object_ids": {"name": "property_hs_merged_object_ids", "description": "List of mappings representing contact IDs that have been merged into the contact at hand. Captures chained and multi-step merges. Format: ; This field replaced the deprecated `CONTACT_MERGE_AUDIT` table that was deprecated by the Hubspot v3 CRM API.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_data\"", "created_at": 1786398589.8813274, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_form_submission": {"database": "postgres", "schema": "public", "name": "contact_form_submission", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_form_submission", "fqn": ["hubspot", "staging", "hubspot", "contact_form_submission"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_form_submission_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing contact form submission information", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "conversion_id": {"name": "conversion_id", "description": "A Unique ID for the specific form conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The GUID of the form that the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_id": {"name": "page_id", "description": "The ID of the related page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL that the form was submitted on, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "timestamp": {"name": "timestamp", "description": "A Unix timestamp in milliseconds of the time the submission occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "title": {"name": "title", "description": "The title of the page that the form was submitted on. This will default to the name of the form if no title is provided.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_form_submission_data\"", "created_at": 1786398589.882024, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_list": {"database": "postgres", "schema": "public", "name": "contact_list", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_list", "fqn": ["hubspot", "staging", "hubspot", "contact_list"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_list_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a contact list in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "created_at": {"name": "created_at", "description": "A timestamp of the time the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp of the time that the list was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The unique identifier of the user who created the contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID that corresponds to the type of object stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "Indicates the current status of the list's processing, such as 'COMPLETE', 'PROCESSING', 'DONE', or 'FAILED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_type": {"name": "processing_type", "description": "Specifies the type of processing applied to the list, for example, 'STATIC' for static lists or 'DYNAMIC' for dynamic lists.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "Represents the version number of the list, incrementing with each modification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp indicating when the list's filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_error": {"name": "metadata_error", "description": "Any errors that happened the last time the list was processed.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_last_processing_state_change_at": {"name": "metadata_last_processing_state_change_at", "description": "A timestamp of the last time that the processing state changed.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_last_size_change_at": {"name": "metadata_last_size_change_at", "description": "A timestamp of the last time that the size of the list changed.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_processing": {"name": "metadata_processing", "description": "One of DONE, REFRESHING, INITIALIZING, or PROCESSING. DONE indicates the list has finished processing, any other value indicates that list membership is being evaluated.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "metadata_size": {"name": "metadata_size", "description": "The approximate number of contacts in the list.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "'The hub ID.'\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deleteable": {"name": "deleteable", "description": "If this is false, this is a system list and cannot be deleted.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "dynamic": {"name": "dynamic", "description": "Whether the contact list is dynamic.\nNOTE: This field is deprecated and will not be populated for connectors utilizing the HubSpot v3 API. This field will be removed in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_list_data\"", "created_at": 1786398589.8833914, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_list_member": {"database": "postgres", "schema": "public", "name": "contact_list_member", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_list_member", "fqn": ["hubspot", "staging", "hubspot", "contact_list_member"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_list_member_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a contact and a contact list.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "added_at": {"name": "added_at", "description": "The timestamp a contact was added to a list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_list_id": {"name": "contact_list_id", "description": "The ID of the related contact list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_list_member_data\"", "created_at": 1786398589.8840916, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.contact_property_history": {"database": "postgres", "schema": "public", "name": "contact_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.contact_property_history", "fqn": ["hubspot", "staging", "hubspot", "contact_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "contact_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a change to contact record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the contact property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the contact property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the contact property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp": {"name": "timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"contact_property_history_data\"", "created_at": 1786398589.8847952, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal": {"database": "postgres", "schema": "public", "name": "deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal", "fqn": ["hubspot", "staging", "hubspot", "deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a deal in Hubspot.", "columns": {"deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record was deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "deal_pipeline_id": {"name": "deal_pipeline_id", "description": "The ID of the deal's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_pipeline_stage_id": {"name": "deal_pipeline_stage_id", "description": "The ID of the deal's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_dealname": {"name": "property_dealname", "description": "The name you have given this deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_description": {"name": "property_description", "description": "A brief description of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_amount": {"name": "property_amount", "description": "The total value of the deal in the deal's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_closedate": {"name": "property_closedate", "description": "The day the deal is expected to close, or was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date the deal was created. This property is set automatically by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_data\"", "created_at": 1786398589.8855062, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_stage": {"database": "postgres", "schema": "public", "name": "deal_stage", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_stage", "fqn": ["hubspot", "staging", "hubspot", "deal_stage"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_stage_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a deal stage.", "columns": {"_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exist time of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "date_entered": {"name": "date_entered", "description": "The timestamp the deal stage was entered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "Reference to the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The relevant source of the deal stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source_id": {"name": "source_id", "description": "Reference to the source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The value of the deal stage. Typically the name of the stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_stage_data\"", "created_at": 1786398589.886204, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_company": {"database": "postgres", "schema": "public", "name": "deal_company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_company", "fqn": ["hubspot", "staging", "hubspot", "deal_company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a deal and company.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_company_data\"", "created_at": 1786398589.886873, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_contact": {"database": "postgres", "schema": "public", "name": "deal_contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_contact", "fqn": ["hubspot", "staging", "hubspot", "deal_contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a deal and a contact.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type_id": {"name": "type_id", "description": "The ID of the type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_contact_data\"", "created_at": 1786398589.8875515, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_pipeline": {"database": "postgres", "schema": "public", "name": "deal_pipeline", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_pipeline", "fqn": ["hubspot", "staging", "hubspot", "deal_pipeline"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_pipeline_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a pipeline in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the pipelines appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the pipeline. The label is used when showing the pipeline in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_data\"", "created_at": 1786398589.888299, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_pipeline_stage": {"database": "postgres", "schema": "public", "name": "deal_pipeline_stage", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_pipeline_stage", "fqn": ["hubspot", "staging", "hubspot", "deal_pipeline_stage"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_pipeline_stage_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a pipeline stage in Hubspot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the pipeline stage is currently in use.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_won": {"name": "closed_won", "description": "Boolean indicating if the pipeline stage is closed. NOTE: This field is deprecated in favor of the `is_closed` column.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the related pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "probability": {"name": "probability", "description": "The probability that the deal will close. Used for the deal forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "stage_id": {"name": "stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_pipeline_stage_data\"", "created_at": 1786398589.8889859, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.deal_property_history": {"database": "postgres", "schema": "public", "name": "deal_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.deal_property_history", "fqn": ["hubspot", "staging", "hubspot", "deal_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "deal_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to deal record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The date the deal property history record became active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The Fivetran calculated exit time of the deal property history record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether the deal property history record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp": {"name": "timestamp", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"deal_property_history_data\"", "created_at": 1786398589.8896878, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_campaign": {"database": "postgres", "schema": "public", "name": "email_campaign", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_campaign", "fqn": ["hubspot", "staging", "hubspot", "email_campaign"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_campaign_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an email campaign in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The app ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The app name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "content_id": {"name": "content_id", "description": "The ID of the content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_included": {"name": "num_included", "description": "The number of messages included as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "num_queued": {"name": "num_queued", "description": "The number of messages queued as part of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sub_type": {"name": "sub_type", "description": "The email campaign sub-type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "The subject of the email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The email campaign type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_campaign_data\"", "created_at": 1786398589.890403, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event": {"database": "postgres", "schema": "public", "name": "email_event", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event", "fqn": ["hubspot", "staging", "hubspot", "email_event"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an email event in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "app_id": {"name": "app_id", "description": "The ID of the app that sent the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_by_created": {"name": "caused_by_created", "description": "The timestamp of the event that caused this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "caused_by_id": {"name": "caused_by_id", "description": "The event ID which uniquely identifies the event which directly caused this event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created": {"name": "created", "description": "The created timestamp of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_campaign_id": {"name": "email_campaign_id", "description": "The ID of the related email campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filtered_event": {"name": "filtered_event", "description": "A boolean representing whether the event has been filtered out of reporting based on customer reports settings or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_by_created": {"name": "obsoleted_by_created", "description": "The timestamp of the event that made the current event obsolete.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "obsoleted_by_id": {"name": "obsoleted_by_id", "description": "The event ID which uniquely identifies the follow-on event which makes this current event obsolete. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "recipient": {"name": "recipient", "description": "The email address of the contact related to the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_by_created": {"name": "sent_by_created", "description": "The timestamp of the SENT event related to this event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "sent_by_id": {"name": "sent_by_id", "description": "The event ID which uniquely identifies the email message's SENT event. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 84, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_data\"", "created_at": 1786398589.8910968, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_bounce": {"database": "postgres", "schema": "public", "name": "email_event_bounce", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_bounce", "fqn": ["hubspot", "staging", "hubspot", "email_event_bounce"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_bounce_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a BOUNCE email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "category": {"name": "category", "description": "The best-guess of the type of bounce encountered.\nIf an appropriate category couldn't be determined, this property is omitted. See below for the possible values.\nNote that this is a derived value, and may be modified at any time to improve the accuracy of classification.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "response": {"name": "response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status code returned from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_bounce_data\"", "created_at": 1786398589.8917716, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_click": {"database": "postgres", "schema": "public", "name": "email_event_click", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_click", "fqn": ["hubspot", "staging", "hubspot", "email_event_click"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_click_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a CLICK email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "referer": {"name": "referer", "description": "The URL of the webpage that linked to the URL clicked. Whether this is provided, and what its value is, is determined by the recipient's email client.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The URL within the message that the recipient clicked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_click_data\"", "created_at": 1786398589.892495, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_deferred": {"database": "postgres", "schema": "public", "name": "email_event_deferred", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_deferred", "fqn": ["hubspot", "staging", "hubspot", "email_event_deferred"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_deferred_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a DEFERRED email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "attempt": {"name": "attempt", "description": "The delivery attempt number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "response": {"name": "response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_deferred_data\"", "created_at": 1786398589.893164, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_delivered": {"database": "postgres", "schema": "public", "name": "email_event_delivered", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_delivered", "fqn": ["hubspot", "staging", "hubspot", "email_event_delivered"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_delivered_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a DELIVERED email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "response": {"name": "response", "description": "The full response from the recipient's email server.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "smtp_id": {"name": "smtp_id", "description": "An ID attached to the message by HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_delivered_data\"", "created_at": 1786398589.8938196, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_dropped": {"database": "postgres", "schema": "public", "name": "email_event_dropped", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_dropped", "fqn": ["hubspot", "staging", "hubspot", "email_event_dropped"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_dropped_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a DROPPED email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc": {"name": "bcc", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc": {"name": "cc", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_message": {"name": "drop_message", "description": "The raw message describing why the email message was dropped. This will usually provide additional details beyond 'dropReason'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "drop_reason": {"name": "drop_reason", "description": "The reason why the email message was dropped. See below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from": {"name": "from", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to": {"name": "reply_to", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "created_at": 1786398589.8945043, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_forward": {"database": "postgres", "schema": "public", "name": "email_event_forward", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_forward", "fqn": ["hubspot", "staging", "hubspot", "email_event_forward"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_forward_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a FORWARD email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_forward_data\"", "created_at": 1786398589.895179, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_open": {"database": "postgres", "schema": "public", "name": "email_event_open", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_open", "fqn": ["hubspot", "staging", "hubspot", "email_event_open"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_open_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a OPEN email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "duration": {"name": "duration", "description": "If provided and nonzero, the approximate number of milliseconds the user had opened the email.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_open_data\"", "created_at": 1786398589.8958385, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_print": {"database": "postgres", "schema": "public", "name": "email_event_print", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_print", "fqn": ["hubspot", "staging", "hubspot", "email_event_print"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_print_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a PRINT email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "browser": {"name": "browser", "description": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_browser"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "location": {"name": "location", "description": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_location"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_print_data\"", "created_at": 1786398589.8965137, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_sent": {"database": "postgres", "schema": "public", "name": "email_event_sent", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_sent", "fqn": ["hubspot", "staging", "hubspot", "email_event_sent"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_sent_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a SENT email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bcc": {"name": "bcc", "description": "The 'cc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cc": {"name": "cc", "description": "The 'bcc' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from": {"name": "from", "description": "The 'from' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "reply_to": {"name": "reply_to", "description": "The 'reply-to' field of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "The subject line of the email message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "created_at": 1786398589.8971944, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_spam_report": {"database": "postgres", "schema": "public", "name": "email_event_spam_report", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_spam_report", "fqn": ["hubspot", "staging", "hubspot", "email_event_spam_report"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_spam_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a SPAM_REPORT email event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ip_address": {"name": "ip_address", "description": "The contact's IP address when the event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_ip_address"]}, "user_agent": {"name": "user_agent", "description": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.email_event_user_agent"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_spam_report_data\"", "created_at": 1786398589.8978791, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_event_status_change": {"database": "postgres", "schema": "public", "name": "email_event_status_change", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_event_status_change", "fqn": ["hubspot", "staging", "hubspot", "email_event_status_change"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_event_status_change_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a STATUS_CHANGE email event in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "bounced": {"name": "bounced", "description": "A HubSpot employee explicitly initiated the status change to block messages to the recipient.\n(Note this usage has been deprecated in favor of dropping messages with a 'dropReason' of BLOCKED_ADDRESS.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_subscription_status": {"name": "portal_subscription_status", "description": "The recipient's portal subscription status.\nNote that if this is 'UNSUBSCRIBED', the property 'subscriptions' is not necessarily an empty array, nor are all\nsubscriptions contained in it necessarily going to have their statuses set to 'UNSUBSCRIBED'.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requested_by": {"name": "requested_by", "description": "The email address of the person requesting the change on behalf of the recipient. If not applicable, this property is omitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subscriptions": {"name": "subscriptions", "description": "An array of JSON objects representing the status of subscriptions for the recipient.\nEach JSON subscription object is comprised of the properties: 'id', 'status'.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_event_status_change_data\"", "created_at": 1786398589.8985677, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_subscription": {"database": "postgres", "schema": "public", "name": "email_subscription", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_subscription", "fqn": ["hubspot", "staging", "hubspot", "email_subscription"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_subscription", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an email subscription in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the subscription is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "The description of the subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the email subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the email subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_subscription\"", "created_at": 1786398589.8992422, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.email_subscription_change": {"database": "postgres", "schema": "public", "name": "email_subscription_change", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.email_subscription_change", "fqn": ["hubspot", "staging", "hubspot", "email_subscription_change"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "email_subscription_change", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to an email subscription in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "caused_by_event_id": {"name": "caused_by_event_id", "description": "The ID of the event that caused the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change": {"name": "change", "description": "The change which occurred. This enumeration is specific to the 'changeType'; see below for the possible values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "change_type": {"name": "change_type", "description": "The type of change which occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email_subscription_id": {"name": "email_subscription_id", "description": "The ID of the related email subscription.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "recipient": {"name": "recipient", "description": "The email address of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "source": {"name": "source", "description": "The source of the subscription change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "The timestamp when this change occurred. If 'causedByEvent' is present, this will be absent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"email_subscription_change\"", "created_at": 1786398589.8999217, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement": {"database": "postgres", "schema": "public", "name": "engagement", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement", "fqn": ["hubspot", "staging", "hubspot", "engagement"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an engagement", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Whether the engagement is currently being shown in the UI.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the engagement was created.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the engagement's owner.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "timestamp": {"name": "timestamp", "description": "A timestamp in representing the time that the engagement should appear in the timeline.\nPLEASE NOTE: This field will not be populated for connectors utilizing the HubSpot v3 API version. This field will be deprecated in a future release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "One of NOTE, EMAIL, TASK, MEETING, or CALL, the type of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_data\"", "created_at": 1786398589.9006026, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_call": {"database": "postgres", "schema": "public", "name": "engagement_call", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_call", "fqn": ["hubspot", "staging", "hubspot", "engagement_call"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_call_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a CALL engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean to mark rows that were deleted in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the call's time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the call's time of occurrence and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the call. This field determines the team listed as the call creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_call_data\"", "created_at": 1786398589.9012766, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_communication": {"database": "postgres", "schema": "public", "name": "engagement_communication", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_communication", "fqn": ["hubspot", "staging", "hubspot", "engagement_communication"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_communication_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a communication and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "engagement_id": {"name": "engagement_id", "description": "ID of the engagement associated with the communication.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "Timestamp indicating when the communication was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_timestamp": {"name": "property_hs_timestamp", "description": "Timestamp of the communication event linked to the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of communication (e.g., email, call, meeting).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_communication_data\"", "created_at": 1786398589.901925, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_company": {"database": "postgres", "schema": "public", "name": "engagement_company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_company", "fqn": ["hubspot", "staging", "hubspot", "engagement_company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a company and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_company_data\"", "created_at": 1786398589.9025908, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_contact": {"database": "postgres", "schema": "public", "name": "engagement_contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_contact", "fqn": ["hubspot", "staging", "hubspot", "engagement_contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a contact and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_contact_data\"", "created_at": 1786398589.9033048, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_deal": {"database": "postgres", "schema": "public", "name": "engagement_deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_deal", "fqn": ["hubspot", "staging", "hubspot", "engagement_deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a deal and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "deal_id": {"name": "deal_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_deal_data\"", "created_at": 1786398589.903941, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_email": {"database": "postgres", "schema": "public", "name": "engagement_email", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_email", "fqn": ["hubspot", "staging", "hubspot", "engagement_email"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_email_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an EMAIL engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the email's time of occurrence and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the email. This field determines the team listed as the email creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_email_data\"", "created_at": 1786398589.9046118, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_email_cc": {"database": "postgres", "schema": "public", "name": "engagement_email_cc", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_email_cc", "fqn": ["hubspot", "staging", "hubspot", "engagement_email_cc"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_email_cc", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a CC'd email address as part of an EMAIL engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "email": {"name": "email", "description": "The email address of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_email_cc\"", "created_at": 1786398589.905277, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_email_to": {"database": "postgres", "schema": "public", "name": "engagement_email_to", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_email_to", "fqn": ["hubspot", "staging", "hubspot", "engagement_email_to"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_email_to", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a TO email address as part of an EMAIL engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "email": {"name": "email", "description": "The email address of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_email_to\"", "created_at": 1786398589.9059138, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_meeting": {"database": "postgres", "schema": "public", "name": "engagement_meeting", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_meeting", "fqn": ["hubspot", "staging", "hubspot", "engagement_meeting"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_meeting_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a MEETING engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the meeting's time of creation and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the meeting's time of occurrence and determines where the meeting sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the meeting. This field determines the user listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the meeting. This field determines the team listed as the meeting creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_meeting_data\"", "created_at": 1786398589.9065905, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_note": {"database": "postgres", "schema": "public", "name": "engagement_note", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_note", "fqn": ["hubspot", "staging", "hubspot", "engagement_note"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_note_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a NOTE engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "body": {"name": "body", "description": "The body of the note. The body has a limit of 65536 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the note's time of creation and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the note's time of occurrence and determines where the note sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the note. This field determines the user listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the note. This field determines the team listed as the note creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_note_data\"", "created_at": 1786398589.9072697, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.engagement_task": {"database": "postgres", "schema": "public", "name": "engagement_task", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.engagement_task", "fqn": ["hubspot", "staging", "hubspot", "engagement_task"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "engagement_task_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a TASK engagement event.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "engagement_id": {"name": "engagement_id", "description": "The ID of the engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_createdate": {"name": "property_hs_createdate", "description": "This field marks the task's time of creation and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "timestamp": {"name": "timestamp", "description": "This field marks the task's time of occurrence and determines where the task sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. \nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the owner associated with the task. This field determines the user listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version. For the pre HubSpot v3 versions, this value may be found within the parent `engagement` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_team_id": {"name": "property_hubspot_team_id", "description": "The ID of the team associated with the task. This field determines the team listed as the task creator on the record timeline.\nPLEASE NOTE: This field will only be populated for connectors utilizing the HubSpot v3 API version.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"engagement_task_data\"", "created_at": 1786398589.9079034, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.form": {"database": "postgres", "schema": "public", "name": "form", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.form", "fqn": ["hubspot", "staging", "hubspot", "form"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "form_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a form created in HubSpot, including metadata about its configuration and behavior.", "columns": {"guid": {"name": "guid", "description": "Unique identifier for the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "action": {"name": "action", "description": "The form action type or endpoint triggered upon submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the form was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "css_class": {"name": "css_class", "description": "CSS class applied to the form for styling purposes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "follow_up_id": {"name": "follow_up_id", "description": "ID of the follow-up action or workflow triggered by the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_type": {"name": "form_type", "description": "Category of the form, such as regular, pop-up, or embedded form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "lead_nurturing_campaign_id": {"name": "lead_nurturing_campaign_id", "description": "ID of the associated lead nurturing campaign, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "method": {"name": "method", "description": "HTTP method used for form submission (typically POST).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the form as defined in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "notify_recipients": {"name": "notify_recipients", "description": "List of email addresses that receive notifications on form submissions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "redirect": {"name": "redirect", "description": "URL users are redirected to after submitting the form.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submit_text": {"name": "submit_text", "description": "Text displayed on the form's submit button.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the form was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"form_data\"", "created_at": 1786398589.9086626, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.submission_response": {"database": "postgres", "schema": "public", "name": "submission_response", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.submission_response", "fqn": ["hubspot", "staging", "hubspot", "submission_response"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "submission_response_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a single field response from a HubSpot form submission.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "conversion_id": {"name": "conversion_id", "description": "Unique identifier for the specific form conversion event. Joins with `CONTACT_FORM_SUBMISSION.conversion_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "form_id": {"name": "form_id", "description": "The ID of the `FORM` the submission belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_name": {"name": "field_name", "description": "The name of the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_value": {"name": "field_value", "description": "The value submitted for the form field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "submitted_at": {"name": "submitted_at", "description": "Unix timestamp in milliseconds of when the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "page_url": {"name": "page_url", "description": "The URL of the page where the form was submitted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the HubSpot object type associated with the submission.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"submission_response_data\"", "created_at": 1786398589.90935, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.owner": {"database": "postgres", "schema": "public", "name": "owner", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.owner", "fqn": ["hubspot", "staging", "hubspot", "owner"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "owner_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an owner/user in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active_user_id": {"name": "active_user_id", "description": "ID of the active user account associated with the owner. Null if owner is not an active user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp for when the owner was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "The email address of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "The first name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "The last name of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "type": {"name": "type", "description": "The type of owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp the owner was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"owner_data\"", "created_at": 1786398589.9100127, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.property": {"database": "postgres", "schema": "public", "name": "property", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.property", "fqn": ["hubspot", "staging", "hubspot", "property"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "property_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a property.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "(DEPRECATED IN OCTOBER 2025) Fivetran generated id. Joins to `property_id` (ALSO DEPRECATED) in the `PROPERTY_OPTION` table. Use `hubspot_object` to join to `property_option` instead.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "calculated": {"name": "calculated", "description": "Indicates if the property is calculated by a HubSpot process", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp representing when the property was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "description": {"name": "description", "description": "A description of the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "field_type": {"name": "field_type", "description": "One of textarea, text, date, file, number, select, radio, checkbox, or booleancheckbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "group_name": {"name": "group_name", "description": "The name of the property group that the property belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_defined": {"name": "hubspot_defined", "description": "This will be true for default properties that are built into HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this property is related to other objects, the object will be listed here. Part of the composite primary key with `name`. Use `hubspot_object` to join with the `PROPERTY_OPTION` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "A human readable label for the property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The internal name of the property. Part of the composite primary key with `hubspot_object`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "show_currency_symbol": {"name": "show_currency_symbol", "description": "If true, the property will display the currency symbol set in the portal settings.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "One of string, number, date, datetime, or enumeration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp representing when the property was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"property_data\"", "created_at": 1786398589.9107194, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.property_option": {"database": "postgres", "schema": "public", "name": "property_option", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.property_option", "fqn": ["hubspot", "staging", "hubspot", "property_option"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "property_option_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an option for the related property.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "label": {"name": "label", "description": "The label of the option displayed inside the HubSpot app. Part of the composite primary key with `name` and `hubspot_object`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_id": {"name": "property_id", "description": "(DEPRECATED IN OCTOBER 2025) The ID of the related property. Use `hubspot_object` to join with the `PROPERTY` table instead.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Order of options displayed in Hubspot, starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hidden": {"name": "hidden", "description": "Boolean if the option will be displayed in HubSpot", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The internal value of the option.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "hubspot_object": {"name": "hubspot_object", "description": "If this option's property is related to other objects, the object will be listed here. Part of the composite primary key with `name` and `label`. Use `hubspot_object` to join with the `PROPERTY` table.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The internal name of the property option. Part of the composite primary key with `hubspot_object` and `label`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"property_option_data\"", "created_at": 1786398589.9114087, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_company": {"database": "postgres", "schema": "public", "name": "ticket_company", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_company", "fqn": ["hubspot", "staging", "hubspot", "ticket_company"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_company_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and company.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "company_id": {"name": "company_id", "description": "The ID of the related company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_company_data\"", "created_at": 1786398589.912056, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_contact": {"database": "postgres", "schema": "public", "name": "ticket_contact", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_contact", "fqn": ["hubspot", "staging", "hubspot", "ticket_contact"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and a contact.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_contact_data\"", "created_at": 1786398589.9127212, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_deal": {"database": "postgres", "schema": "public", "name": "ticket_deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_deal", "fqn": ["hubspot", "staging", "hubspot", "ticket_deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and a deal.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deal_id": {"name": "deal_id", "description": "The ID of the related deal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_deal_data\"", "created_at": 1786398589.9134278, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_engagement": {"database": "postgres", "schema": "public", "name": "ticket_engagement", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_engagement", "fqn": ["hubspot", "staging", "hubspot", "ticket_engagement"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_engagement_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a 'link' between a ticket and an engagement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "engagement_id": {"name": "engagement_id", "description": "The ID of the related engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "category": {"name": "category", "description": "The association category. Either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_engagement_data\"", "created_at": 1786398589.9140723, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_pipeline_stage": {"database": "postgres", "schema": "public", "name": "ticket_pipeline_stage", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_pipeline_stage", "fqn": ["hubspot", "staging", "hubspot", "ticket_pipeline_stage"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_pipeline_stage_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a ticket pipeline stage.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Boolean indicating whether the pipeline stage is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_closed": {"name": "is_closed", "description": "Boolean indicating if the pipeline stage is closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "The ID of the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "stage_id": {"name": "stage_id", "description": "The ID of the pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "ticket_state": {"name": "ticket_state", "description": "State of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_stage_data\"", "created_at": 1786398589.914778, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_pipeline": {"database": "postgres", "schema": "public", "name": "ticket_pipeline", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_pipeline", "fqn": ["hubspot", "staging", "hubspot", "ticket_pipeline"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_pipeline_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a ticket pipeline.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "active": {"name": "active", "description": "Boolean indicating whether the pipeline is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "display_order": {"name": "display_order", "description": "Used to determine the order in which the stages appear when viewed in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "label": {"name": "label", "description": "The human-readable label for the stage. The label is used when showing the stage in HubSpot.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "Reference to the object type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "pipeline_id": {"name": "pipeline_id", "description": "Reference to the pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "A timestamp representing when the record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "A timestamp representing when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_pipeline_data\"", "created_at": 1786398589.9154668, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket_property_history": {"database": "postgres", "schema": "public", "name": "ticket_property_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket_property_history", "fqn": ["hubspot", "staging", "hubspot", "ticket_property_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_property_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a change to ticket record in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "source": {"name": "source", "description": "The source (reason) of the change.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source"]}, "source_id": {"name": "source_id", "description": "The ID of the object that caused the change, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_source_id"]}, "timestamp_instant": {"name": "timestamp_instant", "description": "The timestamp the changed occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_timestamp"]}, "ticket_id": {"name": "ticket_id", "description": "The ID of the related ticket record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the field being changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_name"]}, "value": {"name": "value", "description": "The new value of the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.history_value"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_property_history_data\"", "created_at": 1786398589.9161623, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.ticket": {"database": "postgres", "schema": "public", "name": "ticket", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.ticket", "fqn": ["hubspot", "staging", "hubspot", "ticket"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "ticket_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a ticket in Hubspot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "ID of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record was deleted (v2 endpoint).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Whether the record was deleted (v3 endpoint).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "portal_id": {"name": "portal_id", "description": "The hub ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot.portal_id"]}, "property_closed_date": {"name": "property_closed_date", "description": "The date the ticket was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_createdate": {"name": "property_createdate", "description": "The date the ticket was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_first_agent_reply_date": {"name": "property_first_agent_reply_date", "description": "the date for the first agent reply on the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_pipeline": {"name": "property_hs_pipeline", "description": "The ID of the ticket's pipeline.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_pipeline_stage": {"name": "property_hs_pipeline_stage", "description": "The ID of the ticket's pipeline stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_ticket_priority": {"name": "property_hs_ticket_priority", "description": "The priority of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hs_ticket_category": {"name": "property_hs_ticket_category", "description": "The category of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_hubspot_owner_id": {"name": "property_hubspot_owner_id", "description": "The ID of the deal's owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_subject": {"name": "property_subject", "description": "Short summary of ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "property_content": {"name": "property_content", "description": "Text in body of the ticket.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"ticket_data\"", "created_at": 1786398589.9168653, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.merged_deal": {"database": "postgres", "schema": "public", "name": "merged_deal", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.merged_deal", "fqn": ["hubspot", "staging", "hubspot", "merged_deal"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "merged_deal_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a deal that has been merged along with the related deal it's been merged into.", "columns": {"deal_id": {"name": "deal_id", "description": "The ID of the deal the record has been merged INTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "merged_deal_id": {"name": "merged_deal_id", "description": "ID of deal that has been merged.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"merged_deal_data\"", "created_at": 1786398589.9175274, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.owner_team": {"database": "postgres", "schema": "public", "name": "owner_team", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.owner_team", "fqn": ["hubspot", "staging", "hubspot", "owner_team"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "owner_team_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table mapping owners to their associated teams in HubSpot.", "columns": {"owner_id": {"name": "owner_id", "description": "Unique ID of the HubSpot owner (user) assigned to the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the team to which the owner belongs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_team_primary": {"name": "is_team_primary", "description": "Indicates whether the team is the owner's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"owner_team_data\"", "created_at": 1786398589.9182675, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.role": {"database": "postgres", "schema": "public", "name": "role", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.role", "fqn": ["hubspot", "staging", "hubspot", "role"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "role_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing role information for HubSpot users.", "columns": {"id": {"name": "id", "description": "Unique ID of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "requires_billing_write": {"name": "requires_billing_write", "description": "Indicates whether the role requires billing write access.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"role_data\"", "created_at": 1786398589.9189222, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.team": {"database": "postgres", "schema": "public", "name": "team", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.team", "fqn": ["hubspot", "staging", "hubspot", "team"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "team_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing HubSpot team details.", "columns": {"id": {"name": "id", "description": "Unique ID of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"team_data\"", "created_at": 1786398589.9195924, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.team_user": {"database": "postgres", "schema": "public", "name": "team_user", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.team_user", "fqn": ["hubspot", "staging", "hubspot", "team_user"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "team_user_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table representing associations between users and teams, including secondary team assignments.", "columns": {"user_id": {"name": "user_id", "description": "Unique ID of the user associated with the team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "team_id": {"name": "team_id", "description": "Unique ID of the associated team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "is_secondary_user": {"name": "is_secondary_user", "description": "Indicates whether the team is a secondary team for the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"team_user_data\"", "created_at": 1786398589.9202676, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.users": {"database": "postgres", "schema": "public", "name": "users", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.users", "fqn": ["hubspot", "staging", "hubspot", "users"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "users_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing information about HubSpot users.", "columns": {"id": {"name": "id", "description": "Unique ID of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "primary_team_id": {"name": "primary_team_id", "description": "ID of the user's primary team.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "role_id": {"name": "role_id", "description": "ID of the role assigned to the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "first_name": {"name": "first_name", "description": "First name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "last_name": {"name": "last_name", "description": "Last name of the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"users_data\"", "created_at": 1786398589.920929, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_actor": {"database": "postgres", "schema": "public", "name": "conversation_actor", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_actor", "fqn": ["hubspot", "staging", "hubspot", "conversation_actor"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_actor_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table containing actors involved in Hubspot conversations.", "columns": {"id": {"name": "id", "description": "Unique ID of the actor. The first letter corresponds with the type of actor (A- agent, B- bot, S- system, E- email, I- integration, L- customer agent)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "avatar": {"name": "avatar", "description": "URL of the actor's avatar image.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Email address of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the actor.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the actor (e.g., VISITOR, AGENT, BOT, SYSTEM)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_actor_data\"", "created_at": 1786398589.9215934, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_inbox": {"database": "postgres", "schema": "public", "name": "conversation_inbox", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_inbox", "fqn": ["hubspot", "staging", "hubspot", "conversation_inbox"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_inbox_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a conversation inbox in HubSpot.", "columns": {"id": {"name": "id", "description": "Unique ID of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "active": {"name": "active", "description": "Boolean indicating whether the inbox is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the inbox was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the inbox.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the inbox (e.g., HELP_DESK, INBOX).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the inbox was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_inbox_data\"", "created_at": 1786398589.9222817, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_channel": {"database": "postgres", "schema": "public", "name": "conversation_channel", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_channel", "fqn": ["hubspot", "staging", "hubspot", "conversation_channel"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_channel_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a channel through which users can contact your team, such as email, Chat, Facebook Messenger, or WhatsApp.", "columns": {"id": {"name": "id", "description": "Unique ID of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_channel_data\"", "created_at": 1786398589.9229271, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_channel_account": {"database": "postgres", "schema": "public", "name": "conversation_channel_account", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_channel_account", "fqn": ["hubspot", "staging", "hubspot", "conversation_channel_account"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_channel_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents an instance of a channel connected to an inbox, such as a specific email address or Facebook Messenger account.", "columns": {"id": {"name": "id", "description": "Unique ID of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel this account belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox this channel account is connected to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "active": {"name": "active", "description": "Boolean indicating whether the channel account is active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "authorized": {"name": "authorized", "description": "Boolean indicating whether the channel account is authorized.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the channel account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the channel account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for this channel account (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_channel_account_data\"", "created_at": 1786398589.9236693, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_thread": {"database": "postgres", "schema": "public", "name": "conversation_thread", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_thread", "fqn": ["hubspot", "staging", "hubspot", "conversation_thread"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_thread_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a conversation thread in HubSpot.", "columns": {"id": {"name": "id", "description": "Unique ID of the conversation thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "inbox_id": {"name": "inbox_id", "description": "ID of the inbox the thread belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_contact_id": {"name": "associated_contact_id", "description": "ID of the contact associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "associated_ticket_id": {"name": "associated_ticket_id", "description": "ID of the ticket associated with the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_account_id": {"name": "original_channel_account_id", "description": "ID of the channel account through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "original_channel_id": {"name": "original_channel_id", "description": "ID of the channel through which the thread was originally created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to": {"name": "assigned_to", "description": "ID of the agent the thread is assigned to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "closed_at": {"name": "closed_at", "description": "Timestamp when the thread was closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the thread was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_received_timestamp": {"name": "latest_message_received_timestamp", "description": "Timestamp of the most recently received message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_sent_timestamp": {"name": "latest_message_sent_timestamp", "description": "Timestamp of the most recently sent message in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "latest_message_timestamp": {"name": "latest_message_timestamp", "description": "Timestamp of the most recent message (sent or received) in the thread.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "spam": {"name": "spam", "description": "Indicates whether the thread has been marked as spam.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the thread (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_thread_data\"", "created_at": 1786398589.9244063, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_message_history": {"database": "postgres", "schema": "public", "name": "conversation_message_history", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_message_history", "fqn": ["hubspot", "staging", "hubspot", "conversation_message_history"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_message_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a version of a conversation message, tracking changes over time via SCD Type 2.", "columns": {"id": {"name": "id", "description": "Unique ID of the conversation message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_account_id": {"name": "channel_account_id", "description": "ID of the channel account associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "channel_id": {"name": "channel_id", "description": "ID of the channel associated with this message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "from_inbox_id": {"name": "from_inbox_id", "description": "ID of the inbox the message was sent from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "to_inbox_id": {"name": "to_inbox_id", "description": "ID of the inbox the message was sent to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_to": {"name": "assigned_to", "description": "ID of the agent the thread was assigned to at message time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "assigned_from": {"name": "assigned_from", "description": "ID of the previous assignee before this message triggered a reassignment.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the message was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by": {"name": "created_by", "description": "ID of the user who created the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "direction": {"name": "direction", "description": "Direction of the message (e.g., INCOMING, OUTGOING).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "in_reply_to_id": {"name": "in_reply_to_id", "description": "ID of the message this message is a reply to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "new_status": {"name": "new_status", "description": "The thread status set by this message event (e.g., OPEN, CLOSED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "rich_text": {"name": "rich_text", "description": "HTML-formatted body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "subject": {"name": "subject", "description": "Subject line of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "text": {"name": "text", "description": "Plain-text body of the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "truncation_status": {"name": "truncation_status", "description": "Indicates whether the message body was truncated (e.g., NOT_TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY, TRUNCATED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "type": {"name": "type", "description": "Type of the message event (e.g., MESSAGE, COMMENT, WELCOME_MESSAGE).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp when the message record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "client_type": {"name": "client_type", "description": "The type of client used to send the message (e.g., SYSTEM, HUBSPOT, INTEGRATION)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "status_type": {"name": "status_type", "description": "The status type of the message (e.g., SENT, RECEIVED)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "_fivetran_start": {"name": "_fivetran_start", "description": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_start"]}, "_fivetran_end": {"name": "_fivetran_end", "description": "The (UTC DATETIME) when a record became inactive in the source database.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_end"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean indicating whether this is the currently active version of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_message_history_data\"", "created_at": 1786398589.9251916, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event": {"database": "postgres", "schema": "public", "name": "marketing_event", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event", "fqn": ["hubspot", "staging", "hubspot", "marketing_event"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a marketing event in HubSpot.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The unique ID of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The string ID of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The name of the app associated with the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "attendees": {"name": "attendees", "description": "Number of attended contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "cancellations": {"name": "cancellations", "description": "Number of cancelled contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp when the marketing event was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "end_date_time": {"name": "end_date_time", "description": "The timestamp when the marketing event ends.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_cancelled": {"name": "event_cancelled", "description": "Boolean indicating whether the marketing event was cancelled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_completed": {"name": "event_completed", "description": "Boolean indicating whether the marketing event has been completed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_description": {"name": "event_description", "description": "A description of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_name": {"name": "event_name", "description": "The name of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_organizer": {"name": "event_organizer", "description": "The name of the organizer of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_status": {"name": "event_status", "description": "The current status of the marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_type": {"name": "event_type", "description": "The type of marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "event_url": {"name": "event_url", "description": "A URL in the external event application where the marketing event can be managed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "external_event_id": {"name": "external_event_id", "description": "The ID that is associated with this marketing event in the external event application.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "no_shows": {"name": "no_shows", "description": "Number of no-show contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "registrants": {"name": "registrants", "description": "Number of registered contact records of a marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "start_date_time": {"name": "start_date_time", "description": "The timestamp when the marketing event starts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp when the marketing event was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_data\"", "created_at": 1786398589.9259987, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event_list": {"database": "postgres", "schema": "public", "name": "marketing_event_list", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event_list", "fqn": ["hubspot", "staging", "hubspot", "marketing_event_list"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_list_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a list associated with a marketing event in HubSpot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The unique ID of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the marketing event list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_by_id": {"name": "created_by_id", "description": "The ID of the user who created the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_by_id": {"name": "updated_by_id", "description": "The ID of the user who last updated the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "filters_updated_at": {"name": "filters_updated_at", "description": "The timestamp when the list filters were last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp when the list was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "processing_status": {"name": "processing_status", "description": "The current processing status of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "deleted_at": {"name": "deleted_at", "description": "The timestamp when the list was deleted, if applicable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "list_version": {"name": "list_version", "description": "The version number of the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "object_type_id": {"name": "object_type_id", "description": "The ID corresponding to the object type stored by the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "size": {"name": "size", "description": "The number of records in the list.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp when the list was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_list_data\"", "created_at": 1786398589.9267175, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event_participant": {"database": "postgres", "schema": "public", "name": "marketing_event_participant", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event_participant", "fqn": ["hubspot", "staging", "hubspot", "marketing_event_participant"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_participant_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a participant in a marketing event in HubSpot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "id": {"name": "id", "description": "The unique ID of the marketing event participant record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "contact_id": {"name": "contact_id", "description": "The ID of the related contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp when the participant record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_occurred_at": {"name": "properties_occurred_at", "description": "The timestamp when the participation event occurred.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_attendance_percentage": {"name": "properties_attendance_percentage", "description": "Percentage of the participation duration relative to the event duration.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_attendance_state": {"name": "properties_attendance_state", "description": "The attendance state of the participant (e.g., ATTENDED, CANCELLED, EMPTY, NO_SHOW, REGISTERED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "properties_attendance_duration_seconds": {"name": "properties_attendance_duration_seconds", "description": "The number of seconds the participation lasted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_participant_data\"", "created_at": 1786398589.9273992, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.marketing_event_custom_property": {"database": "postgres", "schema": "public", "name": "marketing_event_custom_property", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.marketing_event_custom_property", "fqn": ["hubspot", "staging", "hubspot", "marketing_event_custom_property"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "marketing_event_custom_property_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a custom property on a marketing event in HubSpot.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}, "marketing_event_id": {"name": "marketing_event_id", "description": "The ID of the related marketing event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The value of the custom property.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"marketing_event_custom_property_data\"", "created_at": 1786398589.9280305, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}, "source.hubspot.hubspot.conversation_message_recipient": {"database": "postgres", "schema": "public", "name": "conversation_message_recipient", "resource_type": "source", "package_name": "hubspot", "path": "models/staging/src_hubspot.yml", "original_file_path": "models/staging/src_hubspot.yml", "unique_id": "source.hubspot.hubspot.conversation_message_recipient", "fqn": ["hubspot", "staging", "hubspot", "conversation_message_recipient"], "source_name": "hubspot", "source_description": "", "loader": "Fivetran", "identifier": "conversation_message_recipient_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Each record represents a recipient associated with a conversation message.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Unique ID generated by Fivetran for this recipient record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "actor_id": {"name": "actor_id", "description": "ID of the actor (user or contact) who received the message.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "message_id": {"name": "message_id", "description": "ID of the message this recipient is associated with.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "thread_id": {"name": "thread_id", "description": "ID of the thread this message belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Display name of the recipient.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "recipient_field": {"name": "recipient_field", "description": "The role of this recipient in the message (e.g., TO, CC, BCC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_type": {"name": "delivery_identifier_type", "description": "The type of delivery identifier for the recipient (e.g., HS_EMAIL_ADDRESS).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "delivery_identifier_value": {"name": "delivery_identifier_value", "description": "The value of the delivery identifier (e.g., the email address).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "dimension": null, "entity": null, "doc_blocks": ["doc.hubspot._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"conversation_message_recipient_data\"", "created_at": 1786398589.9287457, "unrendered_database": "{% if target.type != 'spark'%}{{ var('hubspot_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('hubspot_schema', 'hubspot') }}", "doc_blocks": []}}, "macros": {"macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2474358, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1786398582.247963, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2482345, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.248478, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2487035, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {% endif -%}\n {% if contract_config.enforced and (not temporary) -%}\n {{ get_table_columns_and_constraints() }} ;\n insert into {{ relation }} (\n {{ adapter.dispatch('get_column_names', 'dbt')() }}\n )\n {%- set sql = get_select_subquery(sql) %}\n {% else %}\n as\n {% endif %}\n (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.253066, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1786398582.254189, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.254821, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.255454, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2564013, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select distinct\n '{{ schema_relation.database }}' as database,\n proname as name,\n ns.nspname as schema,\n 'function' as type\n from pg_proc\n join pg_namespace as ns on pronamespace = ns.oid\n where ns.nspname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786398582.257392, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786398582.257741, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786398582.2584379, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1786398582.2592576, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n {% if dstring %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix = suffix ~ dtstring %}\n {% endif %}\n {% set suffix_length = suffix|length %}\n {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n {% endif %}\n {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "dstring", "type": null, "description": ""}], "created_at": 1786398582.2608812, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.2612906, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n {{ return(temp_relation.incorporate(path={\"schema\": none,\n \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.2619052, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.2624652, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "comment", "type": null, "description": ""}], "created_at": 1786398582.2633166, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n {% if relation.type == 'materialized_view' -%}\n {% set relation_type = \"materialized view\" %}\n {%- else -%}\n {%- set relation_type = relation.type -%}\n {%- endif -%}\n comment on {{ relation_type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "comment", "type": null, "description": ""}], "created_at": 1786398582.264147, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1786398582.26545, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n select grantee, privilege_type\n from {{ relation.information_schema('role_table_grants') }}\n where grantor = current_role\n and grantee != current_role\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2658527, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2660904, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_indexes_sql": {"name": "postgres__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_indexes_sql", "macro_sql": "{% macro postgres__get_show_indexes_sql(relation) %}\n select\n i.relname as name,\n m.amname as method,\n ix.indisunique as \"unique\",\n array_to_string(array_agg(a.attname), ',') as column_names\n from pg_index ix\n join pg_class i\n on i.oid = ix.indexrelid\n join pg_am m\n on m.oid=i.relam\n join pg_class t\n on t.oid = ix.indrelid\n join pg_namespace n\n on n.oid = t.relnamespace\n join pg_attribute a\n on a.attrelid = t.oid\n and a.attnum = ANY(ix.indkey)\n where t.relname = '{{ relation.identifier }}'\n and n.nspname = '{{ relation.schema }}'\n and t.relkind in ('r', 'm')\n group by 1, 2, 3\n order by 1, 2, 3\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2664564, "supported_languages": null}, "macro.dbt_postgres.postgres__get_drop_index_sql": {"name": "postgres__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_drop_index_sql", "macro_sql": "\n\n\n{%- macro postgres__get_drop_index_sql(relation, index_name) -%}\n drop index if exists \"{{ relation.schema }}\".\"{{ index_name }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1786398582.2667418, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog_relations": {"name": "postgres__get_catalog_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog_relations", "macro_sql": "{% macro postgres__get_catalog_relations(information_schema, relations) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n when 'm' then 'MATERIALIZED VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for relation in relations -%}\n {%- if relation.identifier -%}\n (upper(sch.nspname) = upper('{{ relation.schema }}') and\n upper(tbl.relname) = upper('{{ relation.identifier }}'))\n {%- else-%}\n upper(sch.nspname) = upper('{{ relation.schema }}')\n {%- endif -%}\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p', 'm') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table, [m]aterialized view. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786398582.2686627, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n {%- set relations = [] -%}\n {%- for schema in schemas -%}\n {%- set dummy = relations.append({'schema': schema}) -%}\n {%- endfor -%}\n {{ return(postgres__get_catalog_relations(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1786398582.2693954, "supported_languages": null}, "macro.dbt_postgres.postgres__get_relations": {"name": "postgres__get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres__get_relations", "macro_sql": "{% macro postgres__get_relations() -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n select distinct\n dependent_namespace.nspname as dependent_schema,\n dependent_class.relname as dependent_name,\n referenced_namespace.nspname as referenced_schema,\n referenced_class.relname as referenced_name\n\n -- Query for views: views are entries in pg_class with an entry in pg_rewrite, but we avoid\n -- a seq scan on pg_rewrite by leveraging the fact there is an \"internal\" row in pg_depend for\n -- the view...\n from pg_class as dependent_class\n join pg_namespace as dependent_namespace on dependent_namespace.oid = dependent_class.relnamespace\n join pg_depend as dependent_depend on dependent_depend.refobjid = dependent_class.oid\n and dependent_depend.classid = 'pg_rewrite'::regclass\n and dependent_depend.refclassid = 'pg_class'::regclass\n and dependent_depend.deptype = 'i'\n\n -- ... and via pg_depend (that has a row per column, hence the need for \"distinct\" above, and\n -- making sure to exclude the internal row to avoid a view appearing to depend on itself)...\n join pg_depend as joining_depend on joining_depend.objid = dependent_depend.objid\n and joining_depend.classid = 'pg_rewrite'::regclass\n and joining_depend.refclassid = 'pg_class'::regclass\n and joining_depend.refobjid != dependent_depend.refobjid\n\n -- ... we can find the tables they query from in pg_class, but excluding system tables. Note we\n -- don't need need to exclude _dependent_ system tables, because they only query from other\n -- system tables, and so are automatically excluded by excluding _referenced_ system tables\n join pg_class as referenced_class on referenced_class.oid = joining_depend.refobjid\n join pg_namespace as referenced_namespace on referenced_namespace.oid = referenced_class.relnamespace\n and referenced_namespace.nspname != 'information_schema'\n and referenced_namespace.nspname not like 'pg\\_%'\n\n order by\n dependent_schema, dependent_name, referenced_schema, referenced_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2703576, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations() %}\n {{ return(postgres__get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2706237, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786398582.271046, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.2713795, "supported_languages": null}, "macro.dbt_postgres.postgres__equals": {"name": "postgres__equals", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt_postgres.postgres__equals", "macro_sql": "{% macro postgres__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n ({{ expr1 }} IS NOT DISTINCT FROM {{ expr2 }})\n{%- else -%}\n ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1786398582.2719986, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1786398582.273019, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.2770412, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.278011, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786398582.278798, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n update {{ target }}\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }}::text = {{ target }}.{{ columns.dbt_scd_id }}::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n {% if config.get(\"dbt_valid_to_current\") %}\n and ({{ target }}.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }} or {{ target }}.{{ columns.dbt_valid_to }} is null);\n {% else %}\n and {{ target }}.{{ columns.dbt_valid_to }} is null;\n {% endif %}\n\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1786398582.2809827, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n {% else %}\n {% do return(get_incremental_append_sql(arg_dict)) %}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.2818666, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_microbatch_sql": {"name": "postgres__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_microbatch_sql", "macro_sql": "{% macro postgres__get_incremental_microbatch_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"dbt-postgres 'microbatch' requires a `unique_key` config\") }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_merge_sql", "macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.2825363, "supported_languages": null}, "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql": {"name": "postgres__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql", "macro_sql": "{% macro postgres__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {% set default_value = arg.get('default_value', none) %}\n {% if default_value != none %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type ~ ' DEFAULT ' ~ default_value) -%}\n {% else %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {% endif %}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2839043, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_table_sql": {"name": "postgres__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_table_sql", "macro_sql": "{% macro postgres__get_rename_table_sql(relation, new_name) %}\n alter table {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.2842903, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_table_sql": {"name": "postgres__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_table_sql", "macro_sql": "{% macro postgres__get_replace_table_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.2855237, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_table": {"name": "postgres__drop_table", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_table", "macro_sql": "{% macro postgres__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2858174, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_view_sql": {"name": "postgres__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_view_sql", "macro_sql": "{% macro postgres__get_rename_view_sql(relation, new_name) %}\n alter view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.2861855, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_view_sql": {"name": "postgres__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_view_sql", "macro_sql": "{% macro postgres__get_replace_view_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.2871995, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_view": {"name": "postgres__drop_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_view", "macro_sql": "{% macro postgres__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2874925, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/describe.sql", "original_file_path": "macros/relations/materialized_view/describe.sql", "unique_id": "macro.dbt_postgres.postgres__describe_materialized_view", "macro_sql": "{% macro postgres__describe_materialized_view(relation) %}\n -- for now just get the indexes, we don't need the name or the query yet\n {% set _indexes = run_query(get_show_indexes_sql(relation)) %}\n {% do return({'indexes': _indexes}) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2880583, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt_postgres.postgres__refresh_materialized_view", "macro_sql": "{% macro postgres__refresh_materialized_view(relation) %}\n refresh materialized view {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2883613, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": {"name": "postgres__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_materialized_view_sql", "macro_sql": "{% macro postgres__get_rename_materialized_view_sql(relation, new_name) %}\n alter materialized view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.2887032, "supported_languages": null}, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": {"name": "postgres__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n\n -- apply a full refresh immediately if needed\n {% if configuration_changes.requires_full_refresh %}\n\n {{ get_replace_sql(existing_relation, relation, sql) }}\n\n -- otherwise apply individual changes as needed\n {% else %}\n\n {{ postgres__update_indexes_on_materialized_view(relation, configuration_changes.indexes) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786398582.289848, "supported_languages": null}, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": {"name": "postgres__update_indexes_on_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__update_indexes_on_materialized_view", "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }}\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\t{{ ';' if not loop.last else \"\" }}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql", "macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_changes", "type": null, "description": ""}], "created_at": 1786398582.2909086, "supported_languages": null}, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": {"name": "postgres__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes", "macro_sql": "{% macro postgres__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {% set _existing_materialized_view = postgres__describe_materialized_view(existing_relation) %}\n {% set _configuration_changes = existing_relation.get_materialized_view_config_change_collection(_existing_materialized_view, new_config.model) %}\n {% do return(_configuration_changes) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__describe_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1786398582.2915103, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": {"name": "postgres__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else \"\" }}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.292365, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_materialized_view": {"name": "postgres__drop_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_materialized_view", "macro_sql": "{% macro postgres__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.2926593, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786398582.2932773, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786398582.2936072, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1786398582.2941527, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1786398582.2944286, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.2949374, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.2952344, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2956653, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.2958238, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.2963226, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.2965415, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1786398582.297072, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1786398582.297604, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1786398582.2980886, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1786398582.298326, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1786398582.2989042, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1786398582.2992587, "supported_languages": null}, "macro.dbt.cast": {"name": "cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.cast", "macro_sql": "{% macro cast(field, type) %}\n {{ return(adapter.dispatch('cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.299788, "supported_languages": null}, "macro.dbt.default__cast": {"name": "default__cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.default__cast", "macro_sql": "{% macro default__cast(field, type) %}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.3000512, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1786398582.300555, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1786398582.3008077, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1786398582.301367, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1786398582.301645, "supported_languages": null}, "macro.dbt.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.302609, "supported_languages": null}, "macro.dbt.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.303788, "supported_languages": null}, "macro.dbt.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.3043673, "supported_languages": null}, "macro.dbt.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n {# call as follows:\n\n date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n ) #}\n\n\n with rawdata as (\n\n {{dbt.generate_series(\n dbt.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.generate_series", "macro.dbt.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.3050725, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.3055716, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.30589, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.3063939, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.306616, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.3070998, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.3074434, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1786398582.3081734, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n array[ {{ inputs|join(' , ') }} ]\n {% else %}\n array[]::{{data_type}}[]\n {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1786398582.308662, "supported_languages": null}, "macro.dbt.equals": {"name": "equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.equals", "macro_sql": "{% macro equals(expr1, expr2) %}\n {{ return(adapter.dispatch('equals', 'dbt') (expr1, expr2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1786398582.3092985, "supported_languages": null}, "macro.dbt.default__equals": {"name": "default__equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.default__equals", "macro_sql": "{% macro default__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))\n then 0\n else 1\n end = 0\n{%- else -%}\n ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1786398582.3098931, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1786398582.3107612, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1786398582.311604, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.312222, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.312679, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1786398582.3132842, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1786398582.3135562, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.3140316, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1786398582.3142862, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.3148777, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.315412, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.3157122, "supported_languages": null}, "macro.dbt.date": {"name": "date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.date", "macro_sql": "{% macro date(year, month, day) %}\n {{ return(adapter.dispatch('date', 'dbt') (year, month, day)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1786398582.3163488, "supported_languages": null}, "macro.dbt.default__date": {"name": "default__date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.default__date", "macro_sql": "{% macro default__date(year, month, day) -%}\n {%- set dt = modules.datetime.date(year, month, day) -%}\n {%- set iso_8601_formatted_date = dt.strftime('%Y-%m-%d') -%}\n to_date('{{ iso_8601_formatted_date }}', 'YYYY-MM-DD')\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1786398582.3169088, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3173804, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3175418, "supported_languages": null}, "macro.dbt.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.3183916, "supported_languages": null}, "macro.dbt.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.3192155, "supported_languages": null}, "macro.dbt.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.3196948, "supported_languages": null}, "macro.dbt.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.3207457, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786398582.3214734, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786398582.321808, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 + {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786398582.3222823, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3235674, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3238688, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3242075, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3245096, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3248491, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3251638, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3254895, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3258321, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3261707, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3264737, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3267925, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3272145, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3275366, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3278208, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1786398582.3283684, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1786398582.3286452, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.329218, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.3295076, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "config", "type": null, "description": ""}], "created_at": 1786398582.3300712, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3306954, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3313208, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "hooks", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1786398582.332997, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1786398582.333408, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.333698, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.333978, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.3342865, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table.sql", "original_file_path": "macros/materializations/models/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n {% do create_indexes(intermediate_relation) %}\n\n -- cleanup\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.3384957, "supported_languages": ["sql"]}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.3426082, "supported_languages": ["sql"]}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialization_materialized_view_default", "macro_sql": "{% materialization materialized_view, default %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.MaterializedView) %}\n {% set intermediate_relation = make_intermediate_relation(target_relation) %}\n {% set backup_relation_type = target_relation.MaterializedView if existing_relation is none else existing_relation.type %}\n {% set backup_relation = make_backup_relation(target_relation, backup_relation_type) %}\n\n {{ materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) }}\n\n {% set build_sql = materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% if build_sql == '' %}\n {{ materialized_view_execute_no_op(target_relation) }}\n {% else %}\n {{ materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) }}\n {% endif %}\n\n {{ materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.materialized_view_setup", "macro.dbt.materialized_view_get_build_sql", "macro.dbt.materialized_view_execute_no_op", "macro.dbt.materialized_view_execute_build_sql", "macro.dbt.materialized_view_teardown"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.3456461, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_setup", "macro_sql": "{% macro materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) %}\n\n -- backup_relation and intermediate_relation should not already exist in the database\n -- it's possible these exist because of a previous run that exited unexpectedly\n {% set preexisting_backup_relation = load_cached_relation(backup_relation) %}\n {% set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "pre_hooks", "type": null, "description": ""}], "created_at": 1786398582.3464324, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_teardown", "macro_sql": "{% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %}\n\n -- drop the temp relations if they exist to leave the database clean for the next run\n {{ drop_relation_if_exists(backup_relation) }}\n {{ drop_relation_if_exists(intermediate_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1786398582.3469243, "supported_languages": null}, "macro.dbt.materialized_view_get_build_sql": {"name": "materialized_view_get_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_get_build_sql", "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation.render() ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation.render() ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.get_create_materialized_view_as_sql", "macro.dbt.get_replace_sql", "macro.dbt.get_materialized_view_configuration_changes", "macro.dbt.refresh_materialized_view", "macro.dbt.get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786398582.3495164, "supported_languages": null}, "macro.dbt.materialized_view_execute_no_op": {"name": "materialized_view_execute_no_op", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_no_op", "macro_sql": "{% macro materialized_view_execute_no_op(target_relation) %}\n {% do store_raw_result(\n name=\"main\",\n message=\"skip \" ~ target_relation,\n code=\"skip\",\n rows_affected=\"-1\"\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.3499746, "supported_languages": null}, "macro.dbt.materialized_view_execute_build_sql": {"name": "materialized_view_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_build_sql", "macro_sql": "{% macro materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) %}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1786398582.351275, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% set relation_for_indexes = target_relation %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set relation_for_indexes = intermediate_relation %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% set relation_for_indexes = temp_relation %}\n {% set contract_config = config.get('contract') %}\n {% if not contract_config or not contract_config.enforced %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {% endif %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(relation_for_indexes) %}\n {% endif %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.3599646, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1786398582.362489, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n {{ return(adapter.dispatch('check_for_schema_changes', 'dbt')(source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__check_for_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.362928, "supported_languages": null}, "macro.dbt.default__check_for_schema_changes": {"name": "default__check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__check_for_schema_changes", "macro_sql": "{% macro default__check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.3653557, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n {{ return(adapter.dispatch('sync_column_schemas', 'dbt')(on_schema_change, target_relation, schema_changes_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1786398582.3658407, "supported_languages": null}, "macro.dbt.default__sync_column_schemas": {"name": "default__sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__sync_column_schemas", "macro_sql": "{% macro default__sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1786398582.3682508, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n {{ return(adapter.dispatch('process_schema_changes', 'dbt')(on_schema_change, source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__process_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.3687348, "supported_languages": null}, "macro.dbt.default__process_schema_changes": {"name": "default__process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__process_schema_changes", "macro_sql": "{% macro default__process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n\n Additional troubleshooting context:\n Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n New column types: {{ schema_changes_dict['new_target_types'] }}\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.3704033, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column_names", "type": null, "description": ""}], "created_at": 1786398582.3720226, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1786398582.3730946, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n {{ return(adapter.dispatch('diff_column_data_types', 'dbt')(source_columns, target_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1786398582.37354, "supported_languages": null}, "macro.dbt.default__diff_column_data_types": {"name": "default__diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__diff_column_data_types", "macro_sql": "{% macro default__diff_column_data_types(source_columns, target_columns) %}\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.expanded_data_type != tc.expanded_data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.expanded_data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1786398582.3748538, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1786398582.3754632, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n {%- if merge_update_columns and merge_exclude_columns -%}\n {{ exceptions.raise_compiler_error(\n 'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n )}}\n {%- elif merge_update_columns -%}\n {%- set update_columns = merge_update_columns -%}\n {%- elif merge_exclude_columns -%}\n {%- set update_columns = [] -%}\n {%- for column in dest_columns -%}\n {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n {%- do update_columns.append(column.quoted) -%}\n {% endif %}\n {%- endfor -%}\n {%- else -%}\n {%- set update_columns = default_cols -%}\n {%- endif -%}\n\n {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1786398582.376897, "supported_languages": null}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n -- back compat for old kwarg name\n {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786398582.3790133, "supported_languages": null}, "macro.dbt.get_merge_unique_key_match": {"name": "get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_unique_key_match", "macro_sql": "{% macro get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {{ return(adapter.dispatch('get_merge_unique_key_match', 'dbt')(source_unique_key, target_unique_key)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1786398582.3794546, "supported_languages": null}, "macro.dbt.default__get_merge_unique_key_match": {"name": "default__get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_unique_key_match", "macro_sql": "{% macro default__get_merge_unique_key_match(source_unique_key, target_unique_key) -%}\n {{ return(equals(source_unique_key, target_unique_key) | trim) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1786398582.3797903, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set merge_update_columns = config.get('merge_update_columns') -%}\n {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set source_unique_key = (\"DBT_INTERNAL_SOURCE.\" ~ unique_key) | trim %}\n {% set target_unique_key = (\"DBT_INTERNAL_DEST.\" ~ unique_key) | trim %}\n {% set unique_key_match = get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns", "macro.dbt.get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786398582.383192, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786398582.3837135, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is string %}\n {% set unique_key = [unique_key] %}\n {% endif %}\n\n {%- set unique_key_str = unique_key|join(', ') -%}\n\n delete from {{ target }} as DBT_INTERNAL_DEST\n where ({{ unique_key_str }}) in (\n select distinct {{ unique_key_str }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1786398582.3851924, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1786398582.385719, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {#-- The only time include_sql_header is True: --#}\n {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n {#-- We should consider including the sql header at the materialization level instead --#}\n\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1786398582.3869731, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3882432, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3887103, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3890758, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3896937, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.390193, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3907871, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3911736, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3916929, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3920553, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3923962, "supported_languages": null}, "macro.dbt.get_incremental_microbatch_sql": {"name": "get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_microbatch_sql", "macro_sql": "{% macro get_incremental_microbatch_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_microbatch_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_microbatch_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.392765, "supported_languages": null}, "macro.dbt.default__get_incremental_microbatch_sql": {"name": "default__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_microbatch_sql", "macro_sql": "{% macro default__get_incremental_microbatch_sql(arg_dict) %}\n\n {{ exceptions.raise_not_implemented('microbatch materialization strategy not implemented for adapter ' + adapter.type()) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1786398582.3930845, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ temp_relation }}\n )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}, {"name": "temp_relation", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1786398582.393656, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3948026, "supported_languages": null}, "macro.dbt.can_clone_table": {"name": "can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.can_clone_table", "macro_sql": "{% macro can_clone_table() %}\n {{ return(adapter.dispatch('can_clone_table', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__can_clone_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.3952878, "supported_languages": null}, "macro.dbt.default__can_clone_table": {"name": "default__can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.default__can_clone_table", "macro_sql": "{% macro default__can_clone_table() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.395526, "supported_languages": null}, "macro.dbt.materialization_clone_default": {"name": "materialization_clone_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/clone.sql", "original_file_path": "macros/materializations/models/clone/clone.sql", "unique_id": "macro.dbt.materialization_clone_default", "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n {%- set grant_config = config.get('grants') -%}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation.render() ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% if target_relation.database == defer_relation.database and\n target_relation.schema == defer_relation.schema and\n target_relation.identifier == defer_relation.identifier %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation.render()) }}\n {% else %}\n {% call statement('main') %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endcall %}\n {% endif %}\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.can_clone_table", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_or_replace_clone", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.400639, "supported_languages": ["sql"]}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1786398582.4012966, "supported_languages": null}, "macro.dbt.default__create_or_replace_clone": {"name": "default__create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.default__create_or_replace_clone", "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation.render() }} clone {{ defer_relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1786398582.4016402, "supported_languages": null}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.4022746, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.4030263, "supported_languages": null}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786398582.4040437, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786398582.4046917, "supported_languages": null}, "macro.dbt.get_unit_test_sql": {"name": "get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_unit_test_sql", "macro_sql": "{% macro get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n {{ adapter.dispatch('get_unit_test_sql', 'dbt')(main_sql, expected_fixture_sql, expected_column_names) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_unit_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1786398582.405118, "supported_languages": null}, "macro.dbt.default__get_unit_test_sql": {"name": "default__get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_unit_test_sql", "macro_sql": "{% macro default__get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n-- Build actual result given inputs\nwith dbt_internal_unit_test_actual as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%},{% endif %}{%- endfor -%}, {{ dbt.string_literal(\"actual\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ main_sql }}\n ) _dbt_internal_unit_test_actual\n),\n-- Build expected result\ndbt_internal_unit_test_expected as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%}, {% endif %}{%- endfor -%}, {{ dbt.string_literal(\"expected\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ expected_fixture_sql }}\n ) _dbt_internal_unit_test_expected\n)\n-- Union actual and expected results\nselect * from dbt_internal_unit_test_actual\nunion all\nselect * from dbt_internal_unit_test_expected\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1786398582.4063675, "supported_languages": null}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n {% set limit = config.get('limit') %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set sql_with_limit %}\n {{ get_limit_subquery_sql(sql, limit) }}\n {% endset %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% set store_failures_as = config.get('store_failures_as') %}\n -- if `--store-failures` is invoked via command line and `store_failures_as` is not set,\n -- config.get('store_failures_as', 'table') returns None, not 'table'\n {% if store_failures_as == none %}{% set store_failures_as = 'table' %}{% endif %}\n {% if store_failures_as not in ['table', 'view'] %}\n {{ exceptions.raise_compiler_error(\n \"'\" ~ store_failures_as ~ \"' is not a valid value for `store_failures_as`. \"\n \"Accepted values are: ['ephemeral', 'table', 'view']\"\n ) }}\n {% endif %}\n\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type=store_failures_as) -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ get_create_sql(target_relation, sql_with_limit) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {# Since the test failures have already been saved to the database, reuse that result rather than querying again #}\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql_with_limit %}\n\n {% endif %}\n\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {# The limit has already been included above, and we do not want to duplicate it again. We also want to be safe for macro overrides treating `limit` as a required parameter. #}\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit=none)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql", "macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.get_create_sql", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.4115343, "supported_languages": ["sql"]}, "macro.dbt.materialization_unit_default": {"name": "materialization_unit_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/unit.sql", "original_file_path": "macros/materializations/tests/unit.sql", "unique_id": "macro.dbt.materialization_unit_default", "macro_sql": "{%- materialization unit, default -%}\n\n {% set relations = [] %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set expected_rows = config.get('expected_rows') %}\n {% set expected_sql = config.get('expected_sql') %}\n {% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {% do run_query(get_create_table_as_sql(True, temp_relation, get_empty_subquery_sql(sql))) %}\n {%- set columns_in_relation = adapter.get_columns_in_relation(temp_relation) -%}\n {%- set column_name_to_data_types = {} -%}\n {%- set column_name_to_quoted = {} -%}\n {%- for column in columns_in_relation -%}\n {%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n {%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n {%- endfor -%}\n\n {%- set expected_column_names_quoted = [] -%}\n {%- for column_name in tested_expected_column_names -%}\n {%- do expected_column_names_quoted.append(column_name_to_quoted[column_name|lower]) -%}\n {%- endfor -%}\n\n {% if not expected_sql %}\n {% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types, column_name_to_quoted) %}\n {% endif %}\n {% set unit_test_sql = get_unit_test_sql(sql, expected_sql, expected_column_names_quoted) %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ unit_test_sql }}\n\n {%- endcall %}\n\n {% do adapter.drop_relation(temp_relation) %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt.make_temp_relation", "macro.dbt.run_query", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_empty_subquery_sql", "macro.dbt.get_expected_sql", "macro.dbt.get_unit_test_sql", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.415567, "supported_languages": ["sql"]}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation.render())) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = \"\" %}\n {% if rows_affected > 0 %}\n {% set sql = load_csv_rows(model, agate_table) %}\n {% endif %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.4208434, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786398582.4226751, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786398582.4244647, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786398582.4249232, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation.render() %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786398582.4259222, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1786398582.4263272, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1786398582.4266028, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4268868, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4271204, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.427458, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4276962, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_names", "type": null, "description": ""}], "created_at": 1786398582.428656, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786398582.4291587, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1786398582.4315453, "supported_languages": null}, "macro.dbt.get_aggregate_function_create_replace_signature": {"name": "get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_create_replace_signature", "macro_sql": "{% macro get_aggregate_function_create_replace_signature(target_relation) %}\n {{ return(adapter.dispatch('get_aggregate_function_create_replace_signature', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_create_replace_signature"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.432794, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_create_replace_signature": {"name": "default__get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_create_replace_signature", "macro_sql": "{% macro default__get_aggregate_function_create_replace_signature(target_relation) %}\n CREATE OR REPLACE AGGREGATE FUNCTION {{ target_relation.render() }} ({{ get_formatted_aggregate_function_args()}})\n RETURNS {{ model.returns.data_type }}\n {{ get_function_language_specifier() }}\n {{ get_aggregate_function_volatility_specifier() }}\n {% if model.get('language') == 'python' %}\n {{ get_function_python_options() }}\n {% endif %}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_formatted_aggregate_function_args", "macro.dbt.get_function_language_specifier", "macro.dbt.get_aggregate_function_volatility_specifier", "macro.dbt.get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4335363, "supported_languages": null}, "macro.dbt.get_formatted_aggregate_function_args": {"name": "get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_formatted_aggregate_function_args", "macro_sql": "{% macro get_formatted_aggregate_function_args() %}\n {{ return(adapter.dispatch('get_formatted_aggregate_function_args', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_formatted_aggregate_function_args"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.433873, "supported_languages": null}, "macro.dbt.default__get_formatted_aggregate_function_args": {"name": "default__get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_formatted_aggregate_function_args", "macro_sql": "{% macro default__get_formatted_aggregate_function_args() %}\n {# conveniently we can reuse the sql scalar function args #}\n {{ formatted_scalar_function_args_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4341092, "supported_languages": null}, "macro.dbt.get_function_language_specifier": {"name": "get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_language_specifier", "macro_sql": "{% macro get_function_language_specifier() %}\n {{ return(adapter.dispatch('get_function_language_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_language_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4344597, "supported_languages": null}, "macro.dbt.default__get_function_language_specifier": {"name": "default__get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_language_specifier", "macro_sql": "{% macro default__get_function_language_specifier() %}\n {% set language = model.get('language') %}\n {% if language == 'sql' %}\n {# generally you dont need to specify the language for sql functions #}\n {% elif language == 'python' %}\n LANGUAGE PYTHON\n {% elif language == 'javascript' %}\n LANGUAGE js\n {% else %}\n {{ 'LANGUAGE ' ~ language.upper() }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4352062, "supported_languages": null}, "macro.dbt.get_aggregate_function_volatility_specifier": {"name": "get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_volatility_specifier", "macro_sql": "{% macro get_aggregate_function_volatility_specifier() %}\n {{ return(adapter.dispatch('get_aggregate_function_volatility_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_volatility_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4355454, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_volatility_specifier": {"name": "default__get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_volatility_specifier", "macro_sql": "{% macro default__get_aggregate_function_volatility_specifier() %}\n {{ scalar_function_volatility_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4357605, "supported_languages": null}, "macro.dbt.get_function_python_options": {"name": "get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_python_options", "macro_sql": "{% macro get_function_python_options() %}\n {{ return(adapter.dispatch('get_function_python_options', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4360828, "supported_languages": null}, "macro.dbt.default__get_function_python_options": {"name": "default__get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_python_options", "macro_sql": "{% macro default__get_function_python_options() %}\n RUNTIME_VERSION = '{{ model.config.get('runtime_version') }}'\n HANDLER = '{{ model.config.get('entry_point') }}'\n {% set packages = model.config.get('packages', []) %}\n {% if packages %}\n PACKAGES = ('{{ packages | join(\"','\") }}')\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4368246, "supported_languages": null}, "macro.dbt.scalar_function_sql": {"name": "scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_sql", "macro_sql": "{% macro scalar_function_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.438461, "supported_languages": null}, "macro.dbt.default__scalar_function_sql": {"name": "default__scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_sql", "macro_sql": "{% macro default__scalar_function_sql(target_relation) %}\n {{ scalar_function_create_replace_signature_sql(target_relation) }}\n {{ scalar_function_body_sql() }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_create_replace_signature_sql", "macro.dbt.scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4388123, "supported_languages": null}, "macro.dbt.scalar_function_create_replace_signature_sql": {"name": "scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_create_replace_signature_sql", "macro_sql": "{% macro scalar_function_create_replace_signature_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_create_replace_signature_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_create_replace_signature_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4392128, "supported_languages": null}, "macro.dbt.default__scalar_function_create_replace_signature_sql": {"name": "default__scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_create_replace_signature_sql", "macro_sql": "{% macro default__scalar_function_create_replace_signature_sql(target_relation) %}\n CREATE OR REPLACE FUNCTION {{ target_relation.render() }} ({{ formatted_scalar_function_args_sql()}})\n RETURNS {{ model.returns.data_type }}\n {{ scalar_function_volatility_sql() }}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql", "macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4396613, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_sql": {"name": "formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_sql", "macro_sql": "{% macro formatted_scalar_function_args_sql() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4405363, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_javascript": {"name": "formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_javascript", "macro_sql": "{% macro formatted_scalar_function_args_javascript() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__formatted_scalar_function_args_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.440865, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_sql": {"name": "default__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_sql", "macro_sql": "{% macro default__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4415216, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_javascript": {"name": "default__formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_javascript", "macro_sql": "{% macro default__formatted_scalar_function_args_javascript() %}\n {% set msg = \"formatted_scalar_function_args_javascript not implemented for adapter \" ~ adapter.type() %}\n {% do exceptions.raise_compiler_error(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4419289, "supported_languages": null}, "macro.dbt.scalar_function_body_sql": {"name": "scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_body_sql", "macro_sql": "{% macro scalar_function_body_sql() %}\n {{ return(adapter.dispatch('scalar_function_body_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4422784, "supported_languages": null}, "macro.dbt.default__scalar_function_body_sql": {"name": "default__scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_body_sql", "macro_sql": "{% macro default__scalar_function_body_sql() %}\n $$\n {{ model.compiled_code }}\n $$ LANGUAGE SQL\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4424946, "supported_languages": null}, "macro.dbt.scalar_function_volatility_sql": {"name": "scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_sql", "macro_sql": "{% macro scalar_function_volatility_sql() %}\n {{ return(adapter.dispatch('scalar_function_volatility_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4428182, "supported_languages": null}, "macro.dbt.scalar_function_volatility_javascript": {"name": "scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_javascript", "macro_sql": "{% macro scalar_function_volatility_javascript() %}\n {{ return(adapter.dispatch('scalar_function_volatility_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.443163, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_javascript": {"name": "default__scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_javascript", "macro_sql": "{% macro default__scalar_function_volatility_javascript() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility != none %}\n {% set msg = \"Volatility is not supported by \" ~ adapter.type() ~ \" in javascript UDF and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4438589, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_sql": {"name": "default__scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_sql", "macro_sql": "{% macro default__scalar_function_volatility_sql() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility == 'deterministic' %}\n IMMUTABLE\n {% elif volatility == 'stable' %}\n STABLE\n {% elif volatility == 'non-deterministic' %}\n VOLATILE\n {% elif volatility != none %}\n {# This shouldn't happen unless a new volatility is invented #}\n {% do unsupported_volatility_warning(volatility) %}\n {% endif %}\n {# If no volatility is set, don't add anything and let the data warehouse default it #}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4446895, "supported_languages": null}, "macro.dbt.unsupported_volatility_warning": {"name": "unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.unsupported_volatility_warning", "macro_sql": "{% macro unsupported_volatility_warning(volatility) %}\n {{ return(adapter.dispatch('unsupported_volatility_warning', 'dbt')(volatility)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1786398582.4450507, "supported_languages": null}, "macro.dbt.default__unsupported_volatility_warning": {"name": "default__unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__unsupported_volatility_warning", "macro_sql": "{% macro default__unsupported_volatility_warning(volatility) %}\n {% set msg = \"Found `\" ~ volatility ~ \"` volatility specified on function `\" ~ model.name ~ \"`. This volatility is not supported by \" ~ adapter.type() ~ \", and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1786398582.4455857, "supported_languages": null}, "macro.dbt.materialization_function_default": {"name": "materialization_function_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/function.sql", "original_file_path": "macros/materializations/functions/function.sql", "unique_id": "macro.dbt.materialization_function_default", "macro_sql": "{% materialization function, default, supported_languages=['sql', 'python', 'javascript'] %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.Function) %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% set function_config = this.get_function_config(model) %}\n {% set macro_name = this.get_function_macro_name(function_config) %}\n\n {# Doing this aliasing of adapter.dispatch is a hacky way to disable the static analysis of actually calling adapter.dispatch #}\n {# This is necessary because the static analysis breaks being able to dynamically pass a macro_name #}\n {% set _dispatch = adapter.dispatch %}\n\n {% set build_sql = _dispatch(macro_name, 'dbt')(target_relation) %}\n {{ function_execute_build_sql(build_sql, existing_relation, target_relation) }}\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.run_hooks", "macro.dbt.function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.4474256, "supported_languages": ["sql", "python", "javascript"]}, "macro.dbt.function_execute_build_sql": {"name": "function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.function_execute_build_sql", "macro_sql": "{% macro function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n {{ return(adapter.dispatch('function_execute_build_sql', 'dbt')(build_sql, existing_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4481587, "supported_languages": null}, "macro.dbt.default__function_execute_build_sql": {"name": "default__function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.default__function_execute_build_sql", "macro_sql": "{% macro default__function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4491982, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1786398582.4499922, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n merge into {{ target.render() }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}\n\n when matched\n {% if config.get(\"dbt_valid_to_current\") %}\n\t{% set source_unique_key = (\"DBT_INTERNAL_DEST.\" ~ columns.dbt_valid_to) | trim %}\n\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\tand ({{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null)\n\n {% else %}\n and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null\n {% endif %}\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1786398582.4517486, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {# The model['config'] parameter below is no longer used, but passing anyway for compatibility #}\n {# It was a dictionary of config, instead of the config object from the context #}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", model['config'], target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set build_or_select_sql = build_sql %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {{ adapter.assert_valid_snapshot_target_given_strategy(target_relation, columns, strategy) }}\n\n {% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set remove_columns = ['dbt_change_type', 'DBT_CHANGE_TYPE', 'dbt_unique_key', 'DBT_UNIQUE_KEY'] %}\n {% if unique_key | is_list %}\n {% for key in strategy.unique_key %}\n {{ remove_columns.append('dbt_unique_key_' + loop.index|string) }}\n {{ remove_columns.append('DBT_UNIQUE_KEY_' + loop.index|string) }}\n {% endfor %}\n {% endif %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n\n {{ check_time_data_types(build_or_select_sql) }}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_staging_table", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.check_time_data_types", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1786398582.459598, "supported_languages": ["sql"]}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}], "created_at": 1786398582.4636164, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1786398582.4639637, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1786398582.4644387, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set primary_key = config.get('unique_key') %}\n {% set updated_at = config.get('updated_at') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.{{ columns.dbt_valid_from }} < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1786398582.466349, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1786398582.466687, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1786398582.4670281, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n select {{ check_cols_config | join(', ') }} from (\n {{ node['compiled_code'] }}\n ) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}, {"name": "check_cols_config", "type": null, "description": ""}], "created_at": 1786398582.4697964, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set check_cols_config = config.get('check_cols') %}\n {% set primary_key = config.get('unique_key') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set updated_at = config.get('updated_at') or snapshot_get_time() %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1786398582.4727695, "supported_languages": null}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.4767544, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation.render() }} add column {{ adapter.quote(column.name) }} {{ column.expanded_data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.4774299, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1786398582.4777622, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1786398582.47795, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4782689, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4785082, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4789171, "supported_languages": null}, "macro.dbt.get_snapshot_table_column_names": {"name": "get_snapshot_table_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_snapshot_table_column_names", "macro_sql": "{% macro get_snapshot_table_column_names() %}\n {{ return({'dbt_valid_to': 'dbt_valid_to', 'dbt_valid_from': 'dbt_valid_from', 'dbt_scd_id': 'dbt_scd_id', 'dbt_updated_at': 'dbt_updated_at', 'dbt_is_deleted': 'dbt_is_deleted'}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.4794443, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n {% if strategy.hard_deletes == 'new_record' %}\n {% set new_scd_id = snapshot_hash_arguments([columns.dbt_scd_id, snapshot_get_time()]) %}\n {% endif %}\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from {{ target_relation }}\n where\n {% if config.get('dbt_valid_to_current') %}\n\t\t{% set source_unique_key = columns.dbt_valid_to | trim %}\n\t\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\n\t\t{# The exact equals semantics between NULL values depends on the current behavior flag set. Also, update records if the source field is null #}\n ( {{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null )\n {% else %}\n {{ columns.dbt_valid_to }} is null\n {% endif %}\n\n ),\n\n insertions_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }},\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }}\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_to }}\n\n from snapshot_query\n ),\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n\n deletes_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n {%- if strategy.hard_deletes == 'new_record' -%}\n ,'False' as {{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"snapshotted_data\") }}\n or ({{ unique_key_is_not_null(strategy.unique_key, \"snapshotted_data\") }} and (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from updates_source_data as source_data\n join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n )\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n ,\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_to }},\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n and not (\n --avoid updating the record's valid_to if the latest entry is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n {%- endif %}\n )\n {%- endif %}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n {% set snapshotted_cols = get_list_of_column_names(get_columns_in_relation(target_relation)) %}\n {% set source_col_names = get_columns_in_query(source_sql) %}\n ,\n deletion_records as (\n\n select\n 'insert' as dbt_change_type,\n {%- for col_name in source_col_names -%}\n {%- if col_name in snapshotted_cols -%}\n snapshotted_data.{{ adapter.quote(col_name) }},\n {%- else -%}\n source_data.{{ adapter.quote(col_name) }},\n {%- endif -%}\n {% endfor -%}\n {%- if strategy.unique_key | is_list -%}\n {%- for key in strategy.unique_key -%}\n snapshotted_data.{{ key }} as dbt_unique_key_{{ loop.index }},\n {% endfor -%}\n {%- else -%}\n snapshotted_data.dbt_unique_key as dbt_unique_key,\n {% endif -%}\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n snapshotted_data.{{ columns.dbt_valid_to }} as {{ columns.dbt_valid_to }},\n {{ new_scd_id }} as {{ columns.dbt_scd_id }},\n 'True' as {{ columns.dbt_is_deleted }}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n and not (\n --avoid inserting a new record if the latest one is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletes\n {%- endif %}\n {%- if strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletion_records\n {%- endif %}\n\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments", "macro.dbt.snapshot_get_time", "macro.dbt.unique_key_fields", "macro.dbt.equals", "macro.dbt.get_dbt_valid_to_current", "macro.dbt.unique_key_join_on", "macro.dbt.unique_key_is_null", "macro.dbt.unique_key_is_not_null", "macro.dbt.get_list_of_column_names", "macro.dbt.get_columns_in_relation", "macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4882312, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.488664, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\n select *,\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , 'False' as {{ columns.dbt_is_deleted }}\n {% endif -%}\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.get_dbt_valid_to_current"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.4896996, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1786398582.4905574, "supported_languages": null}, "macro.dbt.get_updated_at_column_data_type": {"name": "get_updated_at_column_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_updated_at_column_data_type", "macro_sql": "{% macro get_updated_at_column_data_type(snapshot_sql) %}\n {% set snapshot_sql_column_schema = get_column_schema_from_query(snapshot_sql) %}\n {% set dbt_updated_at_data_type = null %}\n {% set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {% set ns.dbt_updated_at_data_type = null -%}\n {% for column in snapshot_sql_column_schema %}\n {% if ((column.column == 'dbt_updated_at') or (column.column == 'DBT_UPDATED_AT')) %}\n {% set ns.dbt_updated_at_data_type = column.dtype %}\n {% endif %}\n {% endfor %}\n {{ return(ns.dbt_updated_at_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "snapshot_sql", "type": null, "description": ""}], "created_at": 1786398582.4917474, "supported_languages": null}, "macro.dbt.check_time_data_types": {"name": "check_time_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.check_time_data_types", "macro_sql": "{% macro check_time_data_types(sql) %}\n {% set dbt_updated_at_data_type = get_updated_at_column_data_type(sql) %}\n {% set snapshot_get_time_data_type = get_snapshot_get_time_data_type() %}\n {% if snapshot_get_time_data_type is not none and dbt_updated_at_data_type is not none and snapshot_get_time_data_type != dbt_updated_at_data_type %}\n {% if exceptions.warn_snapshot_timestamp_data_types %}\n {{ exceptions.warn_snapshot_timestamp_data_types(snapshot_get_time_data_type, dbt_updated_at_data_type) }}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_updated_at_column_data_type", "macro.dbt.get_snapshot_get_time_data_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.4926026, "supported_languages": null}, "macro.dbt.get_dbt_valid_to_current": {"name": "get_dbt_valid_to_current", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_dbt_valid_to_current", "macro_sql": "{% macro get_dbt_valid_to_current(strategy, columns) %}\n {% set dbt_valid_to_current = config.get('dbt_valid_to_current') or \"null\" %}\n coalesce(nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}), {{dbt_valid_to_current}})\n as {{ columns.dbt_valid_to }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.493184, "supported_languages": null}, "macro.dbt.unique_key_fields": {"name": "unique_key_fields", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_fields", "macro_sql": "{% macro unique_key_fields(unique_key) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n {{ key }} as dbt_unique_key_{{ loop.index }}\n {%- if not loop.last %} , {%- endif %}\n {% endfor %}\n {% else %}\n {{ unique_key }} as dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}], "created_at": 1786398582.4938648, "supported_languages": null}, "macro.dbt.unique_key_join_on": {"name": "unique_key_join_on", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_join_on", "macro_sql": "{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n\t {% set source_unique_key = (identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {% set target_unique_key = (from_identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {{ equals(source_unique_key, target_unique_key) }}\n {%- if not loop.last %} and {%- endif %}\n {% endfor %}\n {% else %}\n {{ identifier }}.dbt_unique_key = {{ from_identifier }}.dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "from_identifier", "type": null, "description": ""}], "created_at": 1786398582.495021, "supported_languages": null}, "macro.dbt.unique_key_is_null": {"name": "unique_key_is_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_null", "macro_sql": "{% macro unique_key_is_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is null\n {% else %}\n {{ identifier }}.dbt_unique_key is null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1786398582.4954753, "supported_languages": null}, "macro.dbt.unique_key_is_not_null": {"name": "unique_key_is_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_not_null", "macro_sql": "{% macro unique_key_is_not_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is not null\n {% else %}\n {{ identifier }}.dbt_unique_key is not null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1786398582.4958954, "supported_languages": null}, "macro.dbt.get_create_backup_sql": {"name": "get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.get_create_backup_sql", "macro_sql": "{%- macro get_create_backup_sql(relation) -%}\n {{- log('Applying CREATE BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.4965353, "supported_languages": null}, "macro.dbt.default__get_create_backup_sql": {"name": "default__get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.default__get_create_backup_sql", "macro_sql": "{%- macro default__get_create_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n -- drop any pre-existing backup\n {{ get_drop_sql(backup_relation) }};\n\n {{ get_rename_sql(relation, backup_relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.4970548, "supported_languages": null}, "macro.dbt.get_rename_sql": {"name": "get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.get_rename_sql", "macro_sql": "{%- macro get_rename_sql(relation, new_name) -%}\n {{- log('Applying RENAME to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.4979389, "supported_languages": null}, "macro.dbt.default__get_rename_sql": {"name": "default__get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__get_rename_sql", "macro_sql": "{%- macro default__get_rename_sql(relation, new_name) -%}\n\n {%- if relation.is_view -%}\n {{ get_rename_view_sql(relation, new_name) }}\n\n {%- elif relation.is_table -%}\n {{ get_rename_table_sql(relation, new_name) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_rename_materialized_view_sql(relation, new_name) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_rename_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.get_rename_view_sql", "macro.dbt.get_rename_table_sql", "macro.dbt.get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.498796, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1786398582.4992144, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation.render() }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1786398582.499789, "supported_languages": null}, "macro.dbt.get_replace_sql": {"name": "get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.get_replace_sql", "macro_sql": "{% macro get_replace_sql(existing_relation, target_relation, sql) %}\n {{- log('Applying REPLACE to: ' ~ existing_relation) -}}\n {{- adapter.dispatch('get_replace_sql', 'dbt')(existing_relation, target_relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.50083, "supported_languages": null}, "macro.dbt.default__get_replace_sql": {"name": "default__get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.default__get_replace_sql", "macro_sql": "{% macro default__get_replace_sql(existing_relation, target_relation, sql) %}\n\n {# /* use a create or replace statement if possible */ #}\n\n {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}\n\n {% if is_replaceable and existing_relation.is_view %}\n {{ get_replace_view_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_table %}\n {{ get_replace_table_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_materialized_view %}\n {{ get_replace_materialized_view_sql(target_relation, sql) }}\n\n {# /* a create or replace statement is not possible, so try to stage and/or backup to be safe */ #}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one using a backup */ #}\n {%- elif target_relation.can_be_renamed and existing_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one without using a backup */ #}\n {%- elif target_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_drop_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }}\n\n {# /* create target_relation in place by first backing up the existing relation */ #}\n {%- elif existing_relation.can_be_renamed -%}\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* no renaming is allowed, so just drop and create */ #}\n {%- else -%}\n {{ get_drop_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_view_sql", "macro.dbt.get_replace_table_sql", "macro.dbt.get_replace_materialized_view_sql", "macro.dbt.get_create_intermediate_sql", "macro.dbt.get_create_backup_sql", "macro.dbt.get_rename_intermediate_sql", "macro.dbt.get_drop_backup_sql", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5032918, "supported_languages": null}, "macro.dbt.drop_schema_named": {"name": "drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.drop_schema_named", "macro_sql": "{% macro drop_schema_named(schema_name) %}\n {{ return(adapter.dispatch('drop_schema_named', 'dbt') (schema_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_schema_named"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1786398582.5038288, "supported_languages": null}, "macro.dbt.default__drop_schema_named": {"name": "default__drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.default__drop_schema_named", "macro_sql": "{% macro default__drop_schema_named(schema_name) %}\n {% set schema_relation = api.Relation.create(schema=schema_name) %}\n {{ adapter.drop_schema(schema_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1786398582.5042706, "supported_languages": null}, "macro.dbt.get_rename_intermediate_sql": {"name": "get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.get_rename_intermediate_sql", "macro_sql": "{%- macro get_rename_intermediate_sql(relation) -%}\n {{- log('Applying RENAME INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_intermediate_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5048497, "supported_languages": null}, "macro.dbt.default__get_rename_intermediate_sql": {"name": "default__get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.default__get_rename_intermediate_sql", "macro_sql": "{%- macro default__get_rename_intermediate_sql(relation) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n {{ get_rename_sql(intermediate_relation, relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5052783, "supported_languages": null}, "macro.dbt.get_create_sql": {"name": "get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.get_create_sql", "macro_sql": "{%- macro get_create_sql(relation, sql) -%}\n {{- log('Applying CREATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5059826, "supported_languages": null}, "macro.dbt.default__get_create_sql": {"name": "default__get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.default__get_create_sql", "macro_sql": "{%- macro default__get_create_sql(relation, sql) -%}\n\n {%- if relation.is_view -%}\n {{ get_create_view_as_sql(relation, sql) }}\n\n {%- elif relation.is_table -%}\n {{ get_create_table_as_sql(False, relation, sql) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_create_materialized_view_as_sql(relation, sql) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_create_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.get_create_view_as_sql", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5068636, "supported_languages": null}, "macro.dbt.get_drop_backup_sql": {"name": "get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.get_drop_backup_sql", "macro_sql": "{%- macro get_drop_backup_sql(relation) -%}\n {{- log('Applying DROP BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5074575, "supported_languages": null}, "macro.dbt.default__get_drop_backup_sql": {"name": "default__get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.default__get_drop_backup_sql", "macro_sql": "{%- macro default__get_drop_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n {{ get_drop_sql(backup_relation) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.507861, "supported_languages": null}, "macro.dbt.get_create_intermediate_sql": {"name": "get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.get_create_intermediate_sql", "macro_sql": "{%- macro get_create_intermediate_sql(relation, sql) -%}\n {{- log('Applying CREATE INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_intermediate_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5085108, "supported_languages": null}, "macro.dbt.default__get_create_intermediate_sql": {"name": "default__get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.default__get_create_intermediate_sql", "macro_sql": "{%- macro default__get_create_intermediate_sql(relation, sql) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n -- drop any pre-existing intermediate\n {{ get_drop_sql(intermediate_relation) }};\n\n {{ get_create_sql(intermediate_relation, sql) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5090003, "supported_languages": null}, "macro.dbt.get_drop_sql": {"name": "get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.get_drop_sql", "macro_sql": "{%- macro get_drop_sql(relation) -%}\n {{- log('Applying DROP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.509943, "supported_languages": null}, "macro.dbt.default__get_drop_sql": {"name": "default__get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__get_drop_sql", "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation.render() }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.drop_view", "macro.dbt.drop_table", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.510736, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.511099, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n {{ get_drop_sql(relation) }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.511533, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5120277, "supported_languages": null}, "macro.dbt.get_rename_table_sql": {"name": "get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.get_rename_table_sql", "macro_sql": "{% macro get_rename_table_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_table_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.5125737, "supported_languages": null}, "macro.dbt.default__get_rename_table_sql": {"name": "default__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.default__get_rename_table_sql", "macro_sql": "{% macro default__get_rename_table_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.512871, "supported_languages": null}, "macro.dbt.get_replace_table_sql": {"name": "get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.get_replace_table_sql", "macro_sql": "{% macro get_replace_table_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_table_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5133996, "supported_languages": null}, "macro.dbt.default__get_replace_table_sql": {"name": "default__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.default__get_replace_table_sql", "macro_sql": "{% macro default__get_replace_table_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5136976, "supported_languages": null}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5148575, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5153244, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {# backward compatibility for create_table_as that does not support language #}\n {% if language == \"sql\" %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n {% else %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "compiled_code", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1786398582.516201, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced and (not temporary) %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5175772, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n {#- loop through user_provided_columns to get column names -#}\n {%- set user_provided_columns = model['columns'] -%}\n {%- for i in user_provided_columns %}\n {%- set col = user_provided_columns[i] -%}\n {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5185099, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.518875, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n from (\n {{ sql }}\n ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5192492, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n {{- adapter.dispatch('drop_table', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.519726, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5199707, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5213835, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5217352, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n {# loop through user_provided_columns to create DDL with data types and constraints #}\n {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n (\n {% for c in raw_column_constraints -%}\n {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n {% endfor %}\n {% for c in raw_model_constraints -%}\n {{ c }}{{ \",\" if not loop.last }}\n {% endfor -%}\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.522798, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5231485, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5234306, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n {#-- First ensure the user has defined 'columns' in yaml specification --#}\n {%- set user_defined_columns = model['columns'] -%}\n {%- if not user_defined_columns -%}\n {{ exceptions.raise_contract_error([], []) }}\n {%- endif -%}\n\n {#-- Obtain the column schema provided by sql file. #}\n {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n {#-- create dictionaries with name and formatted data type and strings for exception #}\n {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n {%- set yaml_columns = format_columns(schema_file_provided_columns) -%}\n\n {%- if sql_columns|length != yaml_columns|length -%}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n\n {%- for sql_col in sql_columns -%}\n {%- set yaml_col = [] -%}\n {%- for this_col in yaml_columns -%}\n {%- if this_col['name'] == sql_col['name'] -%}\n {%- do yaml_col.append(this_col) -%}\n {%- break -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if not yaml_col -%}\n {#-- Column with name not found in yaml #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n {#-- Column data types don't match #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5259387, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n {% set formatted_columns = [] %}\n {% for column in columns %}\n {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n {%- do formatted_columns.append(formatted_column) -%}\n {% endfor %}\n {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.526702, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n {% set data_type = column.dtype %}\n {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1786398582.5273793, "supported_languages": null}, "macro.dbt.get_rename_view_sql": {"name": "get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.get_rename_view_sql", "macro_sql": "{% macro get_rename_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.527897, "supported_languages": null}, "macro.dbt.default__get_rename_view_sql": {"name": "default__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.default__get_rename_view_sql", "macro_sql": "{% macro default__get_rename_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.5282092, "supported_languages": null}, "macro.dbt.get_replace_view_sql": {"name": "get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.get_replace_view_sql", "macro_sql": "{% macro get_replace_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5291636, "supported_languages": null}, "macro.dbt.default__get_replace_view_sql": {"name": "default__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__get_replace_view_sql", "macro_sql": "{% macro default__get_replace_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5294657, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5316358, "supported_languages": null}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1786398582.5321226, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation.render() ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1786398582.5326083, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.533332, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5336595, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5340238, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation.render() }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.534911, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n {{- adapter.dispatch('drop_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5354092, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5356596, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.refresh_materialized_view", "macro_sql": "{% macro refresh_materialized_view(relation) %}\n {{- log('Applying REFRESH to: ' ~ relation) -}}\n {{- adapter.dispatch('refresh_materialized_view', 'dbt')(relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5362585, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\n {{ exceptions.raise_compiler_error(\"`refresh_materialized_view` has not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5365336, "supported_languages": null}, "macro.dbt.get_rename_materialized_view_sql": {"name": "get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.get_rename_materialized_view_sql", "macro_sql": "{% macro get_rename_materialized_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.5370421, "supported_languages": null}, "macro.dbt.default__get_rename_materialized_view_sql": {"name": "default__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.default__get_rename_materialized_view_sql", "macro_sql": "{% macro default__get_rename_materialized_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1786398582.5373602, "supported_languages": null}, "macro.dbt.get_alter_materialized_view_as_sql": {"name": "get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_alter_materialized_view_as_sql", "macro_sql": "{% macro get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{- log('Applying ALTER to: ' ~ relation) -}}\n {{- adapter.dispatch('get_alter_materialized_view_as_sql', 'dbt')(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n ) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786398582.538364, "supported_languages": null}, "macro.dbt.default__get_alter_materialized_view_as_sql": {"name": "default__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_alter_materialized_view_as_sql", "macro_sql": "{% macro default__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1786398582.5387354, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_materialized_view_configuration_changes", "macro_sql": "{% macro get_materialized_view_configuration_changes(existing_relation, new_config) %}\n /* {#\n It's recommended that configuration changes be formatted as follows:\n {\"\": [{\"action\": \"\", \"context\": ...}]}\n\n For example:\n {\n \"indexes\": [\n {\"action\": \"drop\", \"context\": \"index_abc\"},\n {\"action\": \"create\", \"context\": {\"columns\": [\"column_1\", \"column_2\"], \"type\": \"hash\", \"unique\": True}},\n ],\n }\n\n Either way, `get_materialized_view_configuration_changes` needs to align with `get_alter_materialized_view_as_sql`.\n #} */\n {{- log('Determining configuration changes on: ' ~ existing_relation) -}}\n {%- do return(adapter.dispatch('get_materialized_view_configuration_changes', 'dbt')(existing_relation, new_config)) -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1786398582.539301, "supported_languages": null}, "macro.dbt.default__get_materialized_view_configuration_changes": {"name": "default__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_materialized_view_configuration_changes", "macro_sql": "{% macro default__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1786398582.5396936, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_sql": {"name": "get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.get_replace_materialized_view_sql", "macro_sql": "{% macro get_replace_materialized_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_materialized_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5402238, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_sql": {"name": "default__get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_sql", "macro_sql": "{% macro default__get_replace_materialized_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5405285, "supported_languages": null}, "macro.dbt.get_create_materialized_view_as_sql": {"name": "get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n {{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5410311, "supported_languages": null}, "macro.dbt.default__get_create_materialized_view_as_sql": {"name": "default__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.default__get_create_materialized_view_as_sql", "macro_sql": "{% macro default__get_create_materialized_view_as_sql(relation, sql) -%}\n {{ exceptions.raise_compiler_error(\n \"`get_create_materialized_view_as_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5413399, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n {{- adapter.dispatch('drop_materialized_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.541801, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5420442, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n {%- if execute: -%}\n {%- set compiled_code = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n {{ write(compiled_code) }}\n {%- endif -%}\n {%- if language == 'sql'-%}\n {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- elif language == 'python' -%}\n {%- set res = submit_python_job(model, compiled_code) -%}\n {#-- TODO: What should table be for python models? --#}\n {%- set table = None -%}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "fetch_result", "type": null, "description": ""}, {"name": "auto_begin", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1786398582.5445278, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "message", "type": null, "description": ""}, {"name": "code", "type": null, "description": ""}, {"name": "rows_affected", "type": null, "description": ""}, {"name": "res", "type": null, "description": ""}], "created_at": 1786398582.5456648, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.5462487, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date_str", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1786398582.547645, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partition start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date_str", "type": null, "description": ""}, {"name": "end_date_str", "type": null, "description": ""}, {"name": "in_fmt", "type": null, "description": ""}, {"name": "out_fmt", "type": null, "description": ""}], "created_at": 1786398582.5500488, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "raw_partition_date", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1786398582.5516295, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5520937, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786398582.5527086, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786398582.5531952, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1786398582.554207, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1786398582.554836, "supported_languages": null}, "macro.dbt.get_fixture_sql": {"name": "get_fixture_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_fixture_sql", "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%- set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%- set column_name_to_data_types = {} -%}\n{%- set column_name_to_quoted = {} -%}\n{%- for column in columns_in_relation -%}\n\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n{%- endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n{{ validate_fixture_rows(rows, row_number) }}\n\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%- set default_row_copy = default_row.copy() -%}\n{%- do default_row_copy.update(formatted_row) -%}\nselect\n{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n select\n {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%},{%- endif %}\n {%- endfor %}\n limit 0\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.safe_cast", "macro.dbt.validate_fixture_rows", "macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1786398582.559958, "supported_languages": null}, "macro.dbt.get_expected_sql": {"name": "get_expected_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_expected_sql", "macro_sql": "{% macro get_expected_sql(rows, column_name_to_data_types, column_name_to_quoted) %}\n\n{%- if (rows | length) == 0 -%}\n select * from dbt_internal_unit_test_actual\n limit 0\n{%- else -%}\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\nselect\n{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n{%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}, {"name": "column_name_to_quoted", "type": null, "description": ""}], "created_at": 1786398582.5615292, "supported_languages": null}, "macro.dbt.format_row": {"name": "format_row", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.format_row", "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n {#-- generate case-insensitive formatted row --#}\n {% set formatted_row = {} %}\n {%- for column_name, column_value in row.items() -%}\n {% set column_name = column_name|lower %}\n\n {%- if column_name not in column_name_to_data_types %}\n {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n {{ exceptions.raise_compiler_error(\n \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n ) }}\n {%- endif -%}\n\n {%- set column_type = column_name_to_data_types[column_name] %}\n\n {#-- For string fixture values, strip varchar length to prevent silent truncation (GH-11974) --#}\n {%- if column_value is string and 'varying' in column_type -%}\n {%- set column_type = column_type.split('(')[0] -%}\n {%- endif -%}\n\n {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n {%- set column_value_clean = column_value -%}\n {%- if column_value is string -%}\n {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n {%- elif column_value is none -%}\n {%- set column_value_clean = 'null' -%}\n {%- endif -%}\n\n {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n {%- do formatted_row.update(row_update) -%}\n {%- endfor -%}\n {{ return(formatted_row) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.string_literal", "macro.dbt.escape_single_quotes", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "row", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1786398582.5640888, "supported_languages": null}, "macro.dbt.validate_fixture_rows": {"name": "validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.validate_fixture_rows", "macro_sql": "{%- macro validate_fixture_rows(rows, row_number) -%}\n {{ return(adapter.dispatch('validate_fixture_rows', 'dbt')(rows, row_number)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__validate_fixture_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1786398582.5645306, "supported_languages": null}, "macro.dbt.default__validate_fixture_rows": {"name": "default__validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.default__validate_fixture_rows", "macro_sql": "{%- macro default__validate_fixture_rows(rows, row_number) -%}\n {# This is an abstract method for adapter overrides as needed #}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1786398582.5647342, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1786398582.5662856, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n {{ input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1786398582.5665922, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n\n {#\n We want to get the string of the returned relation by calling .render() in order to skip sample/empty\n mode rendering logic. However, people override the default ref macro, and often return a string instead\n of a relation (like the ref macro does by default). Thus, to make sure we dont blow things up, we have\n to ensure the resolved relation has a .render() method.\n #}\n {%- if resolved.render is defined and resolved.render is callable -%}\n {%- set resolved = resolved.render() -%}\n {%- endif -%}\n\n {%- if _ref.get('version') -%}\n {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n {%- endif -%}\n {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef ref(*args, **kwargs):\n refs = {{ ref_dict | tojson }}\n key = '.'.join(args)\n version = kwargs.get(\"v\") or kwargs.get(\"version\")\n if version:\n key += f\".v{version}\"\n dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786398582.5684807, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n {%- set source_dict = {} -%}\n {%- for _source in model.sources -%}\n {%- set resolved = source(*_source) -%}\n {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n sources = {{ source_dict | tojson }}\n key = '.'.join(args)\n return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786398582.569296, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n {%- for key, default in config_dbt_used -%}\n {# weird type testing with enum, would be much easier to write this logic in Python! #}\n {%- if key == \"language\" -%}\n {%- set value = \"python\" -%}\n {%- endif -%}\n {%- set value = model.config.get(key, default) -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\n {# Handle dbt.config.meta_get() calls - use separate dict to avoid overwriting native configs #}\n {%- set meta_dict = {} -%}\n {%- if model.config.meta_keys_used -%}\n {% set meta_dbt_used = zip(model.config.meta_keys_used, model.config.meta_keys_defaults) | list %}\n {%- for key, default in meta_dbt_used -%}\n {%- if model.config.meta and key in model.config.meta -%}\n {%- set value = model.config.meta[key] -%}\n {%- else -%}\n {%- set value = default -%}\n {%- endif -%}\n {%- do meta_dict.update({key: value}) -%}\n {%- endfor -%}\n {%- endif -%}\nconfig_dict = {{ config_dict }}\nmeta_dict = {{ meta_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786398582.571528, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n def __init__(self, *args, **kwargs):\n pass\n\n @staticmethod\n def get(key, default=None):\n return config_dict.get(key, default)\n\n @staticmethod\n def meta_get(key, default=None):\n return meta_dict.get(key, default)\n\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = \"{{ this.database }}\"\n schema = \"{{ this.schema }}\"\n identifier = \"{{ this.identifier }}\"\n {% set this_relation_name = resolve_model_name(this) %}\n def __repr__(self):\n return '{{ this_relation_name }}'\n\n\nclass dbtObj:\n def __init__(self, load_df_function) -> None:\n self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n self.config = config\n self.this = this()\n self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1786398582.5724723, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5726337, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.5734537, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if node is not none and node|attr('database') -%}\n {%- set catalog_relation = adapter.build_catalog_relation(node) -%}\n {%- if catalog_relation and catalog_relation|attr('catalog_database') -%}\n {{ return(catalog_relation.catalog_database) }}\n {%- endif -%}\n {%- endif -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.5745084, "supported_languages": null}, "macro.dbt.generate_latest_version_pointer_alias": {"name": "generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.generate_latest_version_pointer_alias", "macro_sql": "{% macro generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_latest_version_pointer_alias', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_latest_version_pointer_alias"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.575267, "supported_languages": null}, "macro.dbt.default__generate_latest_version_pointer_alias": {"name": "default__generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.default__generate_latest_version_pointer_alias", "macro_sql": "{% macro default__generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {%- if custom_alias_name -%}\n {{ custom_alias_name | trim }}\n {%- else -%}\n {{ node.name }}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.5757134, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.576555, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.577084, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.577799, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.5785456, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name -%}\n\n {{ custom_alias_name | trim }}\n\n {%- elif node.version -%}\n\n {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n {%- else -%}\n\n {{ node.name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1786398582.5793123, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5802028, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5805163, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5808082, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5810223, "supported_languages": null}, "macro.dbt.get_snapshot_get_time_data_type": {"name": "get_snapshot_get_time_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.get_snapshot_get_time_data_type", "macro_sql": "{% macro get_snapshot_get_time_data_type() %}\n {% set snapshot_time = adapter.dispatch('snapshot_get_time', 'dbt')() %}\n {% set time_data_type_sql = 'select ' ~ snapshot_time ~ ' as dbt_snapshot_time' %}\n {% set snapshot_time_column_schema = get_column_schema_from_query(time_data_type_sql) %}\n {% set time_data_type = snapshot_time_column_schema[0].dtype %}\n {{ return(time_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt_postgres.postgres__snapshot_get_time", "macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5818377, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5821872, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5823522, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5826783, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5830033, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1786398582.5839417, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1786398582.5842416, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5845633, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5854743, "supported_languages": null}, "macro.dbt.get_drop_index_sql": {"name": "get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_drop_index_sql", "macro_sql": "{% macro get_drop_index_sql(relation, index_name) -%}\n {{ adapter.dispatch('get_drop_index_sql', 'dbt')(relation, index_name) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1786398582.5858462, "supported_languages": null}, "macro.dbt.default__get_drop_index_sql": {"name": "default__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_drop_index_sql", "macro_sql": "{% macro default__get_drop_index_sql(relation, index_name) -%}\n {{ exceptions.raise_compiler_error(\"`get_drop_index_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1786398582.586146, "supported_languages": null}, "macro.dbt.get_show_indexes_sql": {"name": "get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_show_indexes_sql", "macro_sql": "{% macro get_show_indexes_sql(relation) -%}\n {{ adapter.dispatch('get_show_indexes_sql', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5864742, "supported_languages": null}, "macro.dbt.default__get_show_indexes_sql": {"name": "default__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_show_indexes_sql", "macro_sql": "{% macro default__get_show_indexes_sql(relation) -%}\n {{ exceptions.raise_compiler_error(\"`get_show_indexes_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5867343, "supported_languages": null}, "macro.dbt.get_catalog_relations": {"name": "get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_relations", "macro_sql": "{% macro get_catalog_relations(information_schema, relations) -%}\n {{ return(adapter.dispatch('get_catalog_relations', 'dbt')(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786398582.5884259, "supported_languages": null}, "macro.dbt.default__get_catalog_relations": {"name": "default__get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_relations", "macro_sql": "{% macro default__get_catalog_relations(information_schema, relations) -%}\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog_relations not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786398582.5889335, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1786398582.5893557, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1786398582.589855, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786398582.5902352, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786398582.5905626, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786398582.5909193, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1786398582.5914273, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1786398582.591842, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1786398582.5924654, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786398582.5929449, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786398582.5933065, "supported_languages": null}, "macro.dbt.list_function_relations_without_caching": {"name": "list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_function_relations_without_caching", "macro_sql": "{% macro list_function_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_function_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__list_function_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786398582.5936718, "supported_languages": null}, "macro.dbt.default__list_function_relations_without_caching": {"name": "default__list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_function_relations_without_caching", "macro_sql": "{% macro default__list_function_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_function_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1786398582.5939863, "supported_languages": null}, "macro.dbt.get_catalog_for_single_relation": {"name": "get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_for_single_relation", "macro_sql": "{% macro get_catalog_for_single_relation(relation) %}\n {{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_catalog_for_single_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5943675, "supported_languages": null}, "macro.dbt.default__get_catalog_for_single_relation": {"name": "default__get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_for_single_relation", "macro_sql": "{% macro default__get_catalog_for_single_relation(relation) %}\n {{ exceptions.raise_not_implemented(\n 'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5946913, "supported_languages": null}, "macro.dbt.get_relations": {"name": "get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relations", "macro_sql": "{% macro get_relations() %}\n {{ return(adapter.dispatch('get_relations', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.595023, "supported_languages": null}, "macro.dbt.default__get_relations": {"name": "default__get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relations", "macro_sql": "{% macro default__get_relations() %}\n {{ exceptions.raise_not_implemented(\n 'get_relations macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.5953531, "supported_languages": null}, "macro.dbt.get_relation_last_modified": {"name": "get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relation_last_modified", "macro_sql": "{% macro get_relation_last_modified(information_schema, relations) %}\n {{ return(adapter.dispatch('get_relation_last_modified', 'dbt')(information_schema, relations)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_relation_last_modified"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786398582.5957584, "supported_languages": null}, "macro.dbt.default__get_relation_last_modified": {"name": "default__get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relation_last_modified", "macro_sql": "{% macro default__get_relation_last_modified(information_schema, relations) %}\n {{ exceptions.raise_not_implemented(\n 'get_relation_last_modified macro not implemented for adapter ' + adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1786398582.5960975, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5982687, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.5985878, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1786398582.5992072, "supported_languages": null}, "macro.dbt.get_list_of_column_names": {"name": "get_list_of_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_list_of_column_names", "macro_sql": "\n\n{%- macro get_list_of_column_names(columns) -%}\n {% set col_names = [] %}\n {% for col in columns %}\n {% do col_names.append(col.name) %}\n {% endfor %}\n {{ return(col_names) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.5997882, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1786398582.6002407, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n {%- if select_sql_header is not none -%}\n {{ select_sql_header }}\n {%- endif -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1786398582.600652, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.6011171, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n {%- set col_err = [] -%}\n {%- set col_naked_numeric = [] -%}\n select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {%- do col_err.append(col['name']) -%}\n {#-- If this column's type is just 'numeric' then it is missing precision/scale, raise a warning --#}\n {%- elif col['data_type'].strip().lower() in ('numeric', 'decimal', 'number') -%}\n {%- do col_naked_numeric.append(col['name']) -%}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n {{ cast('null', col['data_type']) }} as {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n {%- if (col_err | length) > 0 -%}\n {{ exceptions.column_type_missing(column_names=col_err) }}\n {%- elif (col_naked_numeric | length) > 0 -%}\n {{ exceptions.warn(\"Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: \" ~ col_naked_numeric ~ \"`\") }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1786398582.6034622, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n {% set columns = [] %}\n {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1786398582.6041927, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1786398582.6045713, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n {{ get_empty_subquery_sql(select_sql) }}\n {% endcall %}\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1786398582.6052678, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1786398582.605713, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation.render() }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation.render() }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation.render() }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation.render() }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1786398582.6070087, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1786398582.6075351, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation.render() }}\n\n {% for column in add_columns %}\n add column {{ column.quoted }} {{ column.expanded_data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.quoted }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1786398582.6091156, "supported_languages": null}, "macro.dbt.is_core_v2": {"name": "is_core_v2", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/runtime.sql", "original_file_path": "macros/adapters/runtime.sql", "unique_id": "macro.dbt.is_core_v2", "macro_sql": "{% macro is_core_v2() -%}\n {%- set major_version = (dbt_version.split('.') | first) | int -%}\n {{ return(major_version == 2) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.609698, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6103334, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6107097, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.61103, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6114168, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1786398582.6126478, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1786398582.612986, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1786398582.6135254, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1786398582.6138647, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1786398582.6144118, "supported_languages": null}, "macro.dbt.validate_doc_columns": {"name": "validate_doc_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.validate_doc_columns", "macro_sql": "{% macro validate_doc_columns(relation, column_dict, existing_column_names) %}\n {% set existing_lower = existing_column_names | map(\"lower\") | list %}\n {% set missing = [] %}\n {% set filtered = {} %}\n {% for col_name in column_dict %}\n {% set is_quoted = column_dict[col_name]['quote'] %}\n {% if is_quoted %}\n {% set present = col_name in existing_column_names %}\n {% else %}\n {% set present = col_name | lower in existing_lower %}\n {% endif %}\n {% if present %}\n {% do filtered.update({col_name: column_dict[col_name]}) %}\n {% else %}\n {% do missing.append(col_name) %}\n {% endif %}\n {% endfor %}\n {% if missing | length > 0 %}\n {{ exceptions.warn(\"In relation \" ~ relation.render() ~ \": The following columns are specified in the schema but are not present in the database: \" ~ missing | join(\", \")) }}\n {% endif %}\n {{ return(filtered) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}, {"name": "existing_column_names", "type": null, "description": ""}], "created_at": 1786398582.616468, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% set filtered_columns = validate_doc_columns(relation, model.columns, existing_columns) %}\n {% set alter_comment_sql = alter_column_comment(relation, filtered_columns) %}\n {% if alter_comment_sql and alter_comment_sql | trim | length > 0 %}\n {% do run_query(alter_comment_sql) %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.validate_doc_columns", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1786398582.6180542, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786398582.618947, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786398582.6197655, "supported_languages": null}, "macro.dbt.collect_freshness_custom_sql": {"name": "collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness_custom_sql", "macro_sql": "{% macro collect_freshness_custom_sql(source, loaded_at_query) %}\n {{ return(adapter.dispatch('collect_freshness_custom_sql', 'dbt')(source, loaded_at_query))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness_custom_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1786398582.6202123, "supported_languages": null}, "macro.dbt.default__collect_freshness_custom_sql": {"name": "default__collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness_custom_sql", "macro_sql": "{% macro default__collect_freshness_custom_sql(source, loaded_at_query) %}\n {% call statement('collect_freshness_custom_sql', fetch_result=True, auto_begin=False) -%}\n with source_query as (\n {{ loaded_at_query }}\n )\n select\n (select * from source_query) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n {% endcall %}\n {{ return(load_result('collect_freshness_custom_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1786398582.6208293, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.622948, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.6232133, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.623542, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.6237698, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "full_refresh_mode", "type": null, "description": ""}], "created_at": 1786398582.6245253, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6250052, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6252878, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786398582.625734, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation.render() }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786398582.6261663, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786398582.6266274, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n {%- set quoted_grantees = [] -%}\n {%- for grantee in grantees -%}\n {%- do quoted_grantees.append(adapter.quote(grantee)) -%}\n {%- endfor -%}\n revoke {{ privilege }} on {{ relation.render() }} from {{ quoted_grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1786398582.6273925, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1786398582.627841, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1786398582.6291625, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1786398582.6295507, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1786398582.6300287, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1786398582.6305034, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation.render() ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1786398582.632859, "supported_languages": null}, "macro.dbt.get_show_sql": {"name": "get_show_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_show_sql", "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header is not none -%}\n {{ sql_header }}\n {%- endif %}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "compiled_code", "type": null, "description": ""}, {"name": "sql_header", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786398582.6336389, "supported_languages": null}, "macro.dbt.get_limit_subquery_sql": {"name": "get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_limit_subquery_sql", "macro_sql": "\n{%- macro get_limit_subquery_sql(sql, limit) -%}\n {{ adapter.dispatch('get_limit_sql', 'dbt')(sql, limit) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_limit_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786398582.6340115, "supported_languages": null}, "macro.dbt.default__get_limit_sql": {"name": "default__get_limit_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.default__get_limit_sql", "macro_sql": "{% macro default__get_limit_sql(sql, limit) %}\n {{ sql }}\n {% if limit is not none %}\n limit {{ limit }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1786398582.6344101, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.6356974, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.6360316, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {#-- This ensures microbatch batches get unique temp relations to avoid clobbering --#}\n {% if suffix == '__dbt_tmp' and model.batch %}\n {% set suffix = suffix ~ '_' ~ model.batch.id %}\n {% endif %}\n\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.6367977, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.6373801, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.6378517, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1786398582.63848, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6388319, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation.render() }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6392097, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6396937, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6408978, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6413639, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.6416526, "supported_languages": null}, "macro.dbt.validate_sql": {"name": "validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.validate_sql", "macro_sql": "{% macro validate_sql(sql) -%}\n {{ return(adapter.dispatch('validate_sql', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__validate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.642216, "supported_languages": null}, "macro.dbt.default__validate_sql": {"name": "default__validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.default__validate_sql", "macro_sql": "{% macro default__validate_sql(sql) -%}\n {% call statement('validate_sql') -%}\n explain {{ sql }}\n {% endcall %}\n {{ return(load_result('validate_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1786398582.6426644, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.6435056, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.6439931, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.644602, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.6451778, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"name": "fill_staging_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.fill_staging_columns", "macro_sql": "{% macro fill_staging_columns(source_columns, staging_columns) %}\n\n{%- set source_column_names = source_columns|map(attribute='name')|map('lower')|list -%}\n{%- set using_source_casing = var('fivetran_using_source_casing', false) -%}\n\n{%- for column in staging_columns %}\n {%- if column.name|lower in source_column_names %}\n {%- if using_source_casing %}\n {%- set column_alias = column.alias if 'alias' in column else column.name %}\n {{ adapter.quote(column.name) }} as {{ adapter.quote(column_alias|upper if target.type == 'snowflake' else column_alias) }}\n {%- else %}\n {{ fivetran_utils.quote_column(column) }} as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}\n {%- else %}\n cast(null as {{ column.datatype }}) as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}{{ ',' if not loop.last }}\n{%- endfor %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "staging_columns", "type": null, "description": ""}], "created_at": 1786398582.6480079, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"name": "quote_column", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.quote_column", "macro_sql": "{% macro quote_column(column) %}\n {%- if 'quote' in column %}\n {%- if column.quote %}\n {%- if target.type in ('bigquery', 'spark', 'databricks') %}\n `{{ column.name }}`\n {%- elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {%- else %}\n \"{{ column.name }}\"\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1786398582.6490698, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"name": "string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', 'fivetran_utils') (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786398582.6497462, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"name": "default__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786398582.6500285, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"name": "snowflake__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786398582.6503203, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"name": "redshift__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786398582.6506002, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"name": "spark__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.spark__string_agg", "macro_sql": "{% macro spark__string_agg(field_to_agg, delimiter) %}\n -- collect set will remove duplicates\n replace(replace(replace(cast( collect_set({{ field_to_agg }}) as string), '[', ''), ']', ''), ', ', {{ delimiter }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1786398582.65088, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"name": "add_dbt_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "unique_id": "macro.fivetran_utils.add_dbt_source_relation", "macro_sql": "{% macro add_dbt_source_relation() %}\n\n{% if var('union_schemas', none) or var('union_databases', none) %}\n, _dbt_source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.651417, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"name": "remove_prefix_from_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "macro_sql": "{% macro remove_prefix_from_columns(columns, prefix='', exclude=[]) %}\n\n {%- for col in columns if col.name not in exclude -%}\n {%- if col.name[:prefix|length]|lower == prefix -%}\n {{ col.name }} as {{ col.name[prefix|length:] }}\n {%- else -%}\n {{ col.name }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}], "created_at": 1786398582.6527314, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"name": "pivot_json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "unique_id": "macro.fivetran_utils.pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n{%- if property is mapping -%}\nreplace( {{ fivetran_utils.json_extract(string, property.name) }}, '\"', '') as {{ property.alias if property.alias else property.name | replace(' ', '_') | replace('.', '_') | lower }}\n\n{%- else -%}\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- endif -%}\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "list_of_properties", "type": null, "description": ""}], "created_at": 1786398582.6542237, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"name": "max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786398582.654763, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"name": "default__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786398582.6549814, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"name": "snowflake__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786398582.6552145, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"name": "bigquery__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1786398582.6554291, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"name": "dummy_coalesce_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "unique_id": "macro.fivetran_utils.dummy_coalesce_value", "macro_sql": "{% macro dummy_coalesce_value(column) %}\n\n{% set coalesce_value = {\n 'STRING': \"'DUMMY_STRING'\",\n 'BOOLEAN': 'null',\n 'INT': 999999999,\n 'FLOAT': 999999999.99,\n 'TIMESTAMP': 'cast(\"2099-12-31\" as timestamp)',\n 'DATE': 'cast(\"2099-12-31\" as date)',\n} %}\n\n{% if column.is_float() %}\n{{ return(coalesce_value['FLOAT']) }}\n\n{% elif column.is_numeric() %}\n{{ return(coalesce_value['INT']) }}\n\n{% elif column.is_string() %}\n{{ return(coalesce_value['STRING']) }}\n\n{% elif column.data_type|lower == 'boolean' %}\n{{ return(coalesce_value['BOOLEAN']) }}\n\n{% elif 'timestamp' in column.data_type|lower %}\n{{ return(coalesce_value['TIMESTAMP']) }}\n\n{% elif 'date' in column.data_type|lower %}\n{{ return(coalesce_value['DATE']) }}\n\n{% elif 'int' in column.data_type|lower %}\n{{ return(coalesce_value['INT']) }}\n\n{% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1786398582.6579988, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"name": "source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.source_relation", "macro_sql": "{% macro source_relation(union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('source_relation', 'fivetran_utils') (union_schema_variable, union_database_variable) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786398582.6587687, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"name": "default__source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.default__source_relation", "macro_sql": "{% macro default__source_relation(union_schema_variable, union_database_variable) %}\n\n{% if var(union_schema_variable, none) %}\n, case\n {% for schema in var(union_schema_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%.{{ schema|lower }}.%' then '{{ schema|lower }}'\n {% endfor %}\n end as source_relation\n{% elif var(union_database_variable, none) %}\n, case\n {% for database in var(union_database_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%{{ database|lower }}.%' then '{{ database|lower }}'\n {% endfor %}\n end as source_relation\n{% else %}\n, cast('' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786398582.659917, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"name": "calculated_fields", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "unique_id": "macro.fivetran_utils.calculated_fields", "macro_sql": "{% macro calculated_fields(variable) -%}\n\n{% if var(variable, none) %}\n {% for field in var(variable) %}\n , {{ field.transform_sql }} as {{ field.name }} \n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}], "created_at": 1786398582.660665, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"name": "enabled_vars_one_true", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "unique_id": "macro.fivetran_utils.enabled_vars_one_true", "macro_sql": "{% macro enabled_vars_one_true(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, False) == True %}\n {{ return(True) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(False) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1786398582.6614392, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"name": "try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6624072, "supported_languages": null}, "macro.fivetran_utils.default__try_cast": {"name": "default__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.default__try_cast", "macro_sql": "{% macro default__try_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.662696, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"name": "redshift__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.redshift__try_cast", "macro_sql": "{% macro redshift__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when trim({{field}}) ~ '^(0|[1-9][0-9]*)$' then trim({{field}})\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6632814, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"name": "postgres__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.postgres__try_cast", "macro_sql": "{% macro postgres__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar)) ~ '^(0|[1-9][0-9]*)$' \n then replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar))\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6639555, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"name": "snowflake__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6642535, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"name": "bigquery__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6645172, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"name": "spark__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.664775, "supported_languages": null}, "macro.fivetran_utils.sqlserver__try_cast": {"name": "sqlserver__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.sqlserver__try_cast", "macro_sql": "{% macro sqlserver__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1786398582.6650395, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"name": "json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6661904, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"name": "default__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.default__json_parse", "macro_sql": "{% macro default__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6666908, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"name": "redshift__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.redshift__json_parse", "macro_sql": "{% macro redshift__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6671982, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"name": "bigquery__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.bigquery__json_parse", "macro_sql": "{% macro bigquery__json_parse(string, string_path) %}\n\n \n json_extract_scalar({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.667691, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"name": "postgres__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.postgres__json_parse", "macro_sql": "{% macro postgres__json_parse(string, string_path) %}\n\n {{string}}::json #>> '{ {%- for s in string_path -%}{{ s }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%} }'\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6681848, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"name": "snowflake__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.snowflake__json_parse", "macro_sql": "{% macro snowflake__json_parse(string, string_path) %}\n\n parse_json( {{string}} ) {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6687245, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"name": "spark__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.spark__json_parse", "macro_sql": "{% macro spark__json_parse(string, string_path) %}\n\n {{string}} : {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.669271, "supported_languages": null}, "macro.fivetran_utils.sqlserver__json_parse": {"name": "sqlserver__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.sqlserver__json_parse", "macro_sql": "{% macro sqlserver__json_parse(string, string_path) %}\n\n json_value({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.669749, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"name": "fill_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.fill_pass_through_columns", "macro_sql": "{% macro fill_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable) %}\n {% for field in var(pass_through_variable) %}\n {% if field is mapping %}\n {% if field.transform_sql %}\n , {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }}\n {% else %}\n , {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% else %}\n , {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}], "created_at": 1786398582.6710954, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n {%- set source_column_name = source_column_name if source_column_name is not none else '_dbt_source_relation' -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ aliases[loop.index0] if aliases else relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1786398582.6768026, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"name": "union_tables", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_tables", "macro_sql": "{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}\n\n {%- do exceptions.warn(\"Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. Use the `union_relations` macro instead\") -%}\n\n {{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tables", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1786398582.677543, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"name": "ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1786398582.678046, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"name": "default__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1786398582.6782868, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"name": "snowflake__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1786398582.6784992, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"name": "json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6792822, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"name": "default__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.679603, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"name": "snowflake__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.snowflake__json_extract", "macro_sql": "{% macro snowflake__json_extract(string, string_path) %}\n\n json_extract_path_text(try_parse_json( {{string}} ), {{ \"'\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6799166, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"name": "redshift__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.redshift__json_extract", "macro_sql": "{% macro redshift__json_extract(string, string_path) %}\n\n case when is_valid_json( {{string}} ) then json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} ) else null end\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6802893, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"name": "bigquery__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.680606, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"name": "postgres__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1786398582.6809106, "supported_languages": null}, "macro.fivetran_utils.partition_by_source_relation": {"name": "partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.partition_by_source_relation", "macro_sql": "{% macro partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) %}\n {{ return(adapter.dispatch('partition_by_source_relation', 'fivetran_utils')(package_name, has_other_partitions, alias, package_prefix_union_variable)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__partition_by_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1786398582.6819012, "supported_languages": null}, "macro.fivetran_utils.default__partition_by_source_relation": {"name": "default__partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.default__partition_by_source_relation", "macro_sql": "{% macro default__partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) -%}\n\n{%- if package_prefix_union_variable %}\n {%- set union_schemas_var = package_name ~ '_union_schemas' -%}\n {%- set union_databases_var = package_name ~ '_union_databases' -%}\n{%- else %}\n {%- set union_schemas_var = 'union_schemas' -%}\n {%- set union_databases_var = 'union_databases' -%}\n{%- endif -%}\n\n{%- set is_unioning = var(union_schemas_var, [])|length > 1 or var(union_databases_var, [])|length > 1 or var(package_name ~ '_sources', [])|length > 1 -%}\n{%- set prefix = '' if alias is none else alias ~ '.' -%}\n\n{%- if has_other_partitions == 'no' -%}\n {{- 'partition by ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- else -%}\n {{- ', ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1786398582.684076, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"name": "empty_variable_warning", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "unique_id": "macro.fivetran_utils.empty_variable_warning", "macro_sql": "{% macro empty_variable_warning(variable, downstream_model) %}\n\n{% if not var(variable) %}\n{{ log(\n \"\"\"\n Warning: You have passed an empty list to the \"\"\" ~ variable ~ \"\"\".\n As a result, you won't see the history of any columns in the \"\"\" ~ downstream_model ~ \"\"\" model.\n \"\"\",\n info=True\n) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}, {"name": "downstream_model", "type": null, "description": ""}], "created_at": 1786398582.684855, "supported_languages": null}, "macro.fivetran_utils.wrap_in_quotes": {"name": "wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.wrap_in_quotes", "macro_sql": "{%- macro wrap_in_quotes(object_to_quote) -%}\n\n{{ return(adapter.dispatch('wrap_in_quotes', 'fivetran_utils')(object_to_quote)) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.postgres__wrap_in_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786398582.6854987, "supported_languages": null}, "macro.fivetran_utils.default__wrap_in_quotes": {"name": "default__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.default__wrap_in_quotes", "macro_sql": "{%- macro default__wrap_in_quotes(object_to_quote) -%}\n{# bigquery, spark, databricks #}\n `{{ object_to_quote }}`\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786398582.685732, "supported_languages": null}, "macro.fivetran_utils.snowflake__wrap_in_quotes": {"name": "snowflake__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.snowflake__wrap_in_quotes", "macro_sql": "{%- macro snowflake__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote | upper }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786398582.685964, "supported_languages": null}, "macro.fivetran_utils.redshift__wrap_in_quotes": {"name": "redshift__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.redshift__wrap_in_quotes", "macro_sql": "{%- macro redshift__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786398582.686238, "supported_languages": null}, "macro.fivetran_utils.postgres__wrap_in_quotes": {"name": "postgres__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.postgres__wrap_in_quotes", "macro_sql": "{%- macro postgres__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1786398582.6864643, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"name": "array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1786398582.6869469, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"name": "default__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1786398582.6871848, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"name": "redshift__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1786398582.687403, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"name": "timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786398582.6881866, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"name": "default__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestampadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786398582.6885293, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"name": "bigquery__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestamp_add({{ from_timestamp }}, interval {{ interval }} {{ datepart }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786398582.688857, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"name": "redshift__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_add", "macro_sql": "{% macro redshift__timestamp_add(datepart, interval, from_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786398582.6892083, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"name": "postgres__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786398582.6895368, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"name": "spark__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1786398582.6899865, "supported_languages": null}, "macro.fivetran_utils.extract_url_parameter": {"name": "extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.extract_url_parameter", "macro_sql": "{% macro extract_url_parameter(field, url_parameter) -%}\n\n{{ adapter.dispatch('extract_url_parameter', 'fivetran_utils') (field, url_parameter) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786398582.6906044, "supported_languages": null}, "macro.fivetran_utils.default__extract_url_parameter": {"name": "default__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.default__extract_url_parameter", "macro_sql": "{% macro default__extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786398582.6909003, "supported_languages": null}, "macro.fivetran_utils.spark__extract_url_parameter": {"name": "spark__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.spark__extract_url_parameter", "macro_sql": "{% macro spark__extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786398582.6913161, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"name": "add_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.add_pass_through_columns", "macro_sql": "{% macro add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_var", "type": null, "description": ""}], "created_at": 1786398582.69326, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"name": "snowflake_seed_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "unique_id": "macro.fivetran_utils.snowflake_seed_data", "macro_sql": "{% macro snowflake_seed_data(seed_name) %}\n\n{% if target.type == 'snowflake' %}\n{{ return(ref(seed_name ~ '_snowflake')) }}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}], "created_at": 1786398582.6939983, "supported_languages": null}, "macro.fivetran_utils.union_data": {"name": "union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.union_data", "macro_sql": "{%- macro union_data(table_identifier, database_variable, schema_variable, default_database, default_schema, default_variable, union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('union_data', 'fivetran_utils') (\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786398582.6962154, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"name": "default__union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.default__union_data", "macro_sql": "{%- macro default__union_data(\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) -%}\n\n{%- if var(union_schema_variable, none) -%}\n\n {%- set relations = [] -%}\n \n {%- if var(union_schema_variable) is string -%}\n {%- set trimmed = var(union_schema_variable)|trim('[')|trim(']') -%}\n {%- set schemas = trimmed.split(',')|map('trim',\" \")|map('trim','\"')|map('trim',\"'\") -%}\n {%- else -%}\n {%- set schemas = var(union_schema_variable) -%}\n {%- endif -%}\n\n {%- for schema in var(union_schema_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else var(database_variable, default_database),\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else schema,\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n \n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n \n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- elif var(union_database_variable, none) -%}\n\n {%- set relations = [] -%}\n\n {%- for database in var(union_database_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else database,\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else var(schema_variable, default_schema),\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n\n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- else -%}\n {% set exception_schemas = {\"linkedin_company_pages\": \"linkedin_pages\", \"instagram_business_pages\": \"instagram_business\"} %}\n {% set relation = namespace(value=\"\") %}\n {% if default_schema in exception_schemas.keys() %}\n {% for corrected_schema_name in exception_schemas.items() %} \n {% if default_schema in corrected_schema_name %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = corrected_schema_name[1] + \"_\" + table_identifier + \"_identifier\" %}\n {%- set relation.value=adapter.get_relation(\n database=source(corrected_schema_name[1], table_identifier).database,\n schema=source(corrected_schema_name[1], table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n {% endfor %}\n {% else %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifier\" %}\n {# Unfortunately the Twitter Organic identifiers were misspelled. As such, we will need to account for this in the model. This will be adjusted in the Twitter Organic package, but to ensure backwards compatibility, this needs to be included. #}\n {% if var(identifier_var, none) is none %} \n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifer\" %}\n {% endif %}\n {%- set relation.value=adapter.get_relation(\n database=source(default_schema, table_identifier).database,\n schema=source(default_schema, table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n{%- set table_exists=relation.value is not none -%}\n\n{%- if table_exists -%}\n select * \n from {{ relation.value }}\n{%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n{%- endif -%}\n{%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1786398582.704995, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"name": "enabled_vars", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "unique_id": "macro.fivetran_utils.enabled_vars", "macro_sql": "{% macro enabled_vars(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, True) == False %}\n {{ return(False) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1786398582.705834, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"name": "timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('timestamp_diff', 'fivetran_utils')(first_date, second_date, datepart) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.7072628, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"name": "default__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.707604, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"name": "redshift__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "macro_sql": "{% macro redshift__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.7079353, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"name": "bigquery__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_date, second_date, datepart) %}\n\n timestamp_diff(\n {{second_date}},\n {{first_date}},\n {{datepart}}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.7082832, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"name": "postgres__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "macro_sql": "{% macro postgres__timestamp_diff(first_date, second_date, datepart) %}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.7115486, "supported_languages": null}, "macro.fivetran_utils.union_connections": {"name": "union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.union_connections", "macro_sql": "{% macro union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{{ adapter.dispatch('union_connections', 'fivetran_utils') (connection_dictionary, single_source_name, single_table_name, default_identifier) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_connections"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1786398582.713026, "supported_languages": null}, "macro.fivetran_utils.default__union_connections": {"name": "default__union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.default__union_connections", "macro_sql": "{% macro default__union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{%- set exception_warning = \"\\n\\nPlease be aware: The \" ~ single_source_name|upper ~ \".\" ~ single_table_name|upper ~ \" table was not found in your schema(s). The Fivetran Data Model will create a completely empty staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_connections-source for details).\\n\"%}\n{%- set using_empty_table_warnings = (execute and not var('fivetran__remove_empty_table_warnings', false)) %}\n{%- set connections = var(connection_dictionary, []) %}\n{%- set using_unioning = connections | length > 0 %}\n{%- set identifier_var = single_source_name + \"_\" + single_table_name + \"_identifier\" %}\n\n{%- if using_unioning %}\n{# For unioning #}\n {%- set relations = [] -%}\n {%- for connection in connections -%}\n\n {% if var('has_defined_sources', false) %}\n {%- set database = source(connection.name, single_table_name).database %}\n {%- set schema = source(connection.name, single_table_name).schema %}\n {%- set identifier = source(connection.name, single_table_name).identifier %}\n {%- else %}\n {%- set database = connection.database if connection.database else target.database %}\n {%- set schema = connection.schema if connection.schema else single_source_name %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n {%- endif %}\n \n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n {%- if relation is not none -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- database: ' ~ database }}\n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {%- endfor -%}\n\n {%- if relations | length > 0 -%}\n {{ fivetran_utils.union_relations_custom(relations, source_column_name='_dbt_source_relation') }}\n\n {%- else -%}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n\n{% else %}\n{# Not unioning #}\n\n {%- set database = source(single_source_name, single_table_name).database %}\n {%- set schema = source(single_source_name, single_table_name).schema %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n\n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- full-identifier_var: ' ~ identifier_var }}\n {{ '-- database: ' ~ database }} \n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {% if relation is not none -%}\n select\n {{ dbt_utils.star(from=source(single_source_name, single_table_name)) }}\n from {{ source(single_source_name, single_table_name) }} as source_table\n\n {% else %}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n{% endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.union_relations_custom", "macro.dbt.type_string", "macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1786398582.7184927, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786398582.7194784, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n\n {%- set enabled_array = [] -%}\n {% for node in graph.sources.values() %}\n {% if node.identifier == source.identifier %}\n {% if (node.meta['is_enabled'] | default(true)) %}\n {%- do enabled_array.append(1) -%}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set is_enabled = (enabled_array != []) %}\n\n select\n {% if is_enabled %}\n max({{ loaded_at_field }})\n {% else %} \n {{ current_timestamp() }} {% endif %} as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n\n {% if is_enabled %}\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endif %}\n\n {% endcall %}\n\n {% if dbt_version.split('.') | map('int') | list >= [1, 5, 0] %}\n {{ return(load_result('collect_freshness')) }}\n {% else %}\n {{ return(load_result('collect_freshness').table) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1786398582.7219112, "supported_languages": null}, "macro.fivetran_utils.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) -%}\n\n{{ return(adapter.dispatch('fivetran_date_spine', 'fivetran_utils') (datepart, start_date, end_date)) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.7232463, "supported_languages": null}, "macro.fivetran_utils.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {{ dbt_utils.date_spine(datepart, start_date, end_date) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.7237997, "supported_languages": null}, "macro.fivetran_utils.sqlserver__fivetran_date_spine": {"name": "sqlserver__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.sqlserver__fivetran_date_spine", "macro_sql": "{% macro sqlserver__fivetran_date_spine(datepart, start_date, end_date) -%}\n\n {% set date_spine_query %}\n with\n\n l0 as (\n\n select c\n from (select 1 union all select 1) as d(c)\n\n ),\n l1 as (\n\n select\n 1 as c\n from l0 as a\n cross join l0 as b\n\n ),\n\n l2 as (\n\n select 1 as c\n from l1 as a\n cross join l1 as b\n ),\n\n l3 as (\n\n select 1 as c\n from l2 as a\n cross join l2 as b\n ),\n\n l4 as (\n\n select 1 as c\n from l3 as a\n cross join l3 as b\n ),\n\n l5 as (\n\n select 1 as c\n from l4 as a\n cross join l4 as b\n ),\n\n nums as (\n\n select row_number() over (order by (select null)) as rownum\n from l5\n ),\n\n rawdata as (\n\n select top ({{dbt.datediff(start_date, end_date, datepart)}}) rownum -1 as n\n from nums\n order by rownum\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n 'n',\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n order by 1\n\n {% endset %}\n\n {% set results = run_query(date_spine_query) %}\n\n {% if execute %}\n\n {% set results_list = results.columns[0].values() %}\n \n {% else %}\n\n {% set results_list = [] %}\n\n {% endif %}\n\n {%- for date_field in results_list %}\n select cast('{{ date_field }}' as date) as date_{{datepart}} {{ 'union all ' if not loop.last else '' }}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.dateadd", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.7259986, "supported_languages": null}, "macro.fivetran_utils.apply_source_relation": {"name": "apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.apply_source_relation", "macro_sql": "{% macro apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{{ adapter.dispatch('apply_source_relation', 'fivetran_utils') (package_name, use_package_prefix) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__apply_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1786398582.7270555, "supported_languages": null}, "macro.fivetran_utils.default__apply_source_relation": {"name": "default__apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.default__apply_source_relation", "macro_sql": "{% macro default__apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{% set sources_var = package_name ~ '_sources' %}\n{% set database_var = package_name ~ '_database' %}\n{% set schema_var = package_name ~ '_schema' %}\n\n{% if use_package_prefix %}\n {% set union_schemas_var = package_name ~ '_union_schemas' %}\n {% set union_databases_var = package_name ~ '_union_databases' %}\n{% else %}\n {% set union_schemas_var = 'union_schemas' %}\n {% set union_databases_var = 'union_databases' %}\n{% endif %}\n\n{% if var(sources_var, []) | length > 0 %}\n, _dbt_source_relation as source_relation\n{% elif var(union_schemas_var, []) | length > 0 or var(union_databases_var, []) | length > 0 %}\n{{ fivetran_utils.source_relation(union_schema_variable=union_schemas_var, union_database_variable=union_databases_var) }}\n{% else %}\n{% set database = var(database_var, target.database) %}\n{% set schema = var(schema_var, package_name) %}\n, cast('{{ database ~ \".\" ~ schema }}' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.source_relation", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1786398582.7293808, "supported_languages": null}, "macro.fivetran_utils.percentile": {"name": "percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', 'fivetran_utils') (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786398582.7302525, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"name": "default__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.default__percentile", "macro_sql": "{% macro default__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786398582.7306032, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"name": "redshift__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.redshift__percentile", "macro_sql": "{% macro redshift__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786398582.7309356, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"name": "bigquery__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.bigquery__percentile", "macro_sql": "{% macro bigquery__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786398582.73129, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"name": "postgres__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.postgres__percentile", "macro_sql": "{% macro postgres__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n /* have to group by partition field */\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786398582.7315838, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"name": "spark__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.spark__percentile", "macro_sql": "{% macro spark__percentile(percentile_field, partition_field, percent) %}\n\n percentile( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1786398582.7319052, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"name": "seed_data_helper", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "unique_id": "macro.fivetran_utils.seed_data_helper", "macro_sql": "{% macro seed_data_helper(seed_name, warehouses) %}\n\n{% if target.type in warehouses %}\n {% for w in warehouses %}\n {% if target.type == w %}\n {{ return(ref(seed_name ~ \"_\" ~ w ~ \"\")) }}\n {% endif %}\n {% endfor %}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}, {"name": "warehouses", "type": null, "description": ""}], "created_at": 1786398582.7330954, "supported_languages": null}, "macro.fivetran_utils.drop_schemas_automation": {"name": "drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.drop_schemas_automation", "macro_sql": "{% macro drop_schemas_automation(drop_target_schema=true) %}\n {{ return(adapter.dispatch('drop_schemas_automation', 'fivetran_utils')(drop_target_schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__drop_schemas_automation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1786398582.733938, "supported_languages": null}, "macro.fivetran_utils.default__drop_schemas_automation": {"name": "default__drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.default__drop_schemas_automation", "macro_sql": "{% macro default__drop_schemas_automation(drop_target_schema=true) %}\n\n{% set fetch_list_sql %}\n {% if target.type not in ('databricks', 'spark') %}\n select schema_name\n from \n {{ wrap_in_quotes(target.database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like '{{ target.schema | lower }}{%- if not drop_target_schema -%}_{%- endif -%}%'\n {% else %}\n SHOW SCHEMAS LIKE '{{ target.schema }}{%- if not drop_target_schema -%}_{%- endif -%}*'\n {% endif %}\n{% endset %}\n\n{% set results = run_query(fetch_list_sql) %}\n\n{% if execute %}\n {% set results_list = results.columns[0].values() %}\n{% else %}\n {% set results_list = [] %}\n{% endif %}\n\n{% for schema_to_drop in results_list %}\n {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema_to_drop)) %}\n {{ print('Schema ' ~ schema_to_drop ~ ' successfully dropped from the ' ~ target.database ~ ' database.\\n')}}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.wrap_in_quotes", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1786398582.7358851, "supported_languages": null}, "macro.fivetran_utils.union_relations_custom": {"name": "union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.union_relations_custom", "macro_sql": "{%- macro union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations_custom', 'fivetran_utils')(relations, aliases, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_relations_custom"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786398582.7379966, "supported_languages": null}, "macro.fivetran_utils.default__union_relations_custom": {"name": "default__union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.default__union_relations_custom", "macro_sql": "\n\n{%- macro default__union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations_custom') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations_custom') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n {# dbt_utils union_relations includes the table in the source_relation. For Fivetran dbt package purposes the table should not be included in the source relation. #}\n cast({{ dbt.string_literal(relation.database ~ '.' ~ relation.schema) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n \n {# This alias is a change from dbt_utils union_relations code. Avoids errors if the table is named a reserved keyword #}\n from {{ aliases[loop.index0] if aliases else relation }} as unioned_relation_{{ loop.index }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786398582.7449918, "supported_languages": null}, "macro.fivetran_utils.first_value": {"name": "first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', 'fivetran_utils') (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1786398582.745805, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"name": "default__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.default__first_value", "macro_sql": "{% macro default__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1786398582.7462451, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"name": "redshift__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.redshift__first_value", "macro_sql": "{% macro redshift__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} , {{ partition_field }} rows unbounded preceding )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1786398582.7466908, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"name": "persist_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable, identifier=none, transform='') %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}], "created_at": 1786398582.7479858, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.7486613, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n dbt.replace(\n dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n {{ dbt.position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt.split_part(\n dbt.right(\n stripped_url,\n dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ dbt.safe_cast(\n parsed_path,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.749923, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.7505689, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt.split_part(\n dbt.split_part(\n dbt.replace(\n dbt.replace(\n dbt.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1786398582.7514777, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786398582.752059, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1786398582.752697, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1786398582.753245, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1786398582.7536256, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1786398582.7551572, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786398582.755666, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786398582.7560122, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1786398582.7568798, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786398582.757403, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1786398582.757725, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{% if not string %}\n{{ return('') }}\n{% endif %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}], "created_at": 1786398582.7592487, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1786398582.7597897, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1786398582.7603123, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.760947, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.7620113, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.7625916, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1786398582.7632887, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1786398582.7640576, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {%- if execute -%}\n\n {% set r = load_result('get_query_result').table.columns[0].values() %}\n {% if r | length == 0 %}\n {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n {% set sql_result = default %}\n {% else %}\n {% set sql_result = r[0] %}\n {% endif %}\n \n {%- else -%}\n \n {% set sql_result = default %}\n \n {%- endif -%}\n\n {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1786398582.7656147, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1786398582.766404, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return([]) }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1786398582.7678556, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.7687783, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.7704518, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.77121, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.7717638, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1786398582.7724245, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1786398582.7735968, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1786398582.7750874, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1786398582.7768834, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.7778249, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398582.7789767, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.779451, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by generated_number) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1786398582.7801602, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786398582.7815022, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786398582.7844307, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers, unquote_aliases, rename)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1786398582.7860987, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- set rename_lower = {} -%}\r\n {%- for key, val in rename.items() -%}\r\n {%- do rename_lower.update({key.lower(): val}) -%}\r\n {%- endfor -%}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet\r\nor all columns were excluded. This star is only output during\r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif unquote_aliases %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- endif -%}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1786398582.7900612, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.790755, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.7918398, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1786398582.792692, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1786398582.7935953, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1786398582.7939775, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.7946005, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.7948744, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.7951639, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n case table_type\n when 'MANAGED' then 'table'\n when 'BASE TABLE' then 'table'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.7954412, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1786398582.7959788, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1786398582.7962706, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.7977624, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.7984986, "supported_languages": null}, "macro.dbt_utils.redshift__get_tables_by_pattern_sql": {"name": "redshift__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.redshift__get_tables_by_pattern_sql", "macro_sql": "{% macro redshift__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% set sql %}\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from \"{{ database }}\".\"information_schema\".\"tables\"\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n union all\n select distinct\n schemaname as {{ adapter.quote('table_schema') }},\n tablename as {{ adapter.quote('table_name') }},\n 'external' as {{ adapter.quote('table_type') }}\n from svv_external_tables\n where redshift_database_name = '{{ database }}'\n and schemaname ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n {% endset %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.7999022, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.8013034, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.8022857, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786398582.8042612, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n cast({{ dbt.string_literal(relation.render()) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n /* No columns from any of the relations.\n This star is only output during dbt compile, and exists to keep SQLFluff happy. */\n {% if dbt_command == 'compile' and ordered_column_names|length == 0 %}\n *\n {% endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1786398582.8111098, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.811818, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.812296, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.8129783, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n {%- set default_null_value = \"\" -%}\n{%- else -%}\n {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n {%- do fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1786398582.814273, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.8153515, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.815778, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }} as tt\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.8161166, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.8165271, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.8168619, "supported_languages": null}, "macro.dbt_utils.databricks__deduplicate": {"name": "databricks__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.databricks__deduplicate", "macro_sql": "\n{%- macro databricks__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.817222, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1786398582.8175688, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.8184848, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398582.8205957, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "degrees", "type": null, "description": ""}], "created_at": 1786398582.8214679, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1786398582.8220117, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1786398582.8231094, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1786398582.8247247, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.8255825, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.8264134, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.8267894, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1786398582.827821, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1786398582.8284593, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1786398582.8291452, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, quote_identifiers)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1786398582.8306258, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n {%- set current_col_name = adapter.quote(col.column) if quote_identifiers else col.column -%}\n select\n {%- for exclude_col in exclude %}\n {{ adapter.quote(exclude_col) if quote_identifiers else exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ adapter.quote(field_name) if quote_identifiers else field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(current_col_name) }}\n {% else %}\n {{ current_col_name }}\n {% endif %}\n as {{ cast_to }}) as {{ adapter.quote(value_name) if quote_identifiers else value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1786398582.8343544, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8354237, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n select\n {{ select_gb_cols }}\n {{ column_name }},\n lag({{ column_name }}) over (\n {{partition_gb_cols}}\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8372247, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns, exclude_columns, precision)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1786398582.8394072, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n\n{%- if compare_columns and exclude_columns -%}\n {{ exceptions.raise_compiler_error(\"Both a compare and an ignore list were provided to the `equality` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{# Ensure there are no extra columns in the compare_model vs model #}\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- do dbt_utils._is_ephemeral(compare_model, 'test_equality') -%}\n\n {%- set model_columns = adapter.get_columns_in_relation(model) -%}\n {%- set compare_model_columns = adapter.get_columns_in_relation(compare_model) -%}\n\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- set include_model_columns = [] %}\n {%- for column in model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n {%- for column in compare_model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_model_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns_set = set(include_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(include_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- else -%}\n {%- set compare_columns_set = set(model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(compare_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- endif -%}\n\n {% if compare_columns_set != compare_model_columns_set %}\n {{ exceptions.raise_compiler_error(compare_model ~\" has less columns than \" ~ model ~ \", please ensure they have the same columns or use the `compare_columns` or `exclude_columns` arguments to subset them.\") }}\n {% endif %}\n\n\n{% endif %}\n\n{%- if not precision -%}\n {%- if not compare_columns -%}\n {# \n You cannot get the columns in an ephemeral model (due to not existing in the information schema),\n so if the user does not provide an explicit list of columns we must error in the case it is ephemeral\n #}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model)-%}\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- for column in compare_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns = include_columns | map(attribute='quoted') %}\n {%- else -%} {# Compare columns provided #}\n {%- set compare_columns = compare_columns | map(attribute='quoted') %}\n {%- endif -%}\n {%- endif -%}\n\n {% set compare_cols_csv = compare_columns | join(', ') %}\n\n{% else %} {# Precision required #}\n {#-\n If rounding is required, we need to get the types, so it cannot be ephemeral even if they provide column names\n -#}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set columns = adapter.get_columns_in_relation(model) -%}\n\n {% set columns_list = [] %}\n {%- for col in columns -%}\n {%- if (\n (col.name|lower in compare_columns|map('lower') or not compare_columns) and\n (col.name|lower not in exclude_columns|map('lower') or not exclude_columns)\n ) -%}\n {# Databricks double type is not picked up by any number type checks in dbt #}\n {%- if col.is_float() or col.is_numeric() or col.data_type == 'double' -%}\n {# Cast is required due to postgres not having round for a double precision number #}\n {%- do columns_list.append('round(cast(' ~ col.quoted ~ ' as ' ~ dbt.type_numeric() ~ '),' ~ precision ~ ') as ' ~ col.quoted) -%}\n {%- else -%} {# Non-numeric type #}\n {%- do columns_list.append(col.quoted) -%}\n {%- endif -%}\n {% endif %}\n {%- endfor -%}\n\n {% set compare_cols_csv = columns_list | join(', ') %}\n\n{% endif %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_numeric", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1786398582.847097, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8482687, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_a \n from {{ model }}\n {{groupby_gb_cols}}\n\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_b \n from {{ compare_model }}\n {{groupby_gb_cols}}\n\n),\nfinal as (\n\n select\n \n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n\n from a\n full join b\n on\n a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8503718, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1786398582.8510985, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n with\n \n all_values as (\n\n select \n\n\n {% if trim_whitespace == true -%}\n\n trim({{ column_name }}) as {{ column_name }}\n\n {%- else -%}\n\n {{ column_name }}\n\n {%- endif %}\n \n from {{ model }}\n\n ),\n\n errors as (\n\n select * from all_values\n where {{ column_name }} = ''\n\n )\n\n select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1786398582.8517215, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1786398582.8525505, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% do column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1786398582.853795, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786398582.8545108, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1786398582.8552375, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1786398582.8561096, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1786398582.857044, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1786398582.8579626, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1786398582.8586795, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8594706, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8605032, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8615756, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set empty_invocation = flags.EMPTY is defined and flags.EMPTY %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n{%- if not empty_invocation %}\n or most_recent is null\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8634982, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8645847, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_our_model \n from {{ model }}\n {{ groupby_gb_cols }}\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_comparison_model \n from {{ compare_model }}\n {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n select\n\n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_our_model,\n count_comparison_model\n from a\n full join b on \n a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n {{ join_gb_cols }}\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8665903, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1786398582.8681026, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}, {{ upper_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions more cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1786398582.8711126, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1786398582.871877, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1786398582.8725712, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1786398582.8733528, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1786398582.8741097, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8750317, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n {% set pruned_cols = group_by_columns %}\n\n {% if column_name not in pruned_cols %}\n {% do pruned_cols.append(column_name) %}\n {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n with pruned_rows as (\n select\n {{ select_pruned_cols }}\n from {{ model }}\n {% if group_by_columns|length() == 0 %}\n where {{ column_name }} is not null\n limit 1\n {% endif %}\n )\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count({{ column_name }}) as filler_column\n\n from pruned_rows\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.876857, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.877727, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n select\n {{select_gb_cols}}\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as {{ dbt.type_numeric() }}) as not_null_proportion\n from {{ model }}\n {{groupby_gb_cols}}\n),\nvalidation_errors as (\n select\n {{select_gb_cols}}\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1786398582.8793979, "supported_languages": null}, "macro.hubspot.hubspot_lookback": {"name": "hubspot_lookback", "resource_type": "macro", "package_name": "hubspot", "path": "macros/hubspot_lookback.sql", "original_file_path": "macros/hubspot_lookback.sql", "unique_id": "macro.hubspot.hubspot_lookback", "macro_sql": "{% macro hubspot_lookback(from_date, datepart, interval, safety_date='2010-01-01') %}\n\n{{ adapter.dispatch('hubspot_lookback', 'hubspot') (from_date, datepart, interval, safety_date=safety_date) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.hubspot.default__hubspot_lookback"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "safety_date", "type": null, "description": ""}], "created_at": 1786398582.8801959, "supported_languages": null}, "macro.hubspot.default__hubspot_lookback": {"name": "default__hubspot_lookback", "resource_type": "macro", "package_name": "hubspot", "path": "macros/hubspot_lookback.sql", "original_file_path": "macros/hubspot_lookback.sql", "unique_id": "macro.hubspot.default__hubspot_lookback", "macro_sql": "{% macro default__hubspot_lookback(from_date, datepart, interval, safety_date='2010-01-01') %}\n\n {% set sql_statement %}\n select coalesce({{ from_date }}, {{ \"'\" ~ safety_date ~ \"'\" }})\n from {{ this }}\n {%- endset -%}\n\n {%- set result = dbt_utils.get_single_value(sql_statement) %}\n\n {{ dbt.dateadd(datepart=datepart, interval=-interval, from_date_or_timestamp=\"cast('\" ~ result ~ \"' as date)\") }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_single_value", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "safety_date", "type": null, "description": ""}], "created_at": 1786398582.8810565, "supported_languages": null}, "macro.hubspot.merge_contacts": {"name": "merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.merge_contacts", "macro_sql": "{% macro merge_contacts() -%}\n\n{{ adapter.dispatch('merge_contacts', 'hubspot') () }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.hubspot.postgres__merge_contacts"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8817508, "supported_languages": null}, "macro.hubspot.default__merge_contacts": {"name": "default__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.default__merge_contacts", "macro_sql": "{% macro default__merge_contacts() %}\n{# bigquery #}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n\n from contacts\n cross join \n unnest(cast(split(merged_object_ids, \";\") as array)) as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8819482, "supported_languages": null}, "macro.hubspot.snowflake__merge_contacts": {"name": "snowflake__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.snowflake__merge_contacts", "macro_sql": "{% macro snowflake__merge_contacts() %}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges.value as vid_to_merge\n \n from contacts\n cross join \n table(flatten(STRTOK_TO_ARRAY(merged_object_ids, ';'))) as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8821461, "supported_languages": null}, "macro.hubspot.redshift__merge_contacts": {"name": "redshift__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.redshift__merge_contacts", "macro_sql": "{% macro redshift__merge_contacts() %}\n\tselect\n unnest_vid_array.source_relation,\n unnest_vid_array.contact_id,\n cast(vid_to_merge as {{ dbt.type_string() }}) as vid_to_merge\n from (\n select \n contacts.source_relation,\n contacts.contact_id,\n split_to_array(merged_object_ids, ';') as super_merged_object_ids\n from contacts\n ) as unnest_vid_array, unnest_vid_array.super_merged_object_ids as vid_to_merge\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8824222, "supported_languages": null}, "macro.hubspot.postgres__merge_contacts": {"name": "postgres__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.postgres__merge_contacts", "macro_sql": "{% macro postgres__merge_contacts() %}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n\n from contacts\n cross join \n unnest(string_to_array(merged_object_ids, ';')) as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.882601, "supported_languages": null}, "macro.hubspot.spark__merge_contacts": {"name": "spark__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.spark__merge_contacts", "macro_sql": "{% macro spark__merge_contacts() %}\n{# databricks and spark #}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n from contacts\n lateral view explode(split(merged_object_ids, ';')) merges_view as merges\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8827899, "supported_languages": null}, "macro.hubspot.duckdb__merge_contacts": {"name": "duckdb__merge_contacts", "resource_type": "macro", "package_name": "hubspot", "path": "macros/merge_contacts.sql", "original_file_path": "macros/merge_contacts.sql", "unique_id": "macro.hubspot.duckdb__merge_contacts", "macro_sql": "{% macro duckdb__merge_contacts() %}\n select\n contacts.source_relation,\n contacts.contact_id,\n merges as vid_to_merge\n\n from contacts\n cross join\n unnest(string_split(merged_object_ids, ';')) as t(merges)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8829632, "supported_languages": null}, "macro.hubspot.engagements_joined": {"name": "engagements_joined", "resource_type": "macro", "package_name": "hubspot", "path": "macros/engagements_joined.sql", "original_file_path": "macros/engagements_joined.sql", "unique_id": "macro.hubspot.engagements_joined", "macro_sql": "{% macro engagements_joined(base_model) %}\n\nwith base as (\n\n select *\n from {{ base_model }}\n\n), engagements as (\n\n select *\n from {{ ref('hubspot__engagements') }}\n\n), joined as (\n\n select\n {{ dbt_utils.star(from=base_model, relation_alias=\"base\", except=[\"_fivetran_deleted\"]) }},\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_contact_enabled']) %} engagements.contact_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_deal_enabled']) %} engagements.deal_ids, {% endif %}\n {% if fivetran_utils.enabled_vars(['hubspot_engagement_company_enabled']) %} engagements.company_ids, {% endif %}\n not base._fivetran_deleted as is_active\n from base\n left join engagements\n on base.engagement_id = engagements.engagement_id\n and base.source_relation = engagements.source_relation\n\n)\n\nselect *\nfrom joined\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.star", "macro.fivetran_utils.enabled_vars"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_model", "type": null, "description": ""}], "created_at": 1786398582.8843138, "supported_languages": null}, "macro.hubspot.is_incremental_compatible": {"name": "is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.is_incremental_compatible", "macro_sql": "{% macro is_incremental_compatible() -%}\n {{ return(adapter.dispatch('is_incremental_compatible', 'hubspot') ()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.hubspot.postgres__is_incremental_compatible"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8850358, "supported_languages": null}, "macro.hubspot.default__is_incremental_compatible": {"name": "default__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.default__is_incremental_compatible", "macro_sql": "{% macro default__is_incremental_compatible() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.885303, "supported_languages": null}, "macro.hubspot.bigquery__is_incremental_compatible": {"name": "bigquery__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.bigquery__is_incremental_compatible", "macro_sql": "{% macro bigquery__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8855438, "supported_languages": null}, "macro.hubspot.snowflake__is_incremental_compatible": {"name": "snowflake__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.snowflake__is_incremental_compatible", "macro_sql": "{% macro snowflake__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8859012, "supported_languages": null}, "macro.hubspot.postgres__is_incremental_compatible": {"name": "postgres__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.postgres__is_incremental_compatible", "macro_sql": "{% macro postgres__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8861609, "supported_languages": null}, "macro.hubspot.redshift__is_incremental_compatible": {"name": "redshift__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.redshift__is_incremental_compatible", "macro_sql": "{% macro redshift__is_incremental_compatible() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8864017, "supported_languages": null}, "macro.hubspot.databricks__is_incremental_compatible": {"name": "databricks__is_incremental_compatible", "resource_type": "macro", "package_name": "hubspot", "path": "macros/is_incremental_compatible.sql", "original_file_path": "macros/is_incremental_compatible.sql", "unique_id": "macro.hubspot.databricks__is_incremental_compatible", "macro_sql": "{% macro databricks__is_incremental_compatible() %}\n {% set re = modules.re %}\n {% set path_match = target.http_path %}\n {% set regex_pattern = \"sql/protocol\" %}\n {% set match_result = re.search(regex_pattern, path_match) %}\n {% if match_result %}\n {{ return(True) }}\n {% else %}\n {{ return(False) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8872778, "supported_languages": null}, "macro.hubspot.engagements_aggregated": {"name": "engagements_aggregated", "resource_type": "macro", "package_name": "hubspot", "path": "macros/engagements_aggregated.sql", "original_file_path": "macros/engagements_aggregated.sql", "unique_id": "macro.hubspot.engagements_aggregated", "macro_sql": "{% macro engagements_aggregated(from_ref, primary_key) %}\n\n select\n source_relation,\n {{ primary_key }},\n count(case when engagement_type = 'NOTE' then {{ primary_key }} end) as count_engagement_notes,\n count(case when engagement_type = 'TASK' then {{ primary_key }} end) as count_engagement_tasks,\n count(case when engagement_type = 'CALL' then {{ primary_key }} end) as count_engagement_calls,\n count(case when engagement_type = 'MEETING' then {{ primary_key }} end) as count_engagement_meetings,\n count(case when engagement_type = 'EMAIL' then {{ primary_key }} end) as count_engagement_emails,\n count(case when engagement_type = 'INCOMING_EMAIL' then {{ primary_key }} end) as count_engagement_incoming_emails,\n count(case when engagement_type = 'FORWARDED_EMAIL' then {{ primary_key }} end) as count_engagement_forwarded_emails\n from {{ from_ref }}\n group by 1,2\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_ref", "type": null, "description": ""}, {"name": "primary_key", "type": null, "description": ""}], "created_at": 1786398582.8881953, "supported_languages": null}, "macro.hubspot.engagement_metrics": {"name": "engagement_metrics", "resource_type": "macro", "package_name": "hubspot", "path": "macros/engagements_aggregated.sql", "original_file_path": "macros/engagements_aggregated.sql", "unique_id": "macro.hubspot.engagement_metrics", "macro_sql": "{% macro engagement_metrics() %}\n\n{% set metrics = [\n 'count_engagement_notes',\n 'count_engagement_tasks',\n 'count_engagement_calls',\n 'count_engagement_meetings',\n 'count_engagement_emails',\n 'count_engagement_incoming_emails',\n 'count_engagement_forwarded_emails'\n] %}\n\n{{ return(metrics) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8887014, "supported_languages": null}, "macro.hubspot.adjust_email_metrics": {"name": "adjust_email_metrics", "resource_type": "macro", "package_name": "hubspot", "path": "macros/adjust_email_metrics.sql", "original_file_path": "macros/adjust_email_metrics.sql", "unique_id": "macro.hubspot.adjust_email_metrics", "macro_sql": "{% macro adjust_email_metrics(base_ref, var_name) %}\n\n{% set base_cols = dbt_utils.get_filtered_columns_in_relation(ref(base_ref))|map('lower') %}\n\n{% set default_metrics = ['bounces', 'clicks', 'deferrals', 'deliveries', 'drops', 'forwards', 'opens', 'prints', 'spam_reports', 'unsubscribes'] %}\n{% set email_metrics = var(var_name, default_metrics)|map('lower') %}\n\n{# Only keep metrics found in the base ref #}\n{% set adjusted_cols = email_metrics|select('in', base_cols)|list %}\n\n{{ return(adjusted_cols) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_ref", "type": null, "description": ""}, {"name": "var_name", "type": null, "description": ""}], "created_at": 1786398582.8900976, "supported_languages": null}, "macro.hubspot.email_events_joined": {"name": "email_events_joined", "resource_type": "macro", "package_name": "hubspot", "path": "macros/email_events_joined.sql", "original_file_path": "macros/email_events_joined.sql", "unique_id": "macro.hubspot.email_events_joined", "macro_sql": "{% macro email_events_joined(base_model) %}\n\nwith base as (\n\n select *\n from {{ base_model }}\n\n), events as (\n\n select *\n from {{ ref('stg_hubspot__email_event') }}\n\n{% if var('hubspot_contact_enabled', true) %}\n), contacts as (\n\n select *\n from {{ ref('int_hubspot__contact_merge_adjust') }} \n{% endif %}\n\n), events_joined as (\n\n select \n base.*,\n events.created_timestamp,\n events.email_campaign_id,\n events.recipient_email_address,\n events.sent_timestamp as email_send_timestamp,\n events.sent_by_event_id as email_send_id\n from base\n left join events\n on base.event_id = events.event_id\n and base.source_relation = events.source_relation\n\n{% if var('hubspot_contact_enabled', true) %}\n), contacts_joined as (\n\n select \n events_joined.*,\n contacts.contact_id,\n coalesce(contacts.is_contact_deleted, false) as is_contact_deleted\n from events_joined\n left join contacts\n on events_joined.recipient_email_address = contacts.email\n and events_joined.source_relation = contacts.source_relation\n\n)\n\nselect *\nfrom contacts_joined\n\n{% else %}\n)\n\nselect *\nfrom events_joined\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_model", "type": null, "description": ""}], "created_at": 1786398582.8911974, "supported_languages": null}, "macro.hubspot.get_engagement_note_columns": {"name": "get_engagement_note_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_note_columns.sql", "original_file_path": "macros/staging/get_engagement_note_columns.sql", "unique_id": "macro.hubspot.get_engagement_note_columns", "macro_sql": "{% macro get_engagement_note_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"body\", \"datatype\": dbt.type_string(), \"alias\": \"note\"},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8935318, "supported_languages": null}, "macro.hubspot.get_email_event_click_columns": {"name": "get_email_event_click_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_click_columns.sql", "original_file_path": "macros/staging/get_email_event_click_columns.sql", "unique_id": "macro.hubspot.get_email_event_click_columns", "macro_sql": "{% macro get_email_event_click_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"referer\", \"datatype\": dbt.type_string()},\n {\"name\": \"url\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8953254, "supported_languages": null}, "macro.hubspot.get_email_event_open_columns": {"name": "get_email_event_open_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_open_columns.sql", "original_file_path": "macros/staging/get_email_event_open_columns.sql", "unique_id": "macro.hubspot.get_email_event_open_columns", "macro_sql": "{% macro get_email_event_open_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"duration\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.896924, "supported_languages": null}, "macro.hubspot.get_company_list_member_columns": {"name": "get_company_list_member_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_list_member_columns.sql", "original_file_path": "macros/staging/get_company_list_member_columns.sql", "unique_id": "macro.hubspot.get_company_list_member_columns", "macro_sql": "{% macro get_company_list_member_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"added_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"company_list_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.8981912, "supported_languages": null}, "macro.hubspot.get_marketing_event_participant_columns": {"name": "get_marketing_event_participant_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_participant_columns.sql", "original_file_path": "macros/staging/get_marketing_event_participant_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_participant_columns", "macro_sql": "{% macro get_marketing_event_participant_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"marketing_event_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"properties_occurred_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"properties_attendance_percentage\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"properties_attendance_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"properties_attendance_duration_seconds\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.900144, "supported_languages": null}, "macro.hubspot.get_deal_pipeline_columns": {"name": "get_deal_pipeline_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_pipeline_columns.sql", "original_file_path": "macros/staging/get_deal_pipeline_columns.sql", "unique_id": "macro.hubspot.get_deal_pipeline_columns", "macro_sql": "{% macro get_deal_pipeline_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.901896, "supported_languages": null}, "macro.hubspot.get_engagement_contact_columns": {"name": "get_engagement_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_contact_columns.sql", "original_file_path": "macros/staging/get_engagement_contact_columns.sql", "unique_id": "macro.hubspot.get_engagement_contact_columns", "macro_sql": "{% macro get_engagement_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9029937, "supported_languages": null}, "macro.hubspot.get_email_event_spam_report_columns": {"name": "get_email_event_spam_report_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_spam_report_columns.sql", "original_file_path": "macros/staging/get_email_event_spam_report_columns.sql", "unique_id": "macro.hubspot.get_email_event_spam_report_columns", "macro_sql": "{% macro get_email_event_spam_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9042134, "supported_languages": null}, "macro.hubspot.get_ticket_engagement_columns": {"name": "get_ticket_engagement_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_engagement_columns.sql", "original_file_path": "macros/staging/get_ticket_engagement_columns.sql", "unique_id": "macro.hubspot.get_ticket_engagement_columns", "macro_sql": "{% macro get_ticket_engagement_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9053118, "supported_languages": null}, "macro.hubspot.get_role_columns": {"name": "get_role_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_role_columns.sql", "original_file_path": "macros/staging/get_role_columns.sql", "unique_id": "macro.hubspot.get_role_columns", "macro_sql": "{% macro get_role_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"requires_billing_write\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9065635, "supported_languages": null}, "macro.hubspot.get_company_columns": {"name": "get_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_columns.sql", "original_file_path": "macros/staging/get_company_columns.sql", "unique_id": "macro.hubspot.get_company_columns", "macro_sql": "{% macro get_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"company_id\"},\n {\"name\": \"is_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"is_company_deleted\"},\n {\"name\": \"property_name\", \"datatype\": dbt.type_string(), \"alias\": \"company_name\"},\n {\"name\": \"property_description\", \"datatype\": dbt.type_string(), \"alias\": \"description\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"},\n {\"name\": \"property_industry\", \"datatype\": dbt.type_string(), \"alias\": \"industry\"},\n {\"name\": \"property_address\", \"datatype\": dbt.type_string(), \"alias\": \"street_address\"},\n {\"name\": \"property_address_2\", \"datatype\": dbt.type_string(), \"alias\": \"street_address_2\"},\n {\"name\": \"property_city\", \"datatype\": dbt.type_string(), \"alias\": \"city\"},\n {\"name\": \"property_state\", \"datatype\": dbt.type_string(), \"alias\": \"state\"},\n {\"name\": \"property_country\", \"datatype\": dbt.type_string(), \"alias\": \"country\"},\n {\"name\": \"property_annualrevenue\", \"datatype\": dbt.type_int(), \"alias\": \"company_annual_revenue\"}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__company_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9102423, "supported_languages": null}, "macro.hubspot.get_email_event_forward_columns": {"name": "get_email_event_forward_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_forward_columns.sql", "original_file_path": "macros/staging/get_email_event_forward_columns.sql", "unique_id": "macro.hubspot.get_email_event_forward_columns", "macro_sql": "{% macro get_email_event_forward_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9116993, "supported_languages": null}, "macro.hubspot.get_email_event_bounce_columns": {"name": "get_email_event_bounce_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_bounce_columns.sql", "original_file_path": "macros/staging/get_email_event_bounce_columns.sql", "unique_id": "macro.hubspot.get_email_event_bounce_columns", "macro_sql": "{% macro get_email_event_bounce_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"response\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9129791, "supported_languages": null}, "macro.hubspot.get_conversation_message_recipient_columns": {"name": "get_conversation_message_recipient_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_message_recipient_columns.sql", "original_file_path": "macros/staging/get_conversation_message_recipient_columns.sql", "unique_id": "macro.hubspot.get_conversation_message_recipient_columns", "macro_sql": "{% macro get_conversation_message_recipient_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"actor_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"message_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"thread_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"recipient_field\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9149084, "supported_languages": null}, "macro.hubspot.get_conversation_inbox_columns": {"name": "get_conversation_inbox_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_inbox_columns.sql", "original_file_path": "macros/staging/get_conversation_inbox_columns.sql", "unique_id": "macro.hubspot.get_conversation_inbox_columns", "macro_sql": "{% macro get_conversation_inbox_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9166794, "supported_languages": null}, "macro.hubspot.get_email_event_dropped_columns": {"name": "get_email_event_dropped_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_dropped_columns.sql", "original_file_path": "macros/staging/get_email_event_dropped_columns.sql", "unique_id": "macro.hubspot.get_email_event_dropped_columns", "macro_sql": "{% macro get_email_event_dropped_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bcc\", \"datatype\": dbt.type_string()},\n {\"name\": \"cc\", \"datatype\": dbt.type_string()},\n {\"name\": \"drop_message\", \"datatype\": dbt.type_string()},\n {\"name\": \"drop_reason\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"reply_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) %}\n {{ columns.append({\"name\": \"FROM\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% else %}\n {{ columns.append({\"name\": \"from\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9194875, "supported_languages": null}, "macro.hubspot.get_engagement_deal_columns": {"name": "get_engagement_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_deal_columns.sql", "original_file_path": "macros/staging/get_engagement_deal_columns.sql", "unique_id": "macro.hubspot.get_engagement_deal_columns", "macro_sql": "{% macro get_engagement_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9206088, "supported_languages": null}, "macro.hubspot.get_ticket_columns": {"name": "get_ticket_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_columns.sql", "original_file_path": "macros/staging/get_ticket_columns.sql", "unique_id": "macro.hubspot.get_ticket_columns", "macro_sql": "{% macro get_ticket_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"ticket_id\"},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"_fivetran_ticket_deleted\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\", \"alias\": \"is_ticket_deleted\"},\n {\"name\": \"property_closed_date\", \"datatype\": dbt.type_timestamp(), \"alias\": \"closed_date\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"},\n {\"name\": \"property_first_agent_reply_date\", \"datatype\": dbt.type_timestamp(), \"alias\": \"first_agent_reply_at\"},\n {\"name\": \"property_hs_pipeline\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_pipeline_id\"},\n {\"name\": \"property_hs_pipeline_stage\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_pipeline_stage_id\"},\n {\"name\": \"property_hs_ticket_category\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_category\"},\n {\"name\": \"property_hs_ticket_priority\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_priority\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_subject\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_subject\"},\n {\"name\": \"property_content\", \"datatype\": dbt.type_string(), \"alias\": \"ticket_content\"} \n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__ticket_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9244688, "supported_languages": null}, "macro.hubspot.get_email_event_delivered_columns": {"name": "get_email_event_delivered_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_delivered_columns.sql", "original_file_path": "macros/staging/get_email_event_delivered_columns.sql", "unique_id": "macro.hubspot.get_email_event_delivered_columns", "macro_sql": "{% macro get_email_event_delivered_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"response\", \"datatype\": dbt.type_string()},\n {\"name\": \"smtp_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.925603, "supported_languages": null}, "macro.hubspot.get_engagement_company_columns": {"name": "get_engagement_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_company_columns.sql", "original_file_path": "macros/staging/get_engagement_company_columns.sql", "unique_id": "macro.hubspot.get_engagement_company_columns", "macro_sql": "{% macro get_engagement_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.926717, "supported_languages": null}, "macro.hubspot.get_property_columns": {"name": "get_property_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_property_columns.sql", "original_file_path": "macros/staging/get_property_columns.sql", "unique_id": "macro.hubspot.get_property_columns", "macro_sql": "{% macro get_property_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"calculated\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"field_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"hubspot_defined\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"hubspot_object\", \"datatype\": dbt.type_string()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"show_currency_symbol\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9294968, "supported_languages": null}, "macro.hubspot.get_ticket_contact_columns": {"name": "get_ticket_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_contact_columns.sql", "original_file_path": "macros/staging/get_ticket_contact_columns.sql", "unique_id": "macro.hubspot.get_ticket_contact_columns", "macro_sql": "{% macro get_ticket_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9306178, "supported_languages": null}, "macro.hubspot.get_email_event_print_columns": {"name": "get_email_event_print_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_print_columns.sql", "original_file_path": "macros/staging/get_email_event_print_columns.sql", "unique_id": "macro.hubspot.get_email_event_print_columns", "macro_sql": "{% macro get_email_event_print_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"browser\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_agent\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9320478, "supported_languages": null}, "macro.hubspot.get_contact_columns": {"name": "get_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_columns.sql", "original_file_path": "macros/staging/get_contact_columns.sql", "unique_id": "macro.hubspot.get_contact_columns", "macro_sql": "{% macro get_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"is_contact_deleted\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"contact_id\"},\n {\"name\": \"property_hs_merged_object_ids\", \"datatype\": dbt.type_string(), \"alias\": \"merged_object_ids\"},\n {\"name\": \"property_email\", \"datatype\": dbt.type_string(), \"alias\": \"email\"},\n {\"name\": \"property_company\", \"datatype\": dbt.type_string(), \"alias\": \"contact_company\"},\n {\"name\": \"property_firstname\", \"datatype\": dbt.type_string(), \"alias\": \"first_name\"},\n {\"name\": \"property_lastname\", \"datatype\": dbt.type_string(), \"alias\": \"last_name\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"},\n {\"name\": \"property_jobtitle\", \"datatype\": dbt.type_string(), \"alias\": \"job_title\"},\n {\"name\": \"property_annualrevenue\", \"datatype\": dbt.type_int(), \"alias\": \"company_annual_revenue\"}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__contact_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_boolean", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9351022, "supported_languages": null}, "macro.hubspot.get_contact_merge_audit_columns": {"name": "get_contact_merge_audit_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_merge_audit_columns.sql", "original_file_path": "macros/staging/get_contact_merge_audit_columns.sql", "unique_id": "macro.hubspot.get_contact_merge_audit_columns", "macro_sql": "{% macro get_contact_merge_audit_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"canonical_vid\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"entity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"num_properties_moved\", \"datatype\": dbt.type_int()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"vid_to_merge\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.937217, "supported_languages": null}, "macro.hubspot.get_email_event_columns": {"name": "get_email_event_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_columns.sql", "original_file_path": "macros/staging/get_email_event_columns.sql", "unique_id": "macro.hubspot.get_email_event_columns", "macro_sql": "{% macro get_email_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"app_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"caused_by_created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"caused_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email_campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"filtered_event\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"obsoleted_by_created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"obsoleted_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"recipient\", \"datatype\": dbt.type_string()},\n {\"name\": \"sent_by_created\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"sent_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9402435, "supported_languages": null}, "macro.hubspot.get_deal_stage_columns": {"name": "get_deal_stage_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_stage_columns.sql", "original_file_path": "macros/staging/get_deal_stage_columns.sql", "unique_id": "macro.hubspot.get_deal_stage_columns", "macro_sql": "{% macro get_deal_stage_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"date_entered\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9421954, "supported_languages": null}, "macro.hubspot.get_conversation_channel_columns": {"name": "get_conversation_channel_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_channel_columns.sql", "original_file_path": "macros/staging/get_conversation_channel_columns.sql", "unique_id": "macro.hubspot.get_conversation_channel_columns", "macro_sql": "{% macro get_conversation_channel_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.94331, "supported_languages": null}, "macro.hubspot.get_deal_pipeline_stage_columns": {"name": "get_deal_pipeline_stage_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_pipeline_stage_columns.sql", "original_file_path": "macros/staging/get_deal_pipeline_stage_columns.sql", "unique_id": "macro.hubspot.get_deal_pipeline_stage_columns", "macro_sql": "{% macro get_deal_pipeline_stage_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"closed_won\", \"datatype\": \"boolean\"},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"probability\", \"datatype\": dbt.type_float()},\n {\"name\": \"stage_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.945646, "supported_languages": null}, "macro.hubspot.get_conversation_actor_columns": {"name": "get_conversation_actor_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_actor_columns.sql", "original_file_path": "macros/staging/get_conversation_actor_columns.sql", "unique_id": "macro.hubspot.get_conversation_actor_columns", "macro_sql": "{% macro get_conversation_actor_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"avatar\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9470937, "supported_languages": null}, "macro.hubspot.get_company_list_columns": {"name": "get_company_list_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_list_columns.sql", "original_file_path": "macros/staging/get_company_list_columns.sql", "unique_id": "macro.hubspot.get_company_list_columns", "macro_sql": "{% macro get_company_list_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\", \"alias\": \"is_company_list_deleted\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"company_list_id\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string(), \"alias\": \"company_list_name\"},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"filters_updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_version\", \"datatype\": dbt.type_int()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__company_list_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9501574, "supported_languages": null}, "macro.hubspot.get_ticket_property_history_columns": {"name": "get_ticket_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_property_history_columns.sql", "original_file_path": "macros/staging/get_ticket_property_history_columns.sql", "unique_id": "macro.hubspot.get_ticket_property_history_columns", "macro_sql": "{% macro get_ticket_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string(), \"alias\": \"field_name\"},\n {\"name\": \"source\", \"datatype\": dbt.type_string(), \"alias\": \"change_source\"},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string(), \"alias\": \"change_source_id\"},\n {\"name\": \"timestamp_instant\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string(), \"alias\": \"new_value\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9524674, "supported_languages": null}, "macro.hubspot.get_marketing_event_list_columns": {"name": "get_marketing_event_list_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_list_columns.sql", "original_file_path": "macros/staging/get_marketing_event_list_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_list_columns", "macro_sql": "{% macro get_marketing_event_list_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"marketing_event_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"filters_updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"processing_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"deleted_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_version\", \"datatype\": dbt.type_int()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"size\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.955275, "supported_languages": null}, "macro.hubspot.get_engagement_email_columns": {"name": "get_engagement_email_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_email_columns.sql", "original_file_path": "macros/staging/get_engagement_email_columns.sql", "unique_id": "macro.hubspot.get_engagement_email_columns", "macro_sql": "{% macro get_engagement_email_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9573913, "supported_languages": null}, "macro.hubspot.get_ticket_pipeline_columns": {"name": "get_ticket_pipeline_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_pipeline_columns.sql", "original_file_path": "macros/staging/get_ticket_pipeline_columns.sql", "unique_id": "macro.hubspot.get_ticket_pipeline_columns", "macro_sql": "{% macro get_ticket_pipeline_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9593174, "supported_languages": null}, "macro.hubspot.get_email_campaign_columns": {"name": "get_email_campaign_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_campaign_columns.sql", "original_file_path": "macros/staging/get_email_campaign_columns.sql", "unique_id": "macro.hubspot.get_email_campaign_columns", "macro_sql": "{% macro get_email_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"app_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"app_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"content_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"num_included\", \"datatype\": dbt.type_int()},\n {\"name\": \"num_queued\", \"datatype\": dbt.type_int()},\n {\"name\": \"sub_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9615815, "supported_languages": null}, "macro.hubspot.get_macro_columns": {"name": "get_macro_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_macro_columns.sql", "original_file_path": "macros/staging/get_macro_columns.sql", "unique_id": "macro.hubspot.get_macro_columns", "macro_sql": "{%- macro get_macro_columns(get_column_macro) -%}\n\n {%- set macro_column_names = [] -%}\n {%- for col in get_column_macro -%}\n {%- do macro_column_names.append(col.name | upper if target.type == 'snowflake' else col.name) -%}\n {%- endfor -%}\n\n{{ return(macro_column_names) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "get_column_macro", "type": null, "description": ""}], "created_at": 1786398582.9624155, "supported_languages": null}, "macro.hubspot.get_deal_company_columns": {"name": "get_deal_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_company_columns.sql", "original_file_path": "macros/staging/get_deal_company_columns.sql", "unique_id": "macro.hubspot.get_deal_company_columns", "macro_sql": "{% macro get_deal_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9636948, "supported_languages": null}, "macro.hubspot.get_conversation_channel_account_columns": {"name": "get_conversation_channel_account_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_channel_account_columns.sql", "original_file_path": "macros/staging/get_conversation_channel_account_columns.sql", "unique_id": "macro.hubspot.get_conversation_channel_account_columns", "macro_sql": "{% macro get_conversation_channel_account_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"authorized\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"delivery_identifier_value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9659712, "supported_languages": null}, "macro.hubspot.get_form_columns": {"name": "get_form_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_form_columns.sql", "original_file_path": "macros/staging/get_form_columns.sql", "unique_id": "macro.hubspot.get_form_columns", "macro_sql": "{% macro get_form_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"guid\", \"datatype\": dbt.type_string()},\n {\"name\": \"action\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"css_class\", \"datatype\": dbt.type_string()},\n {\"name\": \"follow_up_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"form_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"lead_nurturing_campaign_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"method\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"notify_recipients\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"redirect\", \"datatype\": dbt.type_string()},\n {\"name\": \"submit_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_bigint", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.969194, "supported_languages": null}, "macro.hubspot.get_owner_columns": {"name": "get_owner_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_owner_columns.sql", "original_file_path": "macros/staging/get_owner_columns.sql", "unique_id": "macro.hubspot.get_owner_columns", "macro_sql": "{% macro get_owner_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active_user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9713094, "supported_languages": null}, "macro.hubspot.hubspot_add_pass_through_columns": {"name": "hubspot_add_pass_through_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/hubspot_add_pass_through_columns.sql", "original_file_path": "macros/staging/hubspot_add_pass_through_columns.sql", "unique_id": "macro.hubspot.hubspot_add_pass_through_columns", "macro_sql": "{% macro hubspot_add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"quote\": True, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"quote\": True, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"quote\": True, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_var", "type": null, "description": ""}], "created_at": 1786398582.9733927, "supported_languages": null}, "macro.hubspot.get_company_property_history_columns": {"name": "get_company_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_company_property_history_columns.sql", "original_file_path": "macros/staging/get_company_property_history_columns.sql", "unique_id": "macro.hubspot.get_company_property_history_columns", "macro_sql": "{% macro get_company_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9756057, "supported_languages": null}, "macro.hubspot.get_email_event_status_change_columns": {"name": "get_email_event_status_change_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_status_change_columns.sql", "original_file_path": "macros/staging/get_email_event_status_change_columns.sql", "unique_id": "macro.hubspot.get_email_event_status_change_columns", "macro_sql": "{% macro get_email_event_status_change_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bounced\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"portal_subscription_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"requested_by\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"subscriptions\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9772053, "supported_languages": null}, "macro.hubspot.all_passthrough_column_check": {"name": "all_passthrough_column_check", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/all_passthrough_column_check.sql", "original_file_path": "macros/staging/all_passthrough_column_check.sql", "unique_id": "macro.hubspot.all_passthrough_column_check", "macro_sql": "{% macro all_passthrough_column_check(relation, get_columns) %}\n\n{% set available_passthrough_columns = fivetran_utils.remove_prefix_from_columns(\n columns=adapter.get_columns_in_relation(ref(relation)), \n prefix='property_', exclude=get_macro_columns(get_columns)) \n %}\n\n{{ return(available_passthrough_columns|length) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.remove_prefix_from_columns", "macro.hubspot.get_macro_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "get_columns", "type": null, "description": ""}], "created_at": 1786398582.9779453, "supported_languages": null}, "macro.hubspot.get_conversation_message_history_columns": {"name": "get_conversation_message_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_message_history_columns.sql", "original_file_path": "macros/staging/get_conversation_message_history_columns.sql", "unique_id": "macro.hubspot.get_conversation_message_history_columns", "macro_sql": "{% macro get_conversation_message_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"thread_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"channel_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"from_inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"to_inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"assigned_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"assigned_from\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_by\", \"datatype\": dbt.type_string()},\n {\"name\": \"direction\", \"datatype\": dbt.type_string()},\n {\"name\": \"in_reply_to_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"rich_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"text\", \"datatype\": dbt.type_string()},\n {\"name\": \"truncation_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"client_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status_type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.98286, "supported_languages": null}, "macro.hubspot.get_contact_list_columns": {"name": "get_contact_list_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_list_columns.sql", "original_file_path": "macros/staging/get_contact_list_columns.sql", "unique_id": "macro.hubspot.get_contact_list_columns", "macro_sql": "{% macro get_contact_list_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\", \"alias\": \"is_contact_list_deleted\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int(), \"alias\": \"contact_list_id\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string(), \"alias\": \"contact_list_name\"},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp(), \"alias\": \"updated_timestamp\"},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"filters_updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_version\", \"datatype\": dbt.type_int()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"processing_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"deleteable\", \"datatype\": \"boolean\"},\n {\"name\": \"dynamic\", \"datatype\": \"boolean\"},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"metadata_error\", \"datatype\": dbt.type_string()},\n {\"name\": \"metadata_last_processing_state_change_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"metadata_last_size_change_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"metadata_processing\", \"datatype\": dbt.type_string()},\n {\"name\": \"metadata_size\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__contact_list_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.987074, "supported_languages": null}, "macro.hubspot.get_owner_team_columns": {"name": "get_owner_team_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_owner_team_columns.sql", "original_file_path": "macros/staging/get_owner_team_columns.sql", "unique_id": "macro.hubspot.get_owner_team_columns", "macro_sql": "{% macro get_owner_team_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"team_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_team_primary\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.988376, "supported_languages": null}, "macro.hubspot.get_engagement_call_columns": {"name": "get_engagement_call_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_call_columns.sql", "original_file_path": "macros/staging/get_engagement_call_columns.sql", "unique_id": "macro.hubspot.get_engagement_call_columns", "macro_sql": "{% macro get_engagement_call_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.990466, "supported_languages": null}, "macro.hubspot.get_email_event_deferred_columns": {"name": "get_email_event_deferred_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_deferred_columns.sql", "original_file_path": "macros/staging/get_email_event_deferred_columns.sql", "unique_id": "macro.hubspot.get_email_event_deferred_columns", "macro_sql": "{% macro get_email_event_deferred_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"attempt\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"response\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9915752, "supported_languages": null}, "macro.hubspot.get_users_columns": {"name": "get_users_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_users_columns.sql", "original_file_path": "macros/staging/get_users_columns.sql", "unique_id": "macro.hubspot.get_users_columns", "macro_sql": "{% macro get_users_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"primary_team_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"role_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9933443, "supported_languages": null}, "macro.hubspot.get_email_event_sent_columns": {"name": "get_email_event_sent_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_email_event_sent_columns.sql", "original_file_path": "macros/staging/get_email_event_sent_columns.sql", "unique_id": "macro.hubspot.get_email_event_sent_columns", "macro_sql": "{% macro get_email_event_sent_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bcc\", \"datatype\": dbt.type_string()},\n {\"name\": \"cc\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"reply_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()}\n] %}\n\n{% if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) %}\n {{ columns.append({\"name\": \"FROM\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% else %}\n {{ columns.append({\"name\": \"from\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"from_email\"}) }}\n{% endif %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.995819, "supported_languages": null}, "macro.hubspot.get_marketing_event_columns": {"name": "get_marketing_event_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_columns.sql", "original_file_path": "macros/staging/get_marketing_event_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_columns", "macro_sql": "{% macro get_marketing_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"app_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"app_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"attendees\", \"datatype\": dbt.type_int()},\n {\"name\": \"cancellations\", \"datatype\": dbt.type_int()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"event_cancelled\", \"datatype\": \"boolean\"},\n {\"name\": \"event_completed\", \"datatype\": \"boolean\"},\n {\"name\": \"event_description\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_organizer\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"event_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"external_event_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"no_shows\", \"datatype\": dbt.type_int()},\n {\"name\": \"registrants\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398582.9998572, "supported_languages": null}, "macro.hubspot.get_deal_contact_columns": {"name": "get_deal_contact_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_contact_columns.sql", "original_file_path": "macros/staging/get_deal_contact_columns.sql", "unique_id": "macro.hubspot.get_deal_contact_columns", "macro_sql": "{% macro get_deal_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.001155, "supported_languages": null}, "macro.hubspot.get_contact_form_submission_columns": {"name": "get_contact_form_submission_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_form_submission_columns.sql", "original_file_path": "macros/staging/get_contact_form_submission_columns.sql", "unique_id": "macro.hubspot.get_contact_form_submission_columns", "macro_sql": "{% macro get_contact_form_submission_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"form_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"conversion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"page_id\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_bigint", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.003064, "supported_languages": null}, "macro.hubspot.get_engagement_communication_columns": {"name": "get_engagement_communication_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_commmunication_columns.sql", "original_file_path": "macros/staging/get_engagement_commmunication_columns.sql", "unique_id": "macro.hubspot.get_engagement_communication_columns", "macro_sql": "{% macro get_engagement_communication_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0051572, "supported_languages": null}, "macro.hubspot.remove_duplicate_and_prefix_from_columns": {"name": "remove_duplicate_and_prefix_from_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/remove_duplicate_and_prefix_from_columns.sql", "original_file_path": "macros/staging/remove_duplicate_and_prefix_from_columns.sql", "unique_id": "macro.hubspot.remove_duplicate_and_prefix_from_columns", "macro_sql": "{% macro remove_duplicate_and_prefix_from_columns(columns, prefix='', exclude=[]) %}\n \n {# Loop once to find duplicates #}\n {%- set duplicate_exclude = [] -%}\n {% for col in columns if col.name not in exclude %}\n {%- for dupe in columns if col.name[prefix|length:]|lower == dupe.name|lower -%}\n {%- do duplicate_exclude.append(col.name) -%}\n {%- do duplicate_exclude.append(dupe.name) -%}\n , {{ adapter.quote(col.name) }} as {{ dbt_utils.slugify(col.name[prefix|length:]) }}\n {%- endfor %}\n {% endfor %}\n\n {# Loop again to find non-duplicates #}\n {% for col in columns if col.name not in exclude %}\n {%- if col.name|lower not in duplicate_exclude|lower -%}\n {% if col.name[:prefix|length]|lower == prefix %}\n , {{ adapter.quote(col.name) }} as {{ dbt_utils.slugify(col.name[prefix|length:]) }}\n {%- else %}\n , {{ adapter.quote(col.name) }}\n {%- endif -%}\n {%- endif -%}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}], "created_at": 1786398583.0078099, "supported_languages": null}, "macro.hubspot.get_submission_response_columns": {"name": "get_submission_response_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_submission_response_columns.sql", "original_file_path": "macros/staging/get_submission_response_columns.sql", "unique_id": "macro.hubspot.get_submission_response_columns", "macro_sql": "{% macro get_submission_response_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"conversion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"form_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"field_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"field_value\", \"datatype\": dbt.type_string()},\n {\"name\": \"submitted_at\", \"datatype\": dbt.type_bigint()},\n {\"name\": \"page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_type_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0096166, "supported_languages": null}, "macro.hubspot.get_property_option_columns": {"name": "get_property_option_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_property_option_columns.sql", "original_file_path": "macros/staging/get_property_option_columns.sql", "unique_id": "macro.hubspot.get_property_option_columns", "macro_sql": "{% macro get_property_option_columns() %}\n\n{% set columns = [\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"property_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"hidden\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()},\n {\"name\": \"hubspot_object\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0113873, "supported_languages": null}, "macro.hubspot.get_contact_list_member_columns": {"name": "get_contact_list_member_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_list_member_columns.sql", "original_file_path": "macros/staging/get_contact_list_member_columns.sql", "unique_id": "macro.hubspot.get_contact_list_member_columns", "macro_sql": "{% macro get_contact_list_member_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"added_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"contact_list_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0126271, "supported_languages": null}, "macro.hubspot.get_deal_property_history_columns": {"name": "get_deal_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_property_history_columns.sql", "original_file_path": "macros/staging/get_deal_property_history_columns.sql", "unique_id": "macro.hubspot.get_deal_property_history_columns", "macro_sql": "{% macro get_deal_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0147417, "supported_languages": null}, "macro.hubspot.get_ticket_pipeline_stage_columns": {"name": "get_ticket_pipeline_stage_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_pipeline_stage_columns.sql", "original_file_path": "macros/staging/get_ticket_pipeline_stage_columns.sql", "unique_id": "macro.hubspot.get_ticket_pipeline_stage_columns", "macro_sql": "{% macro get_ticket_pipeline_stage_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"active\", \"datatype\": \"boolean\"},\n {\"name\": \"display_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"label\", \"datatype\": dbt.type_string()},\n {\"name\": \"pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"stage_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ticket_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0169356, "supported_languages": null}, "macro.hubspot.get_ticket_company_columns": {"name": "get_ticket_company_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_company_columns.sql", "original_file_path": "macros/staging/get_ticket_company_columns.sql", "unique_id": "macro.hubspot.get_ticket_company_columns", "macro_sql": "{% macro get_ticket_company_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"company_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0180428, "supported_languages": null}, "macro.hubspot.get_team_columns": {"name": "get_team_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_team_columns.sql", "original_file_path": "macros/staging/get_team_columns.sql", "unique_id": "macro.hubspot.get_team_columns", "macro_sql": "{% macro get_team_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0192194, "supported_languages": null}, "macro.hubspot.get_engagement_meeting_columns": {"name": "get_engagement_meeting_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_meeting_columns.sql", "original_file_path": "macros/staging/get_engagement_meeting_columns.sql", "unique_id": "macro.hubspot.get_engagement_meeting_columns", "macro_sql": "{% macro get_engagement_meeting_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0213208, "supported_languages": null}, "macro.hubspot.get_marketing_event_custom_property_columns": {"name": "get_marketing_event_custom_property_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_marketing_event_custom_property_columns.sql", "original_file_path": "macros/staging/get_marketing_event_custom_property_columns.sql", "unique_id": "macro.hubspot.get_marketing_event_custom_property_columns", "macro_sql": "{% macro get_marketing_event_custom_property_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"marketing_event_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0224528, "supported_languages": null}, "macro.hubspot.get_ticket_deal_columns": {"name": "get_ticket_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_ticket_deal_columns.sql", "original_file_path": "macros/staging/get_ticket_deal_columns.sql", "unique_id": "macro.hubspot.get_ticket_deal_columns", "macro_sql": "{% macro get_ticket_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ticket_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"category\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.023551, "supported_languages": null}, "macro.hubspot.add_property_labels": {"name": "add_property_labels", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/add_property_labels.sql", "original_file_path": "macros/staging/add_property_labels.sql", "unique_id": "macro.hubspot.add_property_labels", "macro_sql": "{% macro add_property_labels(passthrough_var_name, cte_name) %}\n\nselect {{ cte_name }}.*\n\n{% if var(passthrough_var_name, []) != [] and var('hubspot_property_enabled', True) %}\n {% set source_name = passthrough_var_name.replace('hubspot__', '').replace('_pass_through_columns', '') %}\n {%- set col_list = var(passthrough_var_name) -%}\n\n {%- for col in col_list -%} -- Create label cols\n {%- if col.add_property_label or var('hubspot__enable_all_property_labels', false) -%}\n {%- set col_alias = (col.alias | default(col.name)) %}\n , {{ col.name }}_option.property_option_label as {{ col_alias }}_label\n {% endif -%}\n {%- endfor %}\n\n from {{ cte_name }}\n\n {% for col in col_list -%} -- Create joins\n {%- if col.add_property_label or var('hubspot__enable_all_property_labels', false) -%}\n {%- set col_alias = (col.alias | default(col.name)) %}\n\n left join -- create subset of property and property_options for property in question\n (select \n property_option.source_relation,\n property_option.property_option_value, \n property_option.property_option_label\n from {{ ref('stg_hubspot__property_option') }} as property_option\n join {{ ref('stg_hubspot__property') }} as property\n on property_option.hubspot_object = property.hubspot_object\n and property_option.source_relation = property.source_relation\n where property.property_name = '{{ col.name.replace('property_', '') }}'\n and property.hubspot_object = '{{ source_name }}'\n ) as {{ col.name }}_option\n\n on cast({{ cte_name }}.{{ col_alias }} as {{ dbt.type_string() }})\n = cast({{ col.name }}_option.property_option_value as {{ dbt.type_string() }})\n and {{ cte_name }}.source_relation = {{ col.name }}_option.source_relation\n\n {% endif -%}\n {%- endfor %}\n\n{%- else -%}\n from {{ cte_name }}\n\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "passthrough_var_name", "type": null, "description": ""}, {"name": "cte_name", "type": null, "description": ""}], "created_at": 1786398583.0269513, "supported_languages": null}, "macro.hubspot.get_conversation_thread_columns": {"name": "get_conversation_thread_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_conversation_thread_columns.sql", "original_file_path": "macros/staging/get_conversation_thread_columns.sql", "unique_id": "macro.hubspot.get_conversation_thread_columns", "macro_sql": "{% macro get_conversation_thread_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"inbox_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"associated_contact_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"associated_ticket_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"original_channel_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"original_channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"assigned_to\", \"datatype\": dbt.type_string()},\n {\"name\": \"closed_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"latest_message_received_timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"latest_message_sent_timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"latest_message_timestamp\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"spam\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0300817, "supported_languages": null}, "macro.hubspot.get_contact_property_history_columns": {"name": "get_contact_property_history_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_contact_property_history_columns.sql", "original_file_path": "macros/staging/get_contact_property_history_columns.sql", "unique_id": "macro.hubspot.get_contact_property_history_columns", "macro_sql": "{% macro get_contact_property_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"source\", \"datatype\": dbt.type_string()},\n {\"name\": \"source_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"change_timestamp\"},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0322516, "supported_languages": null}, "macro.hubspot.get_merged_deal_columns": {"name": "get_merged_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_merged_deal_columns.sql", "original_file_path": "macros/staging/get_merged_deal_columns.sql", "unique_id": "macro.hubspot.get_merged_deal_columns", "macro_sql": "{% macro get_merged_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"merged_deal_id\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0331886, "supported_languages": null}, "macro.hubspot.get_engagement_columns": {"name": "get_engagement_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_columns.sql", "original_file_path": "macros/staging/get_engagement_columns.sql", "unique_id": "macro.hubspot.get_engagement_columns", "macro_sql": "{% macro get_engagement_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0343375, "supported_languages": null}, "macro.hubspot.get_team_user_columns": {"name": "get_team_user_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_team_user_columns.sql", "original_file_path": "macros/staging/get_team_user_columns.sql", "unique_id": "macro.hubspot.get_team_user_columns", "macro_sql": "{% macro get_team_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"team_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_secondary_user\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.035612, "supported_languages": null}, "macro.hubspot.get_deal_columns": {"name": "get_deal_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_deal_columns.sql", "original_file_path": "macros/staging/get_deal_columns.sql", "unique_id": "macro.hubspot.get_deal_columns", "macro_sql": "{% macro get_deal_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"deal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"deal_pipeline_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"deal_pipeline_stage_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": dbt.type_boolean(), \"alias\": \"is_deal_deleted\"},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"portal_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"property_dealname\", \"datatype\": dbt.type_string(), \"alias\": \"deal_name\"},\n {\"name\": \"property_description\", \"datatype\": dbt.type_string(), \"alias\": \"description\"},\n {\"name\": \"property_amount\", \"datatype\": dbt.type_int(), \"alias\": \"amount\"},\n {\"name\": \"property_closedate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"closed_date\"},\n {\"name\": \"property_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_date\"}\n] %}\n\n{{ hubspot_add_pass_through_columns(columns, var('hubspot__deal_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string", "macro.hubspot.hubspot_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0387568, "supported_languages": null}, "macro.hubspot.get_engagement_task_columns": {"name": "get_engagement_task_columns", "resource_type": "macro", "package_name": "hubspot", "path": "macros/staging/get_engagement_task_columns.sql", "original_file_path": "macros/staging/get_engagement_task_columns.sql", "unique_id": "macro.hubspot.get_engagement_task_columns", "macro_sql": "{% macro get_engagement_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"engagement_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string(), \"alias\": \"engagement_type\"},\n {\"name\": \"property_hs_createdate\", \"datatype\": dbt.type_timestamp(), \"alias\": \"created_timestamp\"},\n {\"name\": \"property_hs_timestamp\", \"datatype\": dbt.type_timestamp(), \"alias\": \"occurred_timestamp\"},\n {\"name\": \"property_hubspot_owner_id\", \"datatype\": dbt.type_int(), \"alias\": \"owner_id\"},\n {\"name\": \"property_hubspot_team_id\", \"datatype\": dbt.type_int(), \"alias\": \"team_id\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.040863, "supported_languages": null}, "macro.spark_utils.get_tables": {"name": "get_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_tables", "macro_sql": "{% macro get_tables(table_regex_pattern='.*') %}\n\n {% set tables = [] %}\n {% for database in spark__list_schemas('not_used') %}\n {% for table in spark__list_relations_without_caching(database[0]) %}\n {% set db_tablename = database[0] ~ \".\" ~ table[1] %}\n {% set is_match = modules.re.match(table_regex_pattern, db_tablename) %}\n {% if is_match %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('type', 'TYPE', 'Type'))|first %}\n {% if table_type[1]|lower != 'view' %}\n {{ tables.append(db_tablename) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% endfor %}\n {{ return(tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786398583.0442522, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"name": "get_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_delta_tables", "macro_sql": "{% macro get_delta_tables(table_regex_pattern='.*') %}\n\n {% set delta_tables = [] %}\n {% for db_tablename in get_tables(table_regex_pattern) %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('provider', 'PROVIDER', 'Provider'))|first %}\n {% if table_type[1]|lower == 'delta' %}\n {{ delta_tables.append(db_tablename) }}\n {% endif %}\n {% endfor %}\n {{ return(delta_tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786398583.0460296, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"name": "get_statistic_columns", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_statistic_columns", "macro_sql": "{% macro get_statistic_columns(table) %}\n\n {% call statement('input_columns', fetch_result=True) %}\n SHOW COLUMNS IN {{ table }}\n {% endcall %}\n {% set input_columns = load_result('input_columns').table %}\n\n {% set output_columns = [] %}\n {% for column in input_columns %}\n {% call statement('column_information', fetch_result=True) %}\n DESCRIBE TABLE {{ table }} `{{ column[0] }}`\n {% endcall %}\n {% if not load_result('column_information').table[1][1].startswith('struct') and not load_result('column_information').table[1][1].startswith('array') %}\n {{ output_columns.append('`' ~ column[0] ~ '`') }}\n {% endif %}\n {% endfor %}\n {{ return(output_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1786398583.0477533, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"name": "spark_optimize_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_optimize_delta_tables", "macro_sql": "{% macro spark_optimize_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Optimizing \" ~ table) }}\n {% do run_query(\"optimize \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786398583.049178, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"name": "spark_vacuum_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "macro_sql": "{% macro spark_vacuum_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Vacuuming \" ~ table) }}\n {% do run_query(\"vacuum \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786398583.0506682, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"name": "spark_analyze_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_analyze_tables", "macro_sql": "{% macro spark_analyze_tables(table_regex_pattern='.*') %}\n\n {% for table in get_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set columns = get_statistic_columns(table) | join(',') %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Analyzing \" ~ table) }}\n {% if columns != '' %}\n {% do run_query(\"analyze table \" ~ table ~ \" compute statistics for columns \" ~ columns) %}\n {% endif %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.spark_utils.get_statistic_columns", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1786398583.0524144, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"name": "assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1786398583.0530002, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"name": "default__assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.default__assert_not_null", "macro_sql": "{% macro default__assert_not_null(function, arg) %}\n\n coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1786398583.0534294, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"name": "spark__convert_timezone", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "unique_id": "macro.spark_utils.spark__convert_timezone", "macro_sql": "{% macro spark__convert_timezone(in_tz, out_tz, in_timestamp) %}\n from_utc_timestamp(to_utc_timestamp({{in_timestamp}}, {{in_tz}}), {{out_tz}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "in_tz", "type": null, "description": ""}, {"name": "out_tz", "type": null, "description": ""}, {"name": "in_timestamp", "type": null, "description": ""}], "created_at": 1786398583.053847, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"name": "spark__get_relations_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "macro_sql": "{% macro spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n show table extended in {{ schema_pattern }} like '{{ table_pattern }}'\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=None,\n schema=row[0],\n identifier=row[1],\n type=('view' if 'Type: VIEW' in row[3] else 'table')\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398583.056153, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"name": "spark__get_relations_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "macro_sql": "{% macro spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {% set table_pattern = table_pattern ~ '*' %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398583.05681, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"name": "spark__get_tables_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "macro_sql": "{% macro spark__get_tables_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398583.0573666, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"name": "spark__get_tables_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "macro_sql": "{% macro spark__get_tables_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1786398583.0578907, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"name": "spark__current_timestamp", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0581625, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"name": "spark__current_timestamp_in_utc", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0583231, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"name": "spark__dateadd", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "unique_id": "macro.spark_utils.spark__dateadd", "macro_sql": "{% macro spark__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {%- set clock_component -%}\n {# make sure the dates + timestamps are real, otherwise raise an error asap #}\n to_unix_timestamp({{ spark_utils.assert_not_null('to_timestamp', from_date_or_timestamp) }})\n - to_unix_timestamp({{ spark_utils.assert_not_null('date', from_date_or_timestamp) }})\n {%- endset -%}\n\n {%- if datepart in ['day', 'week'] -%}\n \n {%- set multiplier = 7 if datepart == 'week' else 1 -%}\n\n to_timestamp(\n to_unix_timestamp(\n date_add(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ['month', 'quarter', 'year'] -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'month' -%} 1\n {%- elif datepart == 'quarter' -%} 3\n {%- elif datepart == 'year' -%} 12\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n to_unix_timestamp(\n add_months(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n {{ spark_utils.assert_not_null('to_unix_timestamp', from_date_or_timestamp) }}\n + cast({{interval}} * {{multiplier}} as int)\n )\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro dateadd not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1786398583.0621161, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"name": "spark__type_numeric", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "unique_id": "macro.spark_utils.spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1786398583.0623984, "supported_languages": null}, "macro.spark_utils.spark__concat": {"name": "spark__concat", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "unique_id": "macro.spark_utils.spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1786398583.0627367, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"name": "spark__datediff", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "unique_id": "macro.spark_utils.spark__datediff", "macro_sql": "{% macro spark__datediff(first_date, second_date, datepart) %}\n\n {%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}\n \n {# make sure the dates are real, otherwise raise an error asap #}\n {% set first_date = spark_utils.assert_not_null('date', first_date) %}\n {% set second_date = spark_utils.assert_not_null('date', second_date) %}\n \n {%- endif -%}\n \n {%- if datepart == 'day' -%}\n \n datediff({{second_date}}, {{first_date}})\n \n {%- elif datepart == 'week' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(datediff({{second_date}}, {{first_date}})/7)\n else ceil(datediff({{second_date}}, {{first_date}})/7)\n end\n \n -- did we cross a week boundary (Sunday)?\n + case\n when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1\n else 0 end\n\n {%- elif datepart == 'month' -%}\n\n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}})))\n else ceil(months_between(date({{second_date}}), date({{first_date}})))\n end\n \n -- did we cross a month boundary?\n + case\n when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1\n else 0 end\n \n {%- elif datepart == 'quarter' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}}))/3)\n else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)\n end\n \n -- did we cross a quarter boundary?\n + case\n when {{first_date}} < {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n < (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then 1\n when {{first_date}} > {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n > (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then -1\n else 0 end\n\n {%- elif datepart == 'year' -%}\n \n year({{second_date}}) - year({{first_date}})\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set divisor -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n case when {{first_date}} < {{second_date}}\n then ceil((\n {# make sure the timestamps are real, otherwise raise an error asap #}\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n else floor((\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n end\n \n {% if datepart == 'millisecond' %}\n + cast(date_format({{second_date}}, 'SSS') as int)\n - cast(date_format({{first_date}}, 'SSS') as int)\n {% endif %}\n \n {% if datepart == 'microsecond' %} \n {% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}\n -- Spark doesn't really support microseconds, so this is a massive hack!\n -- It will only work if the timestamp-string is of the format\n -- 'yyyy-MM-dd-HH mm.ss.SSSSSS'\n + cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)\n - cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int) \n {% endif %}\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro datediff not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1786398583.069542, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"name": "spark__split_part", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "unique_id": "macro.spark_utils.spark__split_part", "macro_sql": "{% macro spark__split_part(string_text, delimiter_text, part_number) %}\n\n {% set delimiter_expr %}\n \n -- escape if starts with a special character\n case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_'\n then concat('\\\\', {{ delimiter_text }})\n else {{ delimiter_text }} end\n \n {% endset %}\n\n {% set split_part_expr %}\n \n split(\n {{ string_text }},\n {{ delimiter_expr }}\n )[({{ part_number - 1 }})]\n \n {% endset %}\n \n {{ return(split_part_expr) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1786398583.0705254, "supported_languages": null}}, "docs": {"doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}, "doc.hubspot.bounces": {"name": "bounces", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.bounces", "block_contents": "The total number of bounce email events."}, "doc.hubspot.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.clicks", "block_contents": "The total number of click email events."}, "doc.hubspot.deferrals": {"name": "deferrals", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.deferrals", "block_contents": "The total number of deferral email events."}, "doc.hubspot.deliveries": {"name": "deliveries", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.deliveries", "block_contents": "The total number of delivery email events."}, "doc.hubspot.drops": {"name": "drops", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.drops", "block_contents": "The total number of drop email events."}, "doc.hubspot.forwards": {"name": "forwards", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.forwards", "block_contents": "The total number of forward email events."}, "doc.hubspot.opens": {"name": "opens", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.opens", "block_contents": "The total number of open email events."}, "doc.hubspot.prints": {"name": "prints", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.prints", "block_contents": "The total number of print email events."}, "doc.hubspot.spam_reports": {"name": "spam_reports", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.spam_reports", "block_contents": "The total number of spam report email events."}, "doc.hubspot.unsubscribes": {"name": "unsubscribes", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unsubscribes", "block_contents": "The total number of unsubscribe email events."}, "doc.hubspot.unique_bounces": {"name": "unique_bounces", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_bounces", "block_contents": "The total number of unique email sends with a bounce email event."}, "doc.hubspot.unique_clicks": {"name": "unique_clicks", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_clicks", "block_contents": "The total number of unique email sends with a click email event."}, "doc.hubspot.unique_deferrals": {"name": "unique_deferrals", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_deferrals", "block_contents": "The total number of unique email sends with a deferral email event."}, "doc.hubspot.unique_deliveries": {"name": "unique_deliveries", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_deliveries", "block_contents": "The total number of unique email sends with a delivery email event."}, "doc.hubspot.unique_drops": {"name": "unique_drops", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_drops", "block_contents": "The total number of unique email sends with a drop email event."}, "doc.hubspot.unique_forwards": {"name": "unique_forwards", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_forwards", "block_contents": "The total number of unique email sends with a forward email event."}, "doc.hubspot.unique_opens": {"name": "unique_opens", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_opens", "block_contents": "The total number of unique email sends with a opens email event."}, "doc.hubspot.unique_prints": {"name": "unique_prints", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_prints", "block_contents": "The total number of unique email sends with a print email event."}, "doc.hubspot.unique_spam_reports": {"name": "unique_spam_reports", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_spam_reports", "block_contents": "The total number of unique email sends with a spam report email event."}, "doc.hubspot.unique_unsubscribes": {"name": "unique_unsubscribes", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.unique_unsubscribes", "block_contents": "The total number of unique email sends with a unsubscribe email event."}, "doc.hubspot.count_engagement_notes": {"name": "count_engagement_notes", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_notes", "block_contents": "The total number of related note engagements."}, "doc.hubspot.count_engagement_tasks": {"name": "count_engagement_tasks", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_tasks", "block_contents": "The total number of related task engagements."}, "doc.hubspot.count_engagement_calls": {"name": "count_engagement_calls", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_calls", "block_contents": "The total number of related call engagements."}, "doc.hubspot.count_engagement_meetings": {"name": "count_engagement_meetings", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_meetings", "block_contents": "The total number of related meeting engagements."}, "doc.hubspot.count_engagement_emails": {"name": "count_engagement_emails", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_emails", "block_contents": "The total number of related email engagements."}, "doc.hubspot.count_engagement_incoming_emails": {"name": "count_engagement_incoming_emails", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_incoming_emails", "block_contents": "The total number of related incoming email engagements."}, "doc.hubspot.count_engagement_forwarded_emails": {"name": "count_engagement_forwarded_emails", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.count_engagement_forwarded_emails", "block_contents": "The total number of related forwarded email engagements."}, "doc.hubspot.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "hubspot", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.hubspot.source_relation", "block_contents": "Identifies the record's source."}, "doc.hubspot._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_synced", "block_contents": "Timestamp of when Fivetran synced a record."}, "doc.hubspot._fivetran_deleted": {"name": "_fivetran_deleted", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_deleted", "block_contents": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "doc.hubspot._fivetran_end": {"name": "_fivetran_end", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_end", "block_contents": "The (UTC DATETIME) when a record became inactive in the source database."}, "doc.hubspot._fivetran_start": {"name": "_fivetran_start", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot._fivetran_start", "block_contents": "The (UTC DATETIME) to keep track of the time when a record is first created or modified in the source database."}, "doc.hubspot.portal_id": {"name": "portal_id", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.portal_id", "block_contents": "The hub ID."}, "doc.hubspot.is_deleted": {"name": "is_deleted", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.is_deleted", "block_contents": "Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran; _fivetran_deleted and is_deleted fields are equivalent."}, "doc.hubspot.history_name": {"name": "history_name", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_name", "block_contents": "The name of the field being changed."}, "doc.hubspot.history_source": {"name": "history_source", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_source", "block_contents": "The source (reason) of the change."}, "doc.hubspot.history_source_id": {"name": "history_source_id", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_source_id", "block_contents": "The ID of the object that caused the change, if applicable."}, "doc.hubspot.history_timestamp": {"name": "history_timestamp", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_timestamp", "block_contents": "The timestamp the changed occurred."}, "doc.hubspot.history_value": {"name": "history_value", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.history_value", "block_contents": "The new value of the field."}, "doc.hubspot.email_event_browser": {"name": "email_event_browser", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_browser", "block_contents": "A JSON object representing the browser which serviced the event. Its comprised of the properties: 'name', 'family', 'producer', 'producer_url', 'type', 'url', 'version'."}, "doc.hubspot.email_event_ip_address": {"name": "email_event_ip_address", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_ip_address", "block_contents": "The contact's IP address when the event occurred."}, "doc.hubspot.email_event_location": {"name": "email_event_location", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_location", "block_contents": "A JSON object representing the location where the event occurred. It's comprised of the properties: 'city', 'state', 'country'."}, "doc.hubspot.email_event_user_agent": {"name": "email_event_user_agent", "resource_type": "doc", "package_name": "hubspot", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.hubspot.email_event_user_agent", "block_contents": "The user agent responsible for the event, e.g. \u201cMozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36\u201d"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {"test.hubspot_integration_tests.consistency_engagement_communication": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_communication", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_communication.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_communication.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_communication", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_communication"], "alias": "consistency_engagement_communication", "checksum": {"name": "sha256", "checksum": "8fe3f442b802dad96c4bbb37c7e77e37e847c4fd60e4b5a719defdbb767efd75"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_communication_enabled', False)"}, "created_at": 1786398583.9926033, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_communication_enabled', false))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement communication end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_communication'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_communication\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_communication'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_communication\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_communication", "package": null, "version": null}, {"name": "hubspot__engagement_communication", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_companies": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_companies", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_companies.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_companies.sql", "unique_id": "test.hubspot_integration_tests.consistency_companies", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_companies"], "alias": "consistency_companies", "checksum": {"name": "sha256", "checksum": "233d56a26f33f97adc2cc2fc63a823895ecdfa41dfa699a40f35d1c464e80847"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_company_enabled', True)"}, "created_at": 1786398584.0503058, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_company_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the companies end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__companies'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__companies\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__companies'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__companies\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__companies", "package": null, "version": null}, {"name": "hubspot__companies", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_forward": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_forward", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_forward.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_forward.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_forward", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_forward"], "alias": "consistency_email_event_forward", "checksum": {"name": "sha256", "checksum": "9448dfaac16e2d9379e84f15e93dccf35b24949ddf8d2c572f5d40c043b0e390"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_forward_enabled', True)"}, "created_at": 1786398584.0587544, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_forward_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event forward end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_forward'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_forward\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_forward'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_forward\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_forward", "package": null, "version": null}, {"name": "hubspot__email_event_forward", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_tasks": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_tasks", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_tasks.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_tasks.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_tasks", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_tasks"], "alias": "consistency_engagement_tasks", "checksum": {"name": "sha256", "checksum": "cbc2152079962aefc84061d523242d9da53997c367cb58c4298323799f4418a5"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_task_enabled', True)"}, "created_at": 1786398584.0679975, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_task_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement tasks end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_tasks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_tasks\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_tasks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_tasks\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_tasks", "package": null, "version": null}, {"name": "hubspot__engagement_tasks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_deal_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_deal_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_deal_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_deal_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_deal_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_deal_history"], "alias": "consistency_deal_history", "checksum": {"name": "sha256", "checksum": "735d424a3ee679059592f92e9e9d8d9256f43839a738761a094cbc635ec460d8"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_deal_enabled', True) and var('hubspot_deal_property_history_enabled', True)"}, "created_at": 1786398584.0786633, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_deal_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the deal history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__deal_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__deal_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_history", "package": null, "version": null}, {"name": "hubspot__deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_campaigns": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_campaigns", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_campaigns.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_campaigns.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_campaigns", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_campaigns"], "alias": "consistency_email_campaigns", "checksum": {"name": "sha256", "checksum": "a7dd48140c68eab4dbf2b08edb4cc39c74969fce94ecfa94a034ede77bbb38cc"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_sent_enabled', True)"}, "created_at": 1786398584.0883944, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_sent_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email campaigns end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_campaigns'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_campaigns\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_campaigns'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_campaigns\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_campaigns", "package": null, "version": null}, {"name": "hubspot__email_campaigns", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_status_change": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_status_change", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_status_change.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_status_change.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_status_change", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_status_change"], "alias": "consistency_email_event_status_change", "checksum": {"name": "sha256", "checksum": "943bb0c7e150faf612fe849b7c3df01460c10be191792f4337db5cc39181e015"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_status_change_enabled', True)"}, "created_at": 1786398584.0977771, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_status_change_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event status change end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_status_change'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_status_change\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_status_change'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_status_change\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_status_change", "package": null, "version": null}, {"name": "hubspot__email_event_status_change", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_dropped": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_dropped", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_dropped.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_dropped.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_dropped", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_dropped"], "alias": "consistency_email_event_dropped", "checksum": {"name": "sha256", "checksum": "b71789094c2610b1bf1c3bea1592347eaeee693792e50cd2032c885d6d605857"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_dropped_enabled', True)"}, "created_at": 1786398584.1070569, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_dropped_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event dropped end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_dropped'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_dropped\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_dropped'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_dropped\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_dropped", "package": null, "version": null}, {"name": "hubspot__email_event_dropped", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_bounce": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_bounce", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_bounce.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_bounce.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_bounce", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_bounce"], "alias": "consistency_email_event_bounce", "checksum": {"name": "sha256", "checksum": "4d6d9f66318777bd1b2af8b1660f666c9308e17f0f4048c920b18abd42fd8f57"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_bounce_enabled', True)"}, "created_at": 1786398584.1163914, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_bounce_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event bounce end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_bounce'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_bounce\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_bounce'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_bounce\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_bounce", "package": null, "version": null}, {"name": "hubspot__email_event_bounce", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contacts": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contacts", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_contacts.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_contacts.sql", "unique_id": "test.hubspot_integration_tests.consistency_contacts", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_contacts"], "alias": "consistency_contacts", "checksum": {"name": "sha256", "checksum": "e8be5d8adbf256299addd2ffec3b375ca58fa093d621c1433321ab518d0c095f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_enabled', True)"}, "created_at": 1786398584.1257606, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the contacts end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__contacts'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__contacts\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__contacts'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__contacts\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contacts", "package": null, "version": null}, {"name": "hubspot__contacts", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_marketing_event_performance": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_marketing_event_performance", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_marketing_event_performance.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_marketing_event_performance.sql", "unique_id": "test.hubspot_integration_tests.consistency_marketing_event_performance", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_marketing_event_performance"], "alias": "consistency_marketing_event_performance", "checksum": {"name": "sha256", "checksum": "c8574b09f501f36eadb584832d17859624c0f406f1202bbaa25f14e0d7f61136"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_marketing_event_enabled', True)"}, "created_at": 1786398584.1342316, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_marketing_event_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) + ['source_relation'] %}\n\n-- this test ensures the hubspot__marketing_event_performance end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__marketing_event_performance'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__marketing_event_performance\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__marketing_event_performance'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__marketing_event_performance\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__marketing_event_performance", "package": null, "version": null}, {"name": "hubspot__marketing_event_performance", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_print": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_print", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_print.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_print.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_print", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_print"], "alias": "consistency_email_event_print", "checksum": {"name": "sha256", "checksum": "4424597e1e9239a468de15dee6a381d25dbe964bc6155323ef6b4db1c12b37ef"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_print_enabled', True)"}, "created_at": 1786398584.1433785, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_print_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event print end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_print'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_print\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_print'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_print\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_print", "package": null, "version": null}, {"name": "hubspot__email_event_print", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_deals": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_deals", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_deals.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_deals.sql", "unique_id": "test.hubspot_integration_tests.consistency_deals", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_deals"], "alias": "consistency_deals", "checksum": {"name": "sha256", "checksum": "b8c507b899cdd67bd658a28810954f315b6ffe962e18ed2fd22422e26d1a2a04"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_deal_enabled', True)"}, "created_at": 1786398584.1525986, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_deal_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the deals end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__deals'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__deals\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__deals'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__deals\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deals", "package": null, "version": null}, {"name": "hubspot__deals", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagements": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagements", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagements.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagements.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagements", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagements"], "alias": "consistency_engagements", "checksum": {"name": "sha256", "checksum": "acdb73d55903a02a13cc3f8ad8cee202b1d03e5679b70d5f2f82e14582a6912f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True)"}, "created_at": 1786398584.1609628, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagements end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagements'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagements\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagements'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagements\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagements", "package": null, "version": null}, {"name": "hubspot__engagements", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_company_lists": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_company_lists", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_company_lists.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_company_lists.sql", "unique_id": "test.hubspot_integration_tests.consistency_company_lists", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_company_lists"], "alias": "consistency_company_lists", "checksum": {"name": "sha256", "checksum": "8bc1e1e956b902afa325800038ca3c31f444c09d5d9d89c9dcc73f423802c8cb"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_company_list_enabled', True) and var('hubspot_sales_enabled', True)"}, "created_at": 1786398584.1697083, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_company_list_enabled', true) and var('hubspot_sales_enabled', true)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the company_list end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__company_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__company_lists\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__company_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__company_lists\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_lists", "package": null, "version": null}, {"name": "hubspot__company_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_deal_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_deal_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_deal_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_deal_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_deal_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_deal_history"], "alias": "consistency_daily_deal_history", "checksum": {"name": "sha256", "checksum": "bcfbdb67ef0f5256c6e6a070bbf732dd59f9594bbbac6a3ba857a4e09212381f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_deal_enabled', True) and var('hubspot_deal_property_history_enabled', True)"}, "created_at": 1786398584.1784842, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_deal_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the daily deal history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_deal_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_deal_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_deal_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_deal_history", "package": null, "version": null}, {"name": "hubspot__daily_deal_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_company_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_company_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_company_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_company_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_company_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_company_history"], "alias": "consistency_daily_company_history", "checksum": {"name": "sha256", "checksum": "31e3fa4a31bfc9fda8c42028f1438d80f85b3e97159b821e5357a1002e45ad1b"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_company_enabled', True) and var('hubspot_company_property_history_enabled', True)"}, "created_at": 1786398584.1882243, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) and var('hubspot_company_property_history_enabled', true)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the hubspot__daily_company_history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_company_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_company_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_company_history", "package": null, "version": null}, {"name": "hubspot__daily_company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_sent": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_sent", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_sent.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_sent.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_sent", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_sent"], "alias": "consistency_email_event_sent", "checksum": {"name": "sha256", "checksum": "e26ca63671dc5917b03c2c53595e65e50771533116d0e24e68ea2e1ab971d929"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_sent_enabled', True)"}, "created_at": 1786398584.1974437, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_sent_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event sent end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_sent'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_sent\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_sent'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_sent\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_sent", "package": null, "version": null}, {"name": "hubspot__email_event_sent", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_deal_stages": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_deal_stages", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_deal_stages.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_deal_stages.sql", "unique_id": "test.hubspot_integration_tests.consistency_deal_stages", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_deal_stages"], "alias": "consistency_deal_stages", "checksum": {"name": "sha256", "checksum": "b09173df661eb1d243f583cd38e0b50ea09c24d562944a2aa6ab08f1eec01de5"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_deal_enabled', True) and var('hubspot_sales_enabled', True)"}, "created_at": 1786398584.2069857, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_deal_enabled', true) and var('hubspot_sales_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the deal stages end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_stages'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__deal_stages\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__deal_stages'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__deal_stages\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deal_stages", "package": null, "version": null}, {"name": "hubspot__deal_stages", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_spam_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_spam_report", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_spam_report.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_spam_report.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_spam_report", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_spam_report"], "alias": "consistency_email_event_spam_report", "checksum": {"name": "sha256", "checksum": "714c2e7fc26944f88fbdd751a36fee2b30c0fc1706fb5d85ec06faadcbe3e829"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_spam_report_enabled', True)"}, "created_at": 1786398584.2158453, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_spam_report_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event spam report end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_spam_report'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_spam_report\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_spam_report'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_spam_report\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_spam_report", "package": null, "version": null}, {"name": "hubspot__email_event_spam_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_company_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_company_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_company_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_company_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_company_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_company_history"], "alias": "consistency_company_history", "checksum": {"name": "sha256", "checksum": "d3801d16f917146b45a4b5b9437679fd2b8e743b4cc0de2e40eb9e559251229b"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_company_enabled', True) and var('hubspot_company_property_history_enabled', True)"}, "created_at": 1786398584.2252333, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) and var('hubspot_company_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the company history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__company_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__company_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__company_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_history", "package": null, "version": null}, {"name": "hubspot__company_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_sends": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_sends", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_sends.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_sends.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_sends", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_sends"], "alias": "consistency_email_sends", "checksum": {"name": "sha256", "checksum": "a337f157721243971125f34a3e5e201097ae0d4c79949bf61a9a5bc7538c6077"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_sent_enabled', True)"}, "created_at": 1786398584.2344904, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_sent_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email sends end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_sends'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_sends\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_sends'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_sends\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_sends", "package": null, "version": null}, {"name": "hubspot__email_sends", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_emails": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_emails", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_emails.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_emails.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_emails", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_emails"], "alias": "consistency_engagement_emails", "checksum": {"name": "sha256", "checksum": "9d1ba40d3c3d017799c50ba07a417427ac9549328c39ae08912828ddb1e5eb03"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_email_enabled', True)"}, "created_at": 1786398584.2436836, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_email_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement emails end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_emails'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_emails\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_emails'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_emails\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_emails", "package": null, "version": null}, {"name": "hubspot__engagement_emails", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_contact_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_contact_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_contact_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_contact_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_contact_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_contact_history"], "alias": "consistency_daily_contact_history", "checksum": {"name": "sha256", "checksum": "21e700f32f3be44fae52663a64bdf8db2181a34938a31124a88144ba35439ce3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_contact_property_enabled', True) and var('hubspot_contact_property_history_enabled', True)"}, "created_at": 1786398584.2529964, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_contact_property_enabled', true) and var('hubspot_contact_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the daily contact history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_contact_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_contact_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_contact_history", "package": null, "version": null}, {"name": "hubspot__daily_contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_deferred": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_deferred", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_deferred.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_deferred.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_deferred", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_deferred"], "alias": "consistency_email_event_deferred", "checksum": {"name": "sha256", "checksum": "2c38fa4f1c2d5b06589bf5e476c3d8ee3f49e1a8736072e873d4f27ab155efb8"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_deferred_enabled', True)"}, "created_at": 1786398584.2622318, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_deferred_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event deferred end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_deferred'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_deferred\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_deferred'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_deferred\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_deferred", "package": null, "version": null}, {"name": "hubspot__email_event_deferred", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_conversations": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_conversations", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_conversations.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_conversations.sql", "unique_id": "test.hubspot_integration_tests.consistency_conversations", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_conversations"], "alias": "consistency_conversations", "checksum": {"name": "sha256", "checksum": "2cb5cdce8ebeac2daffed6a97a065b0ce4e83e61b1a3aef9e85e16e86a418cf3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_conversation_enabled', True)"}, "created_at": 1786398584.2714808, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_conversation_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the conversations end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__conversations'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__conversations\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__conversations'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__conversations\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__conversations", "package": null, "version": null}, {"name": "hubspot__conversations", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contact_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contact_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_contact_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_contact_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_contact_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_contact_history"], "alias": "consistency_contact_history", "checksum": {"name": "sha256", "checksum": "e909c9035533f27a96bd7618fca47b95567bcab2e4509a397da0f5f0bb13f286"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_contact_property_enabled', True) and var('hubspot_contact_property_history_enabled', True)"}, "created_at": 1786398584.2799115, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_contact_property_enabled', true) and var('hubspot_contact_property_history_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the contact history end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__contact_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__contact_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_history", "package": null, "version": null}, {"name": "hubspot__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_notes": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_notes", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_notes.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_notes.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_notes", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_notes"], "alias": "consistency_engagement_notes", "checksum": {"name": "sha256", "checksum": "5607d92de53539217c8808ceaec60d92861c2428424da1b14556985738b5a2ef"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_note_enabled', True)"}, "created_at": 1786398584.289223, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_note_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement notes end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_notes'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_notes\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_notes'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_notes\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_notes", "package": null, "version": null}, {"name": "hubspot__engagement_notes", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contact_list": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contact_list", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_contact_list.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_contact_list.sql", "unique_id": "test.hubspot_integration_tests.consistency_contact_list", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_contact_list"], "alias": "consistency_contact_list", "checksum": {"name": "sha256", "checksum": "63a01aace63748d3f503071677570edb7b9f56aa16699e68376b64b0ef3539f3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_list_enabled', True)"}, "created_at": 1786398584.2990685, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_list_enabled', true)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the contact_list end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__contact_lists\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__contact_lists'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__contact_lists\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_lists", "package": null, "version": null}, {"name": "hubspot__contact_lists", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_ticket_history": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_ticket_history", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_daily_ticket_history.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_daily_ticket_history.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_ticket_history", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_daily_ticket_history"], "alias": "consistency_daily_ticket_history", "checksum": {"name": "sha256", "checksum": "76210f2093b10c60a44806b52907c66cc7feb5fc2024d8742c88271d2469c2dd"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', False)"}, "created_at": 1786398584.3074656, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', false)\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the daily_activity end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_ticket_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__daily_ticket_history\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__daily_ticket_history'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__daily_ticket_history\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__daily_ticket_history", "package": null, "version": null}, {"name": "hubspot__daily_ticket_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_meetings": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_meetings", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_meetings.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_meetings.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_meetings", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_meetings"], "alias": "consistency_engagement_meetings", "checksum": {"name": "sha256", "checksum": "06862321507c1324b45aadba58f5d6306b9703e94efcb9c57642fa495c79f441"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_meeting_enabled', True)"}, "created_at": 1786398584.3158123, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_meeting_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement meetings end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_meetings'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_meetings\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_meetings'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_meetings\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_meetings", "package": null, "version": null}, {"name": "hubspot__engagement_meetings", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_opens": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_opens", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_opens.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_opens.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_opens", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_opens"], "alias": "consistency_email_event_opens", "checksum": {"name": "sha256", "checksum": "dc8608901ab831d5a4c63b45fe69497db3749f9a792618a659d0cefd13ffc3e3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_open_enabled', True)"}, "created_at": 1786398584.3250782, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_open_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event opens end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_opens'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_opens\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_opens'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_opens\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_opens", "package": null, "version": null}, {"name": "hubspot__email_event_opens", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_clicks": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_clicks", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_clicks.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_clicks.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_clicks", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_clicks"], "alias": "consistency_email_event_clicks", "checksum": {"name": "sha256", "checksum": "bc50885230741583441a4cdf27e0916e49a827ed65b884e4cdb0058e1ada806a"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_click_enabled', True)"}, "created_at": 1786398584.334408, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_click_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event clicks end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_clicks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_clicks\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_clicks'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_clicks\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_clicks", "package": null, "version": null}, {"name": "hubspot__email_event_clicks", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_email_event_delivered": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_email_event_delivered", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_email_event_delivered.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_email_event_delivered.sql", "unique_id": "test.hubspot_integration_tests.consistency_email_event_delivered", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_email_event_delivered"], "alias": "consistency_email_event_delivered", "checksum": {"name": "sha256", "checksum": "0c9918b749edc3f2f66d58ce9a0c028d1720ad5256d500d396cdb9b3b1168432"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_email_event_enabled', True) and var('hubspot_email_event_delivered_enabled', True)"}, "created_at": 1786398584.3436518, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_email_event_enabled', true) and var('hubspot_email_event_delivered_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the email event delivered end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_delivered'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__email_event_delivered\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__email_event_delivered'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__email_event_delivered\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__email_event_delivered", "package": null, "version": null}, {"name": "hubspot__email_event_delivered", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_engagement_calls": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_engagement_calls", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_engagement_calls.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_engagement_calls.sql", "unique_id": "test.hubspot_integration_tests.consistency_engagement_calls", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_engagement_calls"], "alias": "consistency_engagement_calls", "checksum": {"name": "sha256", "checksum": "0814018622f8dfde68ec199f329c44fdefe3cc167857f380fc5fa96df1d67b1c"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_engagement_enabled', True) and var('hubspot_engagement_call_enabled', True)"}, "created_at": 1786398584.3530893, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_engagement_enabled', true) and var('hubspot_engagement_call_enabled', true))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the engagement calls end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_calls'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__engagement_calls\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__engagement_calls'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__engagement_calls\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__engagement_calls", "package": null, "version": null}, {"name": "hubspot__engagement_calls", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_tickets": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_tickets", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_comparisons/consistency_tickets.sql", "original_file_path": "tests/consistency/row_comparisons/consistency_tickets.sql", "unique_id": "test.hubspot_integration_tests.consistency_tickets", "fqn": ["hubspot_integration_tests", "consistency", "row_comparisons", "consistency_tickets"], "alias": "consistency_tickets", "checksum": {"name": "sha256", "checksum": "38e3533ffaa21f6e799b7d035af7a1e386fbcfc003087a4216d09565eddc368d"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', False)"}, "created_at": 1786398584.3624218, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=(var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', false))\n) }}\n\n{% set exclude_cols = var('consistency_test_exclude', []) %}\n\n-- this test ensures the tickets end model matches the prior version\nwith prod as (\n select {{ dbt_utils.star(from=ref('hubspot__tickets'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_prod.hubspot__tickets\n),\n\ndev as (\n select {{ dbt_utils.star(from=ref('hubspot__tickets'), except=exclude_cols) }}\n from {{ target.schema }}_hubspot_dev.hubspot__tickets\n),\n\nprod_not_in_dev as (\n -- rows from prod not found in dev\n select * from prod\n except distinct\n select * from dev\n),\n\ndev_not_in_prod as (\n -- rows from dev not found in prod\n select * from dev\n except distinct\n select * from prod\n),\n\nfinal as (\n select\n *,\n 'from prod' as source\n from prod_not_in_dev\n\n union all -- union since we only care if rows are produced\n\n select\n *,\n 'from dev' as source\n from dev_not_in_prod\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__tickets", "package": null, "version": null}, {"name": "hubspot__tickets", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_contact_lists_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_contact_lists_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_contact_lists_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_contact_lists_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_contact_lists_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_contact_lists_count"], "alias": "consistency_contact_lists_count", "checksum": {"name": "sha256", "checksum": "a8bc033dbc66e4ad47ad389d02d1319ecd650ee521da704d5b48646ec7d91226"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_list_enabled', True)"}, "created_at": 1786398584.3708763, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_list_enabled', true)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__contact_lists\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__contact_lists\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\ncross join dev\nwhere prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_contact_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_contact_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_contact_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_contact_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_contact_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_contact_history_count"], "alias": "consistency_daily_contact_history_count", "checksum": {"name": "sha256", "checksum": "75a922b58c95ac9673f1067bd83e40ac5e99e4aec1fde2cd4a93716945ca97c9"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_marketing_enabled', True) and var('hubspot_contact_property_enabled', True) and var('hubspot_contact_property_history_enabled', True)"}, "created_at": 1786398584.3765216, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_marketing_enabled', true) and var('hubspot_contact_property_enabled', true) and var('hubspot_contact_property_history_enabled', true)\n) }}\n\n-- this test is to make sure the row counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_contact_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_contact_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_ticket_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_ticket_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_ticket_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_ticket_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_ticket_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_ticket_history_count"], "alias": "consistency_daily_ticket_history_count", "checksum": {"name": "sha256", "checksum": "d4b88e92cbbbb4ad9c6b9fb91438ae95ee16e1a6d9544feb778408fbaa2f8c28"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', False)"}, "created_at": 1786398584.3828597, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', false)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_ticket_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_ticket_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_deal_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_deal_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_deal_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_deal_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_deal_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_deal_history_count"], "alias": "consistency_daily_deal_history_count", "checksum": {"name": "sha256", "checksum": "f4e44ac01cf455a25b7fd2ad1923d04ee27b2a0e4a06c58765d58ab7b4d5f713"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_deal_enabled', True) and var('hubspot_deal_property_history_enabled', True)"}, "created_at": 1786398584.3884954, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_deal_enabled', true) and var('hubspot_deal_property_history_enabled', true)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_deal_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_deal_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.consistency_daily_company_history_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_daily_company_history_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "consistency/row_counts/consistency_daily_company_history_count.sql", "original_file_path": "tests/consistency/row_counts/consistency_daily_company_history_count.sql", "unique_id": "test.hubspot_integration_tests.consistency_daily_company_history_count", "fqn": ["hubspot_integration_tests", "consistency", "row_counts", "consistency_daily_company_history_count"], "alias": "consistency_daily_company_history_count", "checksum": {"name": "sha256", "checksum": "620e41da9aeeeeb89c5bed2168b8a294e03be819b6701ee31ac579e35946c7f9"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_sales_enabled', True) and var('hubspot_company_enabled', True) and var('hubspot_company_property_history_enabled', True)"}, "created_at": 1786398584.3949356, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_sales_enabled', true) and var('hubspot_company_enabled', true) and var('hubspot_company_property_history_enabled', true)\n) }}\n\n-- this test is to make sure the rows counts are the same between versions\nwith prod as (\n select count(*) as prod_rows\n from {{ target.schema }}_hubspot_prod.hubspot__daily_company_history\n),\n\ndev as (\n select count(*) as dev_rows\n from {{ target.schema }}_hubspot_dev.hubspot__daily_company_history\n)\n\n-- test will return values and fail if the row counts don't match\nselect *\nfrom prod\njoin dev\n on prod.prod_rows != dev.dev_rows", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_company_lists_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_company_lists_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_company_lists_count.sql", "original_file_path": "tests/integrity/integrity_company_lists_count.sql", "unique_id": "test.hubspot_integration_tests.integrity_company_lists_count", "fqn": ["hubspot_integration_tests", "integrity", "integrity_company_lists_count"], "alias": "integrity_company_lists_count", "checksum": {"name": "sha256", "checksum": "d279be0f07a45e2342c940a0bf3dd095605cc2509f2c6b39c0e0990914bd9a17"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_company_list_enabled', True) and var('hubspot_sales_enabled', True)"}, "created_at": 1786398584.401221, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_company_list_enabled', true) and var('hubspot_sales_enabled', true)\n) }}\n\n-- This test will ensure the total count of records from the company_list staging model matches the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__company_lists') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__company_list') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__company_lists", "package": null, "version": null}, {"name": "stg_hubspot__company_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_contact_lists_count": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_contact_lists_count", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_contact_lists_count.sql", "original_file_path": "tests/integrity/integrity_contact_lists_count.sql", "unique_id": "test.hubspot_integration_tests.integrity_contact_lists_count", "fqn": ["hubspot_integration_tests", "integrity", "integrity_contact_lists_count"], "alias": "integrity_contact_lists_count", "checksum": {"name": "sha256", "checksum": "840adaf10503c371d141224a5d3ff79665dcb3240bae4f0e345f3b405f38e98e"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_list_enabled', True)"}, "created_at": 1786398584.408213, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_list_enabled', true)\n) }}\n\n-- This test will ensure the total count of records from the contact_list staging model matches the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__contact_lists') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__contact_list') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contact_lists", "package": null, "version": null}, {"name": "stg_hubspot__contact_list", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_conversations": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_conversations", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_conversations.sql", "original_file_path": "tests/integrity/integrity_conversations.sql", "unique_id": "test.hubspot_integration_tests.integrity_conversations", "fqn": ["hubspot_integration_tests", "integrity", "integrity_conversations"], "alias": "integrity_conversations", "checksum": {"name": "sha256", "checksum": "3b83cd9b974fe369e7ca63a6ee6d305b9767b6464fc0153e2a6c3d6f9e5e90af"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_conversation_enabled', True)"}, "created_at": 1786398584.4140842, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_conversation_enabled', true)\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__conversations') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__conversation_thread') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__conversations", "package": null, "version": null}, {"name": "stg_hubspot__conversation_thread", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_deals": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_deals", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_deals.sql", "original_file_path": "tests/integrity/integrity_deals.sql", "unique_id": "test.hubspot_integration_tests.integrity_deals", "fqn": ["hubspot_integration_tests", "integrity", "integrity_deals"], "alias": "integrity_deals", "checksum": {"name": "sha256", "checksum": "45433336dbff66976edbb546e632e00e10f5d249fe466d47487dfe935787b345"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "False"}, "created_at": 1786398584.420053, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=false\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__deals') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__deal') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__deals", "package": null, "version": null}, {"name": "stg_hubspot__deal", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_contacts": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_contacts", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_contacts.sql", "original_file_path": "tests/integrity/integrity_contacts.sql", "unique_id": "test.hubspot_integration_tests.integrity_contacts", "fqn": ["hubspot_integration_tests", "integrity", "integrity_contacts"], "alias": "integrity_contacts", "checksum": {"name": "sha256", "checksum": "3ae2b059a165bb58a8bc7191741624f7e2339772d9881a511b6525617249b80f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_contact_enabled', True)"}, "created_at": 1786398584.4253538, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_contact_enabled', true)\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__contacts') }}\n),\n\nint_model as (\n select count(*) as int_model_rows\n from {{ ref('int_hubspot__contact_merge_adjust') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__contact') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\ncross join int_model\nwhere end_model_rows > staging_model_rows -- changed from = to > becasuse of merges\n or end_model_rows != int_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__contacts", "package": null, "version": null}, {"name": "int_hubspot__contact_merge_adjust", "package": null, "version": null}, {"name": "stg_hubspot__contact", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.hubspot_integration_tests.integrity_tickets": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "integrity_tickets", "resource_type": "test", "package_name": "hubspot_integration_tests", "path": "integrity/integrity_tickets.sql", "original_file_path": "tests/integrity/integrity_tickets.sql", "unique_id": "test.hubspot_integration_tests.integrity_tickets", "fqn": ["hubspot_integration_tests", "integrity", "integrity_tickets"], "alias": "integrity_tickets", "checksum": {"name": "sha256", "checksum": "b66c6c882c06ff76d6e8647bd0516cf59c4399c44d24fef6571c2ca2c5f4d843"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "sql_header": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": "var('fivetran_validation_tests_enabled', False) and var('hubspot_service_enabled', True)"}, "created_at": 1786398584.4315906, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false) and var('hubspot_service_enabled', true)\n) }}\n\n-- This tests for fanout. Returns records if the staging model does not match the end model.\nwith end_model as (\n select count(*) as end_model_rows\n from {{ ref('hubspot__tickets') }}\n),\n\nstaging_model as (\n select count(*) as staging_model_rows\n from {{ ref('stg_hubspot__ticket') }}\n)\n\nselect *\nfrom end_model\ncross join staging_model\nwhere end_model_rows != staging_model_rows", "doc_blocks": [], "language": "sql", "refs": [{"name": "hubspot__tickets", "package": null, "version": null}, {"name": "stg_hubspot__ticket", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "seed.hubspot_integration_tests.company_data_snowflake": [{"database": "postgres", "schema": "public", "name": "company_data_snowflake", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data_snowflake.csv", "original_file_path": "seeds/company_data_snowflake.csv", "unique_id": "seed.hubspot_integration_tests.company_data_snowflake", "fqn": ["hubspot_integration_tests", "company_data_snowflake"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "adb19af8584d6645003538159aa71673ae1729dd71ed03b64f5e99bd807c6f1a"}, "config": {"enabled": false, "alias": "company_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "company_data", "enabled": "{{ true if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.6355665, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.company_data": [{"database": "postgres", "schema": "public", "name": "company_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data.csv", "original_file_path": "seeds/company_data.csv", "unique_id": "seed.hubspot_integration_tests.company_data", "fqn": ["hubspot_integration_tests", "company_data"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "cdf5ee52f093fe3f6cd4cae26bb84a77cb25d73b845fa0f25dd042eb8fc32b5a"}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "enabled": "{{ true if target.type not in ('postgres','snowflake','databricks') or var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.69401, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_sent_data": [{"database": "postgres", "schema": "public", "name": "email_event_sent_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_sent_data.csv", "original_file_path": "seeds/email_event_sent_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_sent_data", "fqn": ["hubspot_integration_tests", "email_event_sent_data"], "alias": "email_event_sent_data", "checksum": {"name": "sha256", "checksum": "ee30dbd9f5d7c3682906127212df1b6177a43f16ac7f018f72ab8bfd0f9a7ede"}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "enabled": "{{ true if target.type not in ('snowflake', 'postgres') or var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786398584.7087317, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_dropped_data": [{"database": "postgres", "schema": "public", "name": "email_event_dropped_data", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_dropped_data.csv", "original_file_path": "seeds/email_event_dropped_data.csv", "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data", "fqn": ["hubspot_integration_tests", "email_event_dropped_data"], "alias": "email_event_dropped_data", "checksum": {"name": "sha256", "checksum": "533c39c745eda4d1b5c61cdb23ce8a635f7c99313bfe64c9f282ab8130866abb"}, "config": {"enabled": false, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "enabled": "{{ true if target.type not in ('snowflake', 'postgres') or var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786398584.7843475, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.company_data_databricks": [{"database": "postgres", "schema": "public", "name": "company_data_databricks", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "company_data_databricks.csv", "original_file_path": "seeds/company_data_databricks.csv", "unique_id": "seed.hubspot_integration_tests.company_data_databricks", "fqn": ["hubspot_integration_tests", "company_data_databricks"], "alias": "company_data", "checksum": {"name": "sha256", "checksum": "691f2ba4c793596d6fe600c8e43567abf38a726e400c4be751f693845e0764e2"}, "config": {"enabled": false, "alias": "company_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "company_data", "enabled": "{{ true if target.type in ('databricks','databricks-sql') and not var('fivetran_using_source_casing', false) else false }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1786398584.8023522, "relation_name": "\"postgres\".\"public\".\"company_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_dropped_data_snowflake": [{"database": "postgres", "schema": "public", "name": "email_event_dropped_data_snowflake", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_dropped_data_snowflake.csv", "original_file_path": "seeds/email_event_dropped_data_snowflake.csv", "unique_id": "seed.hubspot_integration_tests.email_event_dropped_data_snowflake", "fqn": ["hubspot_integration_tests", "email_event_dropped_data_snowflake"], "alias": "email_event_dropped_data", "checksum": {"name": "sha256", "checksum": "c76b93930ac4bcd2a6cb4b26b5c8ce021900a19c67d996195aa8e298d365cd3a"}, "config": {"enabled": false, "alias": "email_event_dropped_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "email_event_dropped_data", "enabled": "{{ true if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786398584.8562775, "relation_name": "\"postgres\".\"public\".\"email_event_dropped_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}], "seed.hubspot_integration_tests.email_event_sent_data_snowflake": [{"database": "postgres", "schema": "public", "name": "email_event_sent_data_snowflake", "resource_type": "seed", "package_name": "hubspot_integration_tests", "path": "email_event_sent_data_snowflake.csv", "original_file_path": "seeds/email_event_sent_data_snowflake.csv", "unique_id": "seed.hubspot_integration_tests.email_event_sent_data_snowflake", "fqn": ["hubspot_integration_tests", "email_event_sent_data_snowflake"], "alias": "email_event_sent_data", "checksum": {"name": "sha256", "checksum": "89cba14bad6a125b898c0e45a52214590c01bf7422756eab50ea39c68009e5ce"}, "config": {"enabled": false, "alias": "email_event_sent_data", "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift', 'duckdb') or var('fivetran_using_source_casing', false) }}", "alias": "email_event_sent_data", "enabled": "{{ true if target.type == 'snowflake' and not var('fivetran_using_source_casing', false) else false }}"}, "created_at": 1786398584.8740377, "relation_name": "\"postgres\".\"public\".\"email_event_sent_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_hubspot/dbt_hubspot/integration_tests", "depends_on": {"macros": []}}]}, "parent_map": {"seed.hubspot_integration_tests.engagement_call_data": [], "seed.hubspot_integration_tests.owner_data": [], "seed.hubspot_integration_tests.engagement_contact_data": [], "seed.hubspot_integration_tests.conversation_channel_data": [], "seed.hubspot_integration_tests.company_list_data": [], "seed.hubspot_integration_tests.contact_list_member_data": [], "seed.hubspot_integration_tests.contact_merge_audit_data": [], "seed.hubspot_integration_tests.company_property_history_data": [], "seed.hubspot_integration_tests.engagement_company_data": [], "seed.hubspot_integration_tests.property_option_data": [], "seed.hubspot_integration_tests.engagement_note_data": [], "seed.hubspot_integration_tests.ticket_engagement_data": [], "seed.hubspot_integration_tests.conversation_inbox_data": [], "seed.hubspot_integration_tests.conversation_channel_account_data": [], "seed.hubspot_integration_tests.email_event_dropped_data_postgres": [], "seed.hubspot_integration_tests.email_event_spam_report_data": [], "seed.hubspot_integration_tests.conversation_actor_data": [], "seed.hubspot_integration_tests.users_data": [], "seed.hubspot_integration_tests.deal_data": [], "seed.hubspot_integration_tests.ticket_company_data": [], "seed.hubspot_integration_tests.marketing_event_participant_data": [], "seed.hubspot_integration_tests.submission_response_data": [], "seed.hubspot_integration_tests.engagement_email_data": [], "seed.hubspot_integration_tests.marketing_event_list_data": [], "seed.hubspot_integration_tests.contact_data": [], "seed.hubspot_integration_tests.deal_contact_data": [], "seed.hubspot_integration_tests.team_data": [], "seed.hubspot_integration_tests.contact_property_history_data": [], "seed.hubspot_integration_tests.email_campaign_data": [], "seed.hubspot_integration_tests.contact_list_data": [], "seed.hubspot_integration_tests.ticket_pipeline_data": [], "seed.hubspot_integration_tests.conversation_message_history_data": [], "seed.hubspot_integration_tests.email_event_delivered_data": [], "seed.hubspot_integration_tests.marketing_event_data": [], "seed.hubspot_integration_tests.company_data_postgres": [], "seed.hubspot_integration_tests.engagement_data": [], "seed.hubspot_integration_tests.role_data": [], "seed.hubspot_integration_tests.company_list_member_data": [], "seed.hubspot_integration_tests.conversation_thread_data": [], "seed.hubspot_integration_tests.deal_stage_data": [], "seed.hubspot_integration_tests.ticket_property_history_data": [], "seed.hubspot_integration_tests.deal_property_history_data": [], "seed.hubspot_integration_tests.ticket_data": [], "seed.hubspot_integration_tests.email_event_open_data": [], "seed.hubspot_integration_tests.property_data": [], "seed.hubspot_integration_tests.email_event_sent_data_postgres": [], "seed.hubspot_integration_tests.email_event_click_data": [], "seed.hubspot_integration_tests.email_event_deferred_data": [], "seed.hubspot_integration_tests.deal_company_data": [], "seed.hubspot_integration_tests.team_user_data": [], "seed.hubspot_integration_tests.deal_pipeline_stage_data": [], "seed.hubspot_integration_tests.owner_team_data": [], "seed.hubspot_integration_tests.engagement_meeting_data": [], "seed.hubspot_integration_tests.deal_pipeline_data": [], "seed.hubspot_integration_tests.email_event_status_change_data": [], "seed.hubspot_integration_tests.engagement_task_data": [], "seed.hubspot_integration_tests.ticket_deal_data": [], "seed.hubspot_integration_tests.engagement_deal_data": [], "seed.hubspot_integration_tests.contact_form_submission_data": [], "seed.hubspot_integration_tests.email_event_bounce_data": [], "seed.hubspot_integration_tests.ticket_pipeline_stage_data": [], "seed.hubspot_integration_tests.email_event_print_data": [], "seed.hubspot_integration_tests.merged_deal_data": [], "seed.hubspot_integration_tests.form_data": [], "seed.hubspot_integration_tests.email_event_forward_data": [], "seed.hubspot_integration_tests.ticket_contact_data": [], "seed.hubspot_integration_tests.engagement_communication_data": [], "seed.hubspot_integration_tests.marketing_event_custom_property_data": [], "seed.hubspot_integration_tests.email_event_data": [], "seed.hubspot_integration_tests.conversation_message_recipient_data": [], "model.hubspot.hubspot__contact_lists": ["model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__email_metrics__by_contact_list", "model.hubspot.stg_hubspot__contact_list"], "model.hubspot.hubspot__email_campaigns": ["model.hubspot.hubspot__email_sends", "model.hubspot.stg_hubspot__email_campaign"], "model.hubspot.hubspot__contacts": ["model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.int_hubspot__engagement_metrics__by_contact", "model.hubspot.int_hubspot__form_metrics__by_contact"], "model.hubspot.hubspot__marketing_event_performance": ["model.hubspot.stg_hubspot__marketing_event", "model.hubspot.stg_hubspot__marketing_event_list", "model.hubspot.stg_hubspot__marketing_event_participant"], "model.hubspot.hubspot__email_sends": ["model.hubspot.hubspot__email_event_sent", "model.hubspot.int_hubspot__email_aggregate_status_change", "model.hubspot.int_hubspot__email_event_aggregates"], "model.hubspot.hubspot__email_event_spam_report": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_spam_report"], "model.hubspot.hubspot__email_event_status_change": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_status_change"], "model.hubspot.hubspot__email_event_dropped": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_dropped"], "model.hubspot.hubspot__email_event_bounce": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_bounce"], "model.hubspot.hubspot__email_event_delivered": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_delivered"], "model.hubspot.hubspot__email_event_forward": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_forward"], "model.hubspot.hubspot__email_event_deferred": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_deferred"], "model.hubspot.hubspot__email_event_clicks": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_click"], "model.hubspot.hubspot__email_event_sent": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_sent"], "model.hubspot.hubspot__email_event_print": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_print"], "model.hubspot.hubspot__email_event_opens": ["model.hubspot.int_hubspot__contact_merge_adjust", "model.hubspot.stg_hubspot__email_event", "model.hubspot.stg_hubspot__email_event_open"], "model.hubspot.int_hubspot__contact_merge_adjust": ["model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__contact_merge_audit"], "model.hubspot.int_hubspot__form_metrics__by_contact": ["model.hubspot.stg_hubspot__contact_form_submission", "model.hubspot.stg_hubspot__form", "model.hubspot.stg_hubspot__submission_response"], "model.hubspot.int_hubspot__email_aggregate_status_change": ["model.hubspot.hubspot__email_event_status_change"], "model.hubspot.int_hubspot__email_metrics__by_contact_list": ["model.hubspot.hubspot__email_sends", "model.hubspot.stg_hubspot__contact_list_member"], "model.hubspot.int_hubspot__contact_calendar_spine": ["model.hubspot.stg_hubspot__contact"], "model.hubspot.int_hubspot__daily_email_metrics__by_contact": ["model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__scd_daily_contact_history": ["model.hubspot.int_hubspot__pivot_daily_contact_history"], "model.hubspot.int_hubspot__engagement_metrics__by_contact": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_contact"], "model.hubspot.int_hubspot__pivot_daily_contact_history": ["model.hubspot.int_hubspot__daily_contact_history"], "model.hubspot.int_hubspot__email_event_aggregates": ["model.hubspot.stg_hubspot__email_event"], "model.hubspot.int_hubspot__daily_contact_history": ["model.hubspot.stg_hubspot__contact_property_history"], "model.hubspot.hubspot__contact_history": ["model.hubspot.stg_hubspot__contact_property_history"], "model.hubspot.hubspot__daily_contact_history": ["model.hubspot.int_hubspot__contact_calendar_spine", "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__scd_daily_contact_history", "model.hubspot.stg_hubspot__owner"], "model.hubspot.int_hubspot__owners_enhanced": ["model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__owner_team", "model.hubspot.stg_hubspot__role", "model.hubspot.stg_hubspot__team", "model.hubspot.stg_hubspot__users"], "model.hubspot.hubspot__conversations": ["model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__conversation_actor", "model.hubspot.stg_hubspot__conversation_channel", "model.hubspot.stg_hubspot__conversation_channel_account", "model.hubspot.stg_hubspot__conversation_inbox", "model.hubspot.stg_hubspot__conversation_message_history", "model.hubspot.stg_hubspot__conversation_message_recipient", "model.hubspot.stg_hubspot__conversation_thread", "model.hubspot.stg_hubspot__ticket"], "model.hubspot.hubspot__daily_ticket_history": ["model.hubspot.int_hubspot__scd_daily_ticket_history", "model.hubspot.int_hubspot__ticket_calendar_spine", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage"], "model.hubspot.hubspot__tickets": ["model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__company", "model.hubspot.stg_hubspot__contact", "model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__ticket", "model.hubspot.stg_hubspot__ticket_company", "model.hubspot.stg_hubspot__ticket_contact", "model.hubspot.stg_hubspot__ticket_deal", "model.hubspot.stg_hubspot__ticket_engagement", "model.hubspot.stg_hubspot__ticket_pipeline", "model.hubspot.stg_hubspot__ticket_pipeline_stage"], "model.hubspot.int_hubspot__daily_ticket_history": ["model.hubspot.stg_hubspot__ticket_property_history"], "model.hubspot.int_hubspot__ticket_calendar_spine": ["model.hubspot.stg_hubspot__ticket", "model.hubspot.stg_hubspot__ticket_tmp"], "model.hubspot.int_hubspot__scd_daily_ticket_history": ["model.hubspot.int_hubspot__pivot_daily_ticket_history"], "model.hubspot.int_hubspot__pivot_daily_ticket_history": ["model.hubspot.int_hubspot__daily_ticket_history"], "model.hubspot.hubspot__deal_stages": ["model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__deal_stage"], "model.hubspot.hubspot__companies": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__company", "model.hubspot.stg_hubspot__engagement_company"], "model.hubspot.hubspot__company_lists": ["model.hubspot.int_hubspot__engagement_metrics__by_company_list", "model.hubspot.stg_hubspot__company_list", "model.hubspot.stg_hubspot__company_list_member"], "model.hubspot.hubspot__deals": ["model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__deals_enhanced", "model.hubspot.stg_hubspot__engagement_deal"], "model.hubspot.hubspot__engagements": ["model.hubspot.stg_hubspot__engagement", "model.hubspot.stg_hubspot__engagement_company", "model.hubspot.stg_hubspot__engagement_contact", "model.hubspot.stg_hubspot__engagement_deal"], "model.hubspot.hubspot__engagement_meetings": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_meeting"], "model.hubspot.hubspot__engagement_calls": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_call"], "model.hubspot.hubspot__engagement_notes": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_note"], "model.hubspot.hubspot__engagement_communication": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_communication"], "model.hubspot.hubspot__engagement_emails": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_email"], "model.hubspot.hubspot__engagement_tasks": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__daily_deal_history": ["model.hubspot.hubspot__deal_history", "model.hubspot.stg_hubspot__deal_stage"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.stg_hubspot__engagement_deal", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__scd_daily_company_history": ["model.hubspot.int_hubspot__pivot_daily_company_history"], "model.hubspot.int_hubspot__deals_enhanced": ["model.hubspot.int_hubspot__owners_enhanced", "model.hubspot.stg_hubspot__deal", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__merged_deal"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_company": ["model.hubspot.stg_hubspot__engagement_call", "model.hubspot.stg_hubspot__engagement_communication", "model.hubspot.stg_hubspot__engagement_company", "model.hubspot.stg_hubspot__engagement_email", "model.hubspot.stg_hubspot__engagement_meeting", "model.hubspot.stg_hubspot__engagement_note", "model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.int_hubspot__scd_daily_deal_history": ["model.hubspot.int_hubspot__pivot_daily_deal_history"], "model.hubspot.int_hubspot__pivot_daily_deal_history": ["model.hubspot.int_hubspot__daily_deal_history"], "model.hubspot.int_hubspot__company_calendar_spine": ["model.hubspot.stg_hubspot__company"], "model.hubspot.int_hubspot__daily_company_history": ["model.hubspot.stg_hubspot__company_property_history"], "model.hubspot.int_hubspot__engagement_metrics__by_company_list": ["model.hubspot.hubspot__engagements", "model.hubspot.stg_hubspot__company_list_member", "model.hubspot.stg_hubspot__engagement_company"], "model.hubspot.int_hubspot__deal_calendar_spine": ["model.hubspot.stg_hubspot__deal"], "model.hubspot.int_hubspot__pivot_daily_company_history": ["model.hubspot.int_hubspot__daily_company_history"], "model.hubspot.hubspot__deal_history": ["model.hubspot.stg_hubspot__deal_property_history"], "model.hubspot.hubspot__daily_company_history": ["model.hubspot.int_hubspot__company_calendar_spine", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__scd_daily_company_history", "model.hubspot.stg_hubspot__owner"], "model.hubspot.hubspot__daily_deal_history": ["model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "model.hubspot.int_hubspot__deal_calendar_spine", "model.hubspot.int_hubspot__scd_daily_deal_history", "model.hubspot.stg_hubspot__deal_pipeline", "model.hubspot.stg_hubspot__deal_pipeline_stage", "model.hubspot.stg_hubspot__owner", "model.hubspot.stg_hubspot__team"], "model.hubspot.hubspot__company_history": ["model.hubspot.stg_hubspot__company_property_history"], "model.hubspot.stg_hubspot__ticket_pipeline": ["model.hubspot.stg_hubspot__ticket_pipeline_tmp"], "model.hubspot.stg_hubspot__owner": ["model.hubspot.stg_hubspot__owner_tmp"], "model.hubspot.stg_hubspot__engagement_communication": ["model.hubspot.stg_hubspot__engagement_communication_tmp"], "model.hubspot.stg_hubspot__email_event_dropped": ["model.hubspot.stg_hubspot__email_event_dropped_tmp"], "model.hubspot.stg_hubspot__engagement_company": ["model.hubspot.stg_hubspot__engagement_company_tmp"], "model.hubspot.stg_hubspot__email_event_click": ["model.hubspot.stg_hubspot__email_event_click_tmp"], "model.hubspot.stg_hubspot__email_event_delivered": ["model.hubspot.stg_hubspot__email_event_delivered_tmp"], "model.hubspot.stg_hubspot__merged_deal": ["model.hubspot.stg_hubspot__merged_deal_tmp"], "model.hubspot.stg_hubspot__users": ["model.hubspot.stg_hubspot__users_tmp"], "model.hubspot.stg_hubspot__ticket_property_history": ["model.hubspot.stg_hubspot__ticket_property_history_tmp"], "model.hubspot.stg_hubspot__ticket_contact": ["model.hubspot.stg_hubspot__ticket_contact_tmp"], "model.hubspot.stg_hubspot__role": ["model.hubspot.stg_hubspot__role_tmp"], "model.hubspot.stg_hubspot__deal_property_history": ["model.hubspot.stg_hubspot__deal_property_history_tmp"], "model.hubspot.stg_hubspot__company_list": ["model.hubspot.stg_hubspot__company_list_tmp"], "model.hubspot.stg_hubspot__team": ["model.hubspot.stg_hubspot__team_tmp"], "model.hubspot.stg_hubspot__property_option": ["model.hubspot.stg_hubspot__property_option_tmp"], "model.hubspot.stg_hubspot__deal_contact": ["model.hubspot.stg_hubspot__deal_contact_tmp"], "model.hubspot.stg_hubspot__company": ["model.hubspot.stg_hubspot__company_tmp"], "model.hubspot.stg_hubspot__ticket": ["model.hubspot.stg_hubspot__ticket_tmp"], "model.hubspot.stg_hubspot__contact_list": ["model.hubspot.stg_hubspot__contact_list_tmp"], "model.hubspot.stg_hubspot__email_event_spam_report": ["model.hubspot.stg_hubspot__email_event_spam_report_tmp"], "model.hubspot.stg_hubspot__engagement_meeting": ["model.hubspot.stg_hubspot__engagement_meeting_tmp"], "model.hubspot.stg_hubspot__contact_form_submission": ["model.hubspot.stg_hubspot__contact_form_submission_tmp"], "model.hubspot.stg_hubspot__deal_stage": ["model.hubspot.stg_hubspot__deal_stage_tmp"], "model.hubspot.stg_hubspot__email_event": ["model.hubspot.stg_hubspot__email_event_tmp"], "model.hubspot.stg_hubspot__conversation_channel": ["model.hubspot.stg_hubspot__conversation_channel_tmp"], "model.hubspot.stg_hubspot__engagement_deal": ["model.hubspot.stg_hubspot__engagement_deal_tmp"], "model.hubspot.stg_hubspot__company_list_member": ["model.hubspot.stg_hubspot__company_list_member_tmp"], "model.hubspot.stg_hubspot__email_event_bounce": ["model.hubspot.stg_hubspot__email_event_bounce_tmp"], "model.hubspot.stg_hubspot__engagement_task": ["model.hubspot.stg_hubspot__engagement_task_tmp"], "model.hubspot.stg_hubspot__marketing_event_list": ["model.hubspot.stg_hubspot__marketing_event_list_tmp"], "model.hubspot.stg_hubspot__engagement_email": ["model.hubspot.stg_hubspot__engagement_email_tmp"], "model.hubspot.stg_hubspot__form": ["model.hubspot.stg_hubspot__form_tmp"], "model.hubspot.stg_hubspot__ticket_deal": ["model.hubspot.stg_hubspot__ticket_deal_tmp"], "model.hubspot.stg_hubspot__contact_property_history": ["model.hubspot.stg_hubspot__contact_property_history_tmp"], "model.hubspot.stg_hubspot__email_event_forward": ["model.hubspot.stg_hubspot__email_event_forward_tmp"], "model.hubspot.stg_hubspot__conversation_thread": ["model.hubspot.stg_hubspot__conversation_thread_tmp"], "model.hubspot.stg_hubspot__email_event_deferred": ["model.hubspot.stg_hubspot__email_event_deferred_tmp"], "model.hubspot.stg_hubspot__email_event_open": ["model.hubspot.stg_hubspot__email_event_open_tmp"], "model.hubspot.stg_hubspot__conversation_message_recipient": ["model.hubspot.stg_hubspot__conversation_message_recipient_tmp"], "model.hubspot.stg_hubspot__marketing_event_participant": ["model.hubspot.stg_hubspot__marketing_event_participant_tmp"], "model.hubspot.stg_hubspot__email_event_sent": ["model.hubspot.stg_hubspot__email_event_sent_tmp"], "model.hubspot.stg_hubspot__marketing_event_custom_property": ["model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"], "model.hubspot.stg_hubspot__conversation_message_history": ["model.hubspot.stg_hubspot__conversation_message_history_tmp"], "model.hubspot.stg_hubspot__deal_pipeline_stage": ["model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"], "model.hubspot.stg_hubspot__engagement": ["model.hubspot.stg_hubspot__engagement_tmp"], "model.hubspot.stg_hubspot__owner_team": ["model.hubspot.stg_hubspot__owner_team_tmp"], "model.hubspot.stg_hubspot__deal_pipeline": ["model.hubspot.stg_hubspot__deal_pipeline_tmp"], "model.hubspot.stg_hubspot__conversation_channel_account": ["model.hubspot.stg_hubspot__conversation_channel_account_tmp"], "model.hubspot.stg_hubspot__company_property_history": ["model.hubspot.stg_hubspot__company_property_history_tmp"], "model.hubspot.stg_hubspot__marketing_event": ["model.hubspot.stg_hubspot__marketing_event_tmp"], "model.hubspot.stg_hubspot__contact_merge_audit": ["model.hubspot.stg_hubspot__contact_merge_audit_tmp"], "model.hubspot.stg_hubspot__deal": ["model.hubspot.stg_hubspot__deal_tmp"], "model.hubspot.stg_hubspot__email_campaign": ["model.hubspot.stg_hubspot__email_campaign_tmp"], "model.hubspot.stg_hubspot__engagement_contact": ["model.hubspot.stg_hubspot__engagement_contact_tmp"], "model.hubspot.stg_hubspot__team_user": ["model.hubspot.stg_hubspot__team_user_tmp"], "model.hubspot.stg_hubspot__email_event_status_change": ["model.hubspot.stg_hubspot__email_event_status_change_tmp"], "model.hubspot.stg_hubspot__ticket_pipeline_stage": ["model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"], "model.hubspot.stg_hubspot__conversation_actor": ["model.hubspot.stg_hubspot__conversation_actor_tmp"], "model.hubspot.stg_hubspot__contact_list_member": ["model.hubspot.stg_hubspot__contact_list_member_tmp"], "model.hubspot.stg_hubspot__engagement_note": ["model.hubspot.stg_hubspot__engagement_note_tmp"], "model.hubspot.stg_hubspot__engagement_call": ["model.hubspot.stg_hubspot__engagement_call_tmp"], "model.hubspot.stg_hubspot__submission_response": ["model.hubspot.stg_hubspot__submission_response_tmp"], "model.hubspot.stg_hubspot__property": ["model.hubspot.stg_hubspot__property_tmp"], "model.hubspot.stg_hubspot__ticket_engagement": ["model.hubspot.stg_hubspot__ticket_engagement_tmp"], "model.hubspot.stg_hubspot__conversation_inbox": ["model.hubspot.stg_hubspot__conversation_inbox_tmp"], "model.hubspot.stg_hubspot__contact": ["model.hubspot.stg_hubspot__contact_tmp"], "model.hubspot.stg_hubspot__email_event_print": ["model.hubspot.stg_hubspot__email_event_print_tmp"], "model.hubspot.stg_hubspot__deal_company": ["model.hubspot.stg_hubspot__deal_company_tmp"], "model.hubspot.stg_hubspot__ticket_company": ["model.hubspot.stg_hubspot__ticket_company_tmp"], "model.hubspot.stg_hubspot__engagement_deal_tmp": ["source.hubspot.hubspot.engagement_deal"], "model.hubspot.stg_hubspot__email_event_print_tmp": ["source.hubspot.hubspot.email_event_print"], "model.hubspot.stg_hubspot__engagement_communication_tmp": ["source.hubspot.hubspot.engagement_communication"], "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": ["source.hubspot.hubspot.ticket_pipeline_stage"], "model.hubspot.stg_hubspot__engagement_email_tmp": ["source.hubspot.hubspot.engagement_email"], "model.hubspot.stg_hubspot__engagement_tmp": ["source.hubspot.hubspot.engagement"], "model.hubspot.stg_hubspot__email_event_click_tmp": ["source.hubspot.hubspot.email_event_click"], "model.hubspot.stg_hubspot__company_property_history_tmp": ["source.hubspot.hubspot.company_property_history"], "model.hubspot.stg_hubspot__conversation_thread_tmp": ["source.hubspot.hubspot.conversation_thread"], "model.hubspot.stg_hubspot__marketing_event_list_tmp": ["source.hubspot.hubspot.marketing_event_list"], "model.hubspot.stg_hubspot__deal_pipeline_tmp": ["source.hubspot.hubspot.deal_pipeline"], "model.hubspot.stg_hubspot__merged_deal_tmp": ["source.hubspot.hubspot.merged_deal"], "model.hubspot.stg_hubspot__conversation_channel_account_tmp": ["source.hubspot.hubspot.conversation_channel_account"], "model.hubspot.stg_hubspot__deal_contact_tmp": ["source.hubspot.hubspot.deal_contact"], "model.hubspot.stg_hubspot__deal_company_tmp": ["source.hubspot.hubspot.deal_company"], "model.hubspot.stg_hubspot__role_tmp": ["source.hubspot.hubspot.role"], "model.hubspot.stg_hubspot__marketing_event_participant_tmp": ["source.hubspot.hubspot.marketing_event_participant"], "model.hubspot.stg_hubspot__ticket_engagement_tmp": ["source.hubspot.hubspot.ticket_engagement"], "model.hubspot.stg_hubspot__contact_form_submission_tmp": ["source.hubspot.hubspot.contact_form_submission"], "model.hubspot.stg_hubspot__marketing_event_tmp": ["source.hubspot.hubspot.marketing_event"], "model.hubspot.stg_hubspot__conversation_message_history_tmp": ["source.hubspot.hubspot.conversation_message_history"], "model.hubspot.stg_hubspot__engagement_call_tmp": ["source.hubspot.hubspot.engagement_call"], "model.hubspot.stg_hubspot__ticket_deal_tmp": ["source.hubspot.hubspot.ticket_deal"], "model.hubspot.stg_hubspot__company_list_member_tmp": ["source.hubspot.hubspot.company_list_member"], "model.hubspot.stg_hubspot__engagement_note_tmp": ["source.hubspot.hubspot.engagement_note"], "model.hubspot.stg_hubspot__conversation_inbox_tmp": ["source.hubspot.hubspot.conversation_inbox"], "model.hubspot.stg_hubspot__ticket_contact_tmp": ["source.hubspot.hubspot.ticket_contact"], "model.hubspot.stg_hubspot__ticket_pipeline_tmp": ["source.hubspot.hubspot.ticket_pipeline"], "model.hubspot.stg_hubspot__email_event_open_tmp": ["source.hubspot.hubspot.email_event_open"], "model.hubspot.stg_hubspot__company_tmp": ["source.hubspot.hubspot.company"], "model.hubspot.stg_hubspot__deal_stage_tmp": ["source.hubspot.hubspot.deal_stage"], "model.hubspot.stg_hubspot__deal_tmp": ["source.hubspot.hubspot.deal"], "model.hubspot.stg_hubspot__conversation_channel_tmp": ["source.hubspot.hubspot.conversation_channel"], "model.hubspot.stg_hubspot__email_event_delivered_tmp": ["source.hubspot.hubspot.email_event_delivered"], "model.hubspot.stg_hubspot__property_option_tmp": ["source.hubspot.hubspot.property_option"], "model.hubspot.stg_hubspot__email_event_sent_tmp": ["source.hubspot.hubspot.email_event_sent"], "model.hubspot.stg_hubspot__property_tmp": ["source.hubspot.hubspot.property"], "model.hubspot.stg_hubspot__ticket_tmp": ["source.hubspot.hubspot.ticket"], "model.hubspot.stg_hubspot__engagement_meeting_tmp": ["source.hubspot.hubspot.engagement_meeting"], "model.hubspot.stg_hubspot__email_event_deferred_tmp": ["source.hubspot.hubspot.email_event_deferred"], "model.hubspot.stg_hubspot__contact_property_history_tmp": ["source.hubspot.hubspot.contact_property_history"], "model.hubspot.stg_hubspot__ticket_company_tmp": ["source.hubspot.hubspot.ticket_company"], "model.hubspot.stg_hubspot__email_event_status_change_tmp": ["source.hubspot.hubspot.email_event_status_change"], "model.hubspot.stg_hubspot__contact_merge_audit_tmp": ["source.hubspot.hubspot.contact_merge_audit"], "model.hubspot.stg_hubspot__contact_list_tmp": ["source.hubspot.hubspot.contact_list"], "model.hubspot.stg_hubspot__conversation_actor_tmp": ["source.hubspot.hubspot.conversation_actor"], "model.hubspot.stg_hubspot__email_event_tmp": ["source.hubspot.hubspot.email_event"], "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": ["source.hubspot.hubspot.deal_pipeline_stage"], "model.hubspot.stg_hubspot__email_campaign_tmp": ["source.hubspot.hubspot.email_campaign"], "model.hubspot.stg_hubspot__team_user_tmp": ["source.hubspot.hubspot.team_user"], "model.hubspot.stg_hubspot__engagement_company_tmp": ["source.hubspot.hubspot.engagement_company"], "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": ["source.hubspot.hubspot.marketing_event_custom_property"], "model.hubspot.stg_hubspot__owner_team_tmp": ["source.hubspot.hubspot.owner_team"], "model.hubspot.stg_hubspot__email_event_forward_tmp": ["source.hubspot.hubspot.email_event_forward"], "model.hubspot.stg_hubspot__email_event_dropped_tmp": ["source.hubspot.hubspot.email_event_dropped"], "model.hubspot.stg_hubspot__team_tmp": ["source.hubspot.hubspot.team"], "model.hubspot.stg_hubspot__users_tmp": ["source.hubspot.hubspot.users"], "model.hubspot.stg_hubspot__engagement_task_tmp": ["source.hubspot.hubspot.engagement_task"], "model.hubspot.stg_hubspot__contact_tmp": ["source.hubspot.hubspot.contact"], "model.hubspot.stg_hubspot__submission_response_tmp": ["source.hubspot.hubspot.submission_response"], "model.hubspot.stg_hubspot__ticket_property_history_tmp": ["source.hubspot.hubspot.ticket_property_history"], "model.hubspot.stg_hubspot__email_event_bounce_tmp": ["source.hubspot.hubspot.email_event_bounce"], "model.hubspot.stg_hubspot__contact_list_member_tmp": ["source.hubspot.hubspot.contact_list_member"], "model.hubspot.stg_hubspot__company_list_tmp": ["source.hubspot.hubspot.company_list"], "model.hubspot.stg_hubspot__email_event_spam_report_tmp": ["source.hubspot.hubspot.email_event_spam_report"], "model.hubspot.stg_hubspot__deal_property_history_tmp": ["source.hubspot.hubspot.deal_property_history"], "model.hubspot.stg_hubspot__form_tmp": ["source.hubspot.hubspot.form"], "model.hubspot.stg_hubspot__engagement_contact_tmp": ["source.hubspot.hubspot.engagement_contact"], "model.hubspot.stg_hubspot__owner_tmp": ["source.hubspot.hubspot.owner"], "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": ["source.hubspot.hubspot.conversation_message_recipient"], "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb": ["model.hubspot.hubspot__marketing_event_performance"], "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712": ["model.hubspot.hubspot__marketing_event_performance"], "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3": ["model.hubspot.hubspot__email_sends"], "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0": ["model.hubspot.hubspot__email_campaigns"], "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3": ["model.hubspot.hubspot__contacts"], "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891": ["model.hubspot.hubspot__contact_lists"], "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5": ["model.hubspot.hubspot__email_event_bounce"], "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0": ["model.hubspot.hubspot__email_event_clicks"], "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91": ["model.hubspot.hubspot__email_event_deferred"], "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3": ["model.hubspot.hubspot__email_event_delivered"], "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95": ["model.hubspot.hubspot__email_event_dropped"], "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08": ["model.hubspot.hubspot__email_event_forward"], "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1": ["model.hubspot.hubspot__email_event_opens"], "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e": ["model.hubspot.hubspot__email_event_print"], "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9": ["model.hubspot.hubspot__email_event_sent"], "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a": ["model.hubspot.hubspot__email_event_spam_report"], "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3": ["model.hubspot.hubspot__email_event_status_change"], "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a": ["model.hubspot.int_hubspot__email_aggregate_status_change"], "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111": ["model.hubspot.int_hubspot__email_aggregate_status_change"], "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2": ["model.hubspot.int_hubspot__email_metrics__by_contact_list"], "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a": ["model.hubspot.int_hubspot__email_event_aggregates"], "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b": ["model.hubspot.int_hubspot__engagement_metrics__by_contact"], "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba": ["model.hubspot.hubspot__daily_contact_history"], "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d": ["model.hubspot.hubspot__daily_contact_history"], "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec": ["model.hubspot.hubspot__contact_history"], "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088": ["model.hubspot.hubspot__contact_history"], "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c": ["model.hubspot.hubspot__daily_ticket_history"], "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e": ["model.hubspot.hubspot__daily_ticket_history"], "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7": ["model.hubspot.hubspot__tickets"], "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084": ["model.hubspot.hubspot__conversations"], "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f": ["model.hubspot.hubspot__company_lists"], "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd": ["model.hubspot.hubspot__deals"], "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b": ["model.hubspot.hubspot__deal_stages"], "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97": ["model.hubspot.hubspot__companies"], "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7": ["model.hubspot.hubspot__engagements"], "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f": ["model.hubspot.hubspot__engagement_calls"], "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095": ["model.hubspot.hubspot__engagement_communication"], "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09": ["model.hubspot.hubspot__engagement_emails"], "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df": ["model.hubspot.hubspot__engagement_meetings"], "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965": ["model.hubspot.hubspot__engagement_notes"], "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae": ["model.hubspot.hubspot__engagement_tasks"], "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8": ["model.hubspot.hubspot__daily_deal_history"], "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256": ["model.hubspot.hubspot__daily_deal_history"], "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe": ["model.hubspot.hubspot__daily_company_history"], "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794": ["model.hubspot.hubspot__daily_company_history"], "test.hubspot.unique_hubspot__company_history_id.f1af964b1f": ["model.hubspot.hubspot__company_history"], "test.hubspot.not_null_hubspot__company_history_id.33035793ff": ["model.hubspot.hubspot__company_history"], "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79": ["model.hubspot.hubspot__deal_history"], "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75": ["model.hubspot.hubspot__deal_history"], "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65": ["model.hubspot.stg_hubspot__form"], "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7": ["model.hubspot.stg_hubspot__submission_response"], "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3": ["model.hubspot.stg_hubspot__email_event_bounce"], "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5": ["model.hubspot.stg_hubspot__email_event_click"], "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0": ["model.hubspot.stg_hubspot__email_event_deferred"], "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20": ["model.hubspot.stg_hubspot__email_event_delivered"], "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52": ["model.hubspot.stg_hubspot__email_event_dropped"], "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3": ["model.hubspot.stg_hubspot__email_event_forward"], "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16": ["model.hubspot.stg_hubspot__email_event_open"], "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b": ["model.hubspot.stg_hubspot__email_event_print"], "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d": ["model.hubspot.stg_hubspot__email_event_sent"], "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f": ["model.hubspot.stg_hubspot__email_event_spam_report"], "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1": ["model.hubspot.stg_hubspot__email_event_status_change"], "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531": ["model.hubspot.stg_hubspot__email_event"], "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6": ["model.hubspot.stg_hubspot__email_campaign"], "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a": ["model.hubspot.stg_hubspot__contact_list"], "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944": ["model.hubspot.stg_hubspot__contact"], "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf": ["model.hubspot.stg_hubspot__engagement_call"], "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b": ["model.hubspot.stg_hubspot__engagement_communication"], "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca": ["model.hubspot.stg_hubspot__engagement_email"], "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28": ["model.hubspot.stg_hubspot__engagement_meeting"], "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e": ["model.hubspot.stg_hubspot__engagement_note"], "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82": ["model.hubspot.stg_hubspot__engagement_task"], "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f": ["model.hubspot.stg_hubspot__engagement"], "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3": ["model.hubspot.stg_hubspot__company_list"], "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43": ["model.hubspot.stg_hubspot__company"], "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0": ["model.hubspot.stg_hubspot__marketing_event"], "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a": ["model.hubspot.stg_hubspot__marketing_event_list"], "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b": ["model.hubspot.stg_hubspot__marketing_event_participant"], "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea": ["model.hubspot.stg_hubspot__conversation_actor"], "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b": ["model.hubspot.stg_hubspot__conversation_inbox"], "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf": ["model.hubspot.stg_hubspot__conversation_channel"], "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb": ["model.hubspot.stg_hubspot__conversation_channel_account"], "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398": ["model.hubspot.stg_hubspot__conversation_thread"], "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e": ["model.hubspot.stg_hubspot__conversation_message_history"], "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b": ["model.hubspot.stg_hubspot__conversation_message_recipient"], "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53": ["model.hubspot.stg_hubspot__ticket"], "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e": ["model.hubspot.stg_hubspot__deal_pipeline_stage"], "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3": ["model.hubspot.stg_hubspot__deal_pipeline"], "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20": ["model.hubspot.stg_hubspot__deal"], "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9": ["model.hubspot.stg_hubspot__merged_deal"], "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610": ["model.hubspot.stg_hubspot__merged_deal"], "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95": ["model.hubspot.stg_hubspot__role"], "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759": ["model.hubspot.stg_hubspot__team"], "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a": ["model.hubspot.stg_hubspot__users"], "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4": ["model.hubspot.stg_hubspot__owner"], "source.hubspot.hubspot.calendar_event": [], "source.hubspot.hubspot.company": [], "source.hubspot.hubspot.company_list": [], "source.hubspot.hubspot.company_list_member": [], "source.hubspot.hubspot.company_property_history": [], "source.hubspot.hubspot.contact_merge_audit": [], "source.hubspot.hubspot.contact": [], "source.hubspot.hubspot.contact_form_submission": [], "source.hubspot.hubspot.contact_list": [], "source.hubspot.hubspot.contact_list_member": [], "source.hubspot.hubspot.contact_property_history": [], "source.hubspot.hubspot.deal": [], "source.hubspot.hubspot.deal_stage": [], "source.hubspot.hubspot.deal_company": [], "source.hubspot.hubspot.deal_contact": [], "source.hubspot.hubspot.deal_pipeline": [], "source.hubspot.hubspot.deal_pipeline_stage": [], "source.hubspot.hubspot.deal_property_history": [], "source.hubspot.hubspot.email_campaign": [], "source.hubspot.hubspot.email_event": [], "source.hubspot.hubspot.email_event_bounce": [], "source.hubspot.hubspot.email_event_click": [], "source.hubspot.hubspot.email_event_deferred": [], "source.hubspot.hubspot.email_event_delivered": [], "source.hubspot.hubspot.email_event_dropped": [], "source.hubspot.hubspot.email_event_forward": [], "source.hubspot.hubspot.email_event_open": [], "source.hubspot.hubspot.email_event_print": [], "source.hubspot.hubspot.email_event_sent": [], "source.hubspot.hubspot.email_event_spam_report": [], "source.hubspot.hubspot.email_event_status_change": [], "source.hubspot.hubspot.email_subscription": [], "source.hubspot.hubspot.email_subscription_change": [], "source.hubspot.hubspot.engagement": [], "source.hubspot.hubspot.engagement_call": [], "source.hubspot.hubspot.engagement_communication": [], "source.hubspot.hubspot.engagement_company": [], "source.hubspot.hubspot.engagement_contact": [], "source.hubspot.hubspot.engagement_deal": [], "source.hubspot.hubspot.engagement_email": [], "source.hubspot.hubspot.engagement_email_cc": [], "source.hubspot.hubspot.engagement_email_to": [], "source.hubspot.hubspot.engagement_meeting": [], "source.hubspot.hubspot.engagement_note": [], "source.hubspot.hubspot.engagement_task": [], "source.hubspot.hubspot.form": [], "source.hubspot.hubspot.submission_response": [], "source.hubspot.hubspot.owner": [], "source.hubspot.hubspot.property": [], "source.hubspot.hubspot.property_option": [], "source.hubspot.hubspot.ticket_company": [], "source.hubspot.hubspot.ticket_contact": [], "source.hubspot.hubspot.ticket_deal": [], "source.hubspot.hubspot.ticket_engagement": [], "source.hubspot.hubspot.ticket_pipeline_stage": [], "source.hubspot.hubspot.ticket_pipeline": [], "source.hubspot.hubspot.ticket_property_history": [], "source.hubspot.hubspot.ticket": [], "source.hubspot.hubspot.merged_deal": [], "source.hubspot.hubspot.owner_team": [], "source.hubspot.hubspot.role": [], "source.hubspot.hubspot.team": [], "source.hubspot.hubspot.team_user": [], "source.hubspot.hubspot.users": [], "source.hubspot.hubspot.conversation_actor": [], "source.hubspot.hubspot.conversation_inbox": [], "source.hubspot.hubspot.conversation_channel": [], "source.hubspot.hubspot.conversation_channel_account": [], "source.hubspot.hubspot.conversation_thread": [], "source.hubspot.hubspot.conversation_message_history": [], "source.hubspot.hubspot.marketing_event": [], "source.hubspot.hubspot.marketing_event_list": [], "source.hubspot.hubspot.marketing_event_participant": [], "source.hubspot.hubspot.marketing_event_custom_property": [], "source.hubspot.hubspot.conversation_message_recipient": []}, "child_map": {"seed.hubspot_integration_tests.engagement_call_data": [], "seed.hubspot_integration_tests.owner_data": [], "seed.hubspot_integration_tests.engagement_contact_data": [], "seed.hubspot_integration_tests.conversation_channel_data": [], "seed.hubspot_integration_tests.company_list_data": [], "seed.hubspot_integration_tests.contact_list_member_data": [], "seed.hubspot_integration_tests.contact_merge_audit_data": [], "seed.hubspot_integration_tests.company_property_history_data": [], "seed.hubspot_integration_tests.engagement_company_data": [], "seed.hubspot_integration_tests.property_option_data": [], "seed.hubspot_integration_tests.engagement_note_data": [], "seed.hubspot_integration_tests.ticket_engagement_data": [], "seed.hubspot_integration_tests.conversation_inbox_data": [], "seed.hubspot_integration_tests.conversation_channel_account_data": [], "seed.hubspot_integration_tests.email_event_dropped_data_postgres": [], "seed.hubspot_integration_tests.email_event_spam_report_data": [], "seed.hubspot_integration_tests.conversation_actor_data": [], "seed.hubspot_integration_tests.users_data": [], "seed.hubspot_integration_tests.deal_data": [], "seed.hubspot_integration_tests.ticket_company_data": [], "seed.hubspot_integration_tests.marketing_event_participant_data": [], "seed.hubspot_integration_tests.submission_response_data": [], "seed.hubspot_integration_tests.engagement_email_data": [], "seed.hubspot_integration_tests.marketing_event_list_data": [], "seed.hubspot_integration_tests.contact_data": [], "seed.hubspot_integration_tests.deal_contact_data": [], "seed.hubspot_integration_tests.team_data": [], "seed.hubspot_integration_tests.contact_property_history_data": [], "seed.hubspot_integration_tests.email_campaign_data": [], "seed.hubspot_integration_tests.contact_list_data": [], "seed.hubspot_integration_tests.ticket_pipeline_data": [], "seed.hubspot_integration_tests.conversation_message_history_data": [], "seed.hubspot_integration_tests.email_event_delivered_data": [], "seed.hubspot_integration_tests.marketing_event_data": [], "seed.hubspot_integration_tests.company_data_postgres": [], "seed.hubspot_integration_tests.engagement_data": [], "seed.hubspot_integration_tests.role_data": [], "seed.hubspot_integration_tests.company_list_member_data": [], "seed.hubspot_integration_tests.conversation_thread_data": [], "seed.hubspot_integration_tests.deal_stage_data": [], "seed.hubspot_integration_tests.ticket_property_history_data": [], "seed.hubspot_integration_tests.deal_property_history_data": [], "seed.hubspot_integration_tests.ticket_data": [], "seed.hubspot_integration_tests.email_event_open_data": [], "seed.hubspot_integration_tests.property_data": [], "seed.hubspot_integration_tests.email_event_sent_data_postgres": [], "seed.hubspot_integration_tests.email_event_click_data": [], "seed.hubspot_integration_tests.email_event_deferred_data": [], "seed.hubspot_integration_tests.deal_company_data": [], "seed.hubspot_integration_tests.team_user_data": [], "seed.hubspot_integration_tests.deal_pipeline_stage_data": [], "seed.hubspot_integration_tests.owner_team_data": [], "seed.hubspot_integration_tests.engagement_meeting_data": [], "seed.hubspot_integration_tests.deal_pipeline_data": [], "seed.hubspot_integration_tests.email_event_status_change_data": [], "seed.hubspot_integration_tests.engagement_task_data": [], "seed.hubspot_integration_tests.ticket_deal_data": [], "seed.hubspot_integration_tests.engagement_deal_data": [], "seed.hubspot_integration_tests.contact_form_submission_data": [], "seed.hubspot_integration_tests.email_event_bounce_data": [], "seed.hubspot_integration_tests.ticket_pipeline_stage_data": [], "seed.hubspot_integration_tests.email_event_print_data": [], "seed.hubspot_integration_tests.merged_deal_data": [], "seed.hubspot_integration_tests.form_data": [], "seed.hubspot_integration_tests.email_event_forward_data": [], "seed.hubspot_integration_tests.ticket_contact_data": [], "seed.hubspot_integration_tests.engagement_communication_data": [], "seed.hubspot_integration_tests.marketing_event_custom_property_data": [], "seed.hubspot_integration_tests.email_event_data": [], "seed.hubspot_integration_tests.conversation_message_recipient_data": [], "model.hubspot.hubspot__contact_lists": ["test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891"], "model.hubspot.hubspot__email_campaigns": ["test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0"], "model.hubspot.hubspot__contacts": ["test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3"], "model.hubspot.hubspot__marketing_event_performance": ["test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb", "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712"], "model.hubspot.hubspot__email_sends": ["model.hubspot.hubspot__contact_lists", "model.hubspot.hubspot__contacts", "model.hubspot.hubspot__email_campaigns", "model.hubspot.int_hubspot__email_metrics__by_contact_list", "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3"], "model.hubspot.hubspot__email_event_spam_report": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a"], "model.hubspot.hubspot__email_event_status_change": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "model.hubspot.int_hubspot__email_aggregate_status_change", "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3"], "model.hubspot.hubspot__email_event_dropped": ["test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95"], "model.hubspot.hubspot__email_event_bounce": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5"], "model.hubspot.hubspot__email_event_delivered": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3"], "model.hubspot.hubspot__email_event_forward": ["test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08"], "model.hubspot.hubspot__email_event_deferred": ["test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91"], "model.hubspot.hubspot__email_event_clicks": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0"], "model.hubspot.hubspot__email_event_sent": ["model.hubspot.hubspot__email_sends", "model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9"], "model.hubspot.hubspot__email_event_print": ["test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e"], "model.hubspot.hubspot__email_event_opens": ["model.hubspot.int_hubspot__daily_email_metrics__by_contact", "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1"], "model.hubspot.int_hubspot__contact_merge_adjust": ["model.hubspot.hubspot__contacts", "model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_deferred", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_dropped", "model.hubspot.hubspot__email_event_forward", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_print", "model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change"], "model.hubspot.int_hubspot__form_metrics__by_contact": ["model.hubspot.hubspot__contacts"], "model.hubspot.int_hubspot__email_aggregate_status_change": ["model.hubspot.hubspot__email_sends", "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111", "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a"], "model.hubspot.int_hubspot__email_metrics__by_contact_list": ["model.hubspot.hubspot__contact_lists", "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2"], "model.hubspot.int_hubspot__contact_calendar_spine": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__daily_email_metrics__by_contact": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__scd_daily_contact_history": ["model.hubspot.hubspot__daily_contact_history"], "model.hubspot.int_hubspot__engagement_metrics__by_contact": ["model.hubspot.hubspot__contacts", "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b"], "model.hubspot.int_hubspot__pivot_daily_contact_history": ["model.hubspot.int_hubspot__scd_daily_contact_history"], "model.hubspot.int_hubspot__email_event_aggregates": ["model.hubspot.hubspot__email_sends", "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a"], "model.hubspot.int_hubspot__daily_contact_history": ["model.hubspot.int_hubspot__pivot_daily_contact_history"], "model.hubspot.hubspot__contact_history": ["test.hubspot.not_null_hubspot__contact_history_id.eaae22e088", "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec"], "model.hubspot.hubspot__daily_contact_history": ["test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d", "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba"], "model.hubspot.int_hubspot__owners_enhanced": ["model.hubspot.hubspot__conversations", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__deals_enhanced"], "model.hubspot.hubspot__conversations": ["test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084"], "model.hubspot.hubspot__daily_ticket_history": ["test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e", "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c"], "model.hubspot.hubspot__tickets": ["test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7"], "model.hubspot.int_hubspot__daily_ticket_history": ["model.hubspot.int_hubspot__pivot_daily_ticket_history"], "model.hubspot.int_hubspot__ticket_calendar_spine": ["model.hubspot.hubspot__daily_ticket_history"], "model.hubspot.int_hubspot__scd_daily_ticket_history": ["model.hubspot.hubspot__daily_ticket_history"], "model.hubspot.int_hubspot__pivot_daily_ticket_history": ["model.hubspot.int_hubspot__scd_daily_ticket_history"], "model.hubspot.hubspot__deal_stages": ["test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b"], "model.hubspot.hubspot__companies": ["test.hubspot.not_null_hubspot__companies_company_id.687ec98e97"], "model.hubspot.hubspot__company_lists": ["test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f"], "model.hubspot.hubspot__deals": ["test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd"], "model.hubspot.hubspot__engagements": ["model.hubspot.hubspot__companies", "model.hubspot.hubspot__deals", "model.hubspot.hubspot__engagement_calls", "model.hubspot.hubspot__engagement_communication", "model.hubspot.hubspot__engagement_emails", "model.hubspot.hubspot__engagement_meetings", "model.hubspot.hubspot__engagement_notes", "model.hubspot.hubspot__engagement_tasks", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__engagement_metrics__by_company_list", "model.hubspot.int_hubspot__engagement_metrics__by_contact", "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7"], "model.hubspot.hubspot__engagement_meetings": ["test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df"], "model.hubspot.hubspot__engagement_calls": ["test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f"], "model.hubspot.hubspot__engagement_notes": ["test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965"], "model.hubspot.hubspot__engagement_communication": ["test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095"], "model.hubspot.hubspot__engagement_emails": ["test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09"], "model.hubspot.hubspot__engagement_tasks": ["test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae"], "model.hubspot.int_hubspot__daily_deal_history": ["model.hubspot.int_hubspot__pivot_daily_deal_history"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal": ["model.hubspot.hubspot__daily_deal_history"], "model.hubspot.int_hubspot__scd_daily_company_history": ["model.hubspot.hubspot__daily_company_history"], "model.hubspot.int_hubspot__deals_enhanced": ["model.hubspot.hubspot__deal_stages", "model.hubspot.hubspot__deals"], "model.hubspot.int_hubspot__daily_engagement_metrics__by_company": ["model.hubspot.hubspot__daily_company_history"], "model.hubspot.int_hubspot__scd_daily_deal_history": ["model.hubspot.hubspot__daily_deal_history"], "model.hubspot.int_hubspot__pivot_daily_deal_history": ["model.hubspot.int_hubspot__scd_daily_deal_history"], "model.hubspot.int_hubspot__company_calendar_spine": ["model.hubspot.hubspot__daily_company_history"], "model.hubspot.int_hubspot__daily_company_history": ["model.hubspot.int_hubspot__pivot_daily_company_history"], "model.hubspot.int_hubspot__engagement_metrics__by_company_list": ["model.hubspot.hubspot__company_lists"], "model.hubspot.int_hubspot__deal_calendar_spine": ["model.hubspot.hubspot__daily_deal_history"], "model.hubspot.int_hubspot__pivot_daily_company_history": ["model.hubspot.int_hubspot__scd_daily_company_history"], "model.hubspot.hubspot__deal_history": ["model.hubspot.int_hubspot__daily_deal_history", "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75", "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79"], "model.hubspot.hubspot__daily_company_history": ["test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794", "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe"], "model.hubspot.hubspot__daily_deal_history": ["test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256", "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8"], "model.hubspot.hubspot__company_history": ["test.hubspot.not_null_hubspot__company_history_id.33035793ff", "test.hubspot.unique_hubspot__company_history_id.f1af964b1f"], "model.hubspot.stg_hubspot__ticket_pipeline": ["model.hubspot.hubspot__daily_ticket_history", "model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__owner": ["model.hubspot.hubspot__daily_company_history", "model.hubspot.hubspot__daily_contact_history", "model.hubspot.hubspot__daily_deal_history", "model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4"], "model.hubspot.stg_hubspot__engagement_communication": ["model.hubspot.hubspot__engagement_communication", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b"], "model.hubspot.stg_hubspot__email_event_dropped": ["model.hubspot.hubspot__email_event_dropped", "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52"], "model.hubspot.stg_hubspot__engagement_company": ["model.hubspot.hubspot__companies", "model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__engagement_metrics__by_company_list"], "model.hubspot.stg_hubspot__email_event_click": ["model.hubspot.hubspot__email_event_clicks", "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5"], "model.hubspot.stg_hubspot__email_event_delivered": ["model.hubspot.hubspot__email_event_delivered", "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20"], "model.hubspot.stg_hubspot__merged_deal": ["model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610", "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9"], "model.hubspot.stg_hubspot__users": ["model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a"], "model.hubspot.stg_hubspot__ticket_property_history": ["model.hubspot.int_hubspot__daily_ticket_history"], "model.hubspot.stg_hubspot__ticket_contact": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__role": ["model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95"], "model.hubspot.stg_hubspot__deal_property_history": ["model.hubspot.hubspot__deal_history"], "model.hubspot.stg_hubspot__company_list": ["model.hubspot.hubspot__company_lists", "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3"], "model.hubspot.stg_hubspot__team": ["model.hubspot.hubspot__daily_deal_history", "model.hubspot.int_hubspot__owners_enhanced", "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759"], "model.hubspot.stg_hubspot__property_option": [], "model.hubspot.stg_hubspot__deal_contact": [], "model.hubspot.stg_hubspot__company": ["model.hubspot.hubspot__companies", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__company_calendar_spine", "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43"], "model.hubspot.stg_hubspot__ticket": ["model.hubspot.hubspot__conversations", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__ticket_calendar_spine", "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53"], "model.hubspot.stg_hubspot__contact_list": ["model.hubspot.hubspot__contact_lists", "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a"], "model.hubspot.stg_hubspot__email_event_spam_report": ["model.hubspot.hubspot__email_event_spam_report", "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f"], "model.hubspot.stg_hubspot__engagement_meeting": ["model.hubspot.hubspot__engagement_meetings", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28"], "model.hubspot.stg_hubspot__contact_form_submission": ["model.hubspot.int_hubspot__form_metrics__by_contact"], "model.hubspot.stg_hubspot__deal_stage": ["model.hubspot.hubspot__deal_stages", "model.hubspot.int_hubspot__daily_deal_history"], "model.hubspot.stg_hubspot__email_event": ["model.hubspot.hubspot__email_event_bounce", "model.hubspot.hubspot__email_event_clicks", "model.hubspot.hubspot__email_event_deferred", "model.hubspot.hubspot__email_event_delivered", "model.hubspot.hubspot__email_event_dropped", "model.hubspot.hubspot__email_event_forward", "model.hubspot.hubspot__email_event_opens", "model.hubspot.hubspot__email_event_print", "model.hubspot.hubspot__email_event_sent", "model.hubspot.hubspot__email_event_spam_report", "model.hubspot.hubspot__email_event_status_change", "model.hubspot.int_hubspot__email_event_aggregates", "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531"], "model.hubspot.stg_hubspot__conversation_channel": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf"], "model.hubspot.stg_hubspot__engagement_deal": ["model.hubspot.hubspot__deals", "model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal"], "model.hubspot.stg_hubspot__company_list_member": ["model.hubspot.hubspot__company_lists", "model.hubspot.int_hubspot__engagement_metrics__by_company_list"], "model.hubspot.stg_hubspot__email_event_bounce": ["model.hubspot.hubspot__email_event_bounce", "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3"], "model.hubspot.stg_hubspot__engagement_task": ["model.hubspot.hubspot__engagement_tasks", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82"], "model.hubspot.stg_hubspot__marketing_event_list": ["model.hubspot.hubspot__marketing_event_performance", "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a"], "model.hubspot.stg_hubspot__engagement_email": ["model.hubspot.hubspot__engagement_emails", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca"], "model.hubspot.stg_hubspot__form": ["model.hubspot.int_hubspot__form_metrics__by_contact", "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65"], "model.hubspot.stg_hubspot__ticket_deal": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__contact_property_history": ["model.hubspot.hubspot__contact_history", "model.hubspot.int_hubspot__daily_contact_history"], "model.hubspot.stg_hubspot__email_event_forward": ["model.hubspot.hubspot__email_event_forward", "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3"], "model.hubspot.stg_hubspot__conversation_thread": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398"], "model.hubspot.stg_hubspot__email_event_deferred": ["model.hubspot.hubspot__email_event_deferred", "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0"], "model.hubspot.stg_hubspot__email_event_open": ["model.hubspot.hubspot__email_event_opens", "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16"], "model.hubspot.stg_hubspot__conversation_message_recipient": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b"], "model.hubspot.stg_hubspot__marketing_event_participant": ["model.hubspot.hubspot__marketing_event_performance", "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b"], "model.hubspot.stg_hubspot__email_event_sent": ["model.hubspot.hubspot__email_event_sent", "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d"], "model.hubspot.stg_hubspot__marketing_event_custom_property": [], "model.hubspot.stg_hubspot__conversation_message_history": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e"], "model.hubspot.stg_hubspot__deal_pipeline_stage": ["model.hubspot.hubspot__daily_deal_history", "model.hubspot.hubspot__deal_stages", "model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e"], "model.hubspot.stg_hubspot__engagement": ["model.hubspot.hubspot__engagements", "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f"], "model.hubspot.stg_hubspot__owner_team": ["model.hubspot.int_hubspot__owners_enhanced"], "model.hubspot.stg_hubspot__deal_pipeline": ["model.hubspot.hubspot__daily_deal_history", "model.hubspot.hubspot__deal_stages", "model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3"], "model.hubspot.stg_hubspot__conversation_channel_account": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb"], "model.hubspot.stg_hubspot__company_property_history": ["model.hubspot.hubspot__company_history", "model.hubspot.int_hubspot__daily_company_history"], "model.hubspot.stg_hubspot__marketing_event": ["model.hubspot.hubspot__marketing_event_performance", "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0"], "model.hubspot.stg_hubspot__contact_merge_audit": ["model.hubspot.int_hubspot__contact_merge_adjust"], "model.hubspot.stg_hubspot__deal": ["model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__deal_calendar_spine", "model.hubspot.int_hubspot__deals_enhanced", "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20"], "model.hubspot.stg_hubspot__email_campaign": ["model.hubspot.hubspot__email_campaigns", "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6"], "model.hubspot.stg_hubspot__engagement_contact": ["model.hubspot.hubspot__engagements", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__engagement_metrics__by_contact"], "model.hubspot.stg_hubspot__team_user": [], "model.hubspot.stg_hubspot__email_event_status_change": ["model.hubspot.hubspot__email_event_status_change", "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1"], "model.hubspot.stg_hubspot__ticket_pipeline_stage": ["model.hubspot.hubspot__daily_ticket_history", "model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__conversation_actor": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea"], "model.hubspot.stg_hubspot__contact_list_member": ["model.hubspot.int_hubspot__email_metrics__by_contact_list"], "model.hubspot.stg_hubspot__engagement_note": ["model.hubspot.hubspot__engagement_notes", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e"], "model.hubspot.stg_hubspot__engagement_call": ["model.hubspot.hubspot__engagement_calls", "model.hubspot.int_hubspot__daily_engagement_metrics__by_company", "model.hubspot.int_hubspot__daily_engagement_metrics__by_contact", "model.hubspot.int_hubspot__daily_engagement_metrics__by_deal", "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf"], "model.hubspot.stg_hubspot__submission_response": ["model.hubspot.int_hubspot__form_metrics__by_contact", "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7"], "model.hubspot.stg_hubspot__property": [], "model.hubspot.stg_hubspot__ticket_engagement": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__conversation_inbox": ["model.hubspot.hubspot__conversations", "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b"], "model.hubspot.stg_hubspot__contact": ["model.hubspot.hubspot__conversations", "model.hubspot.hubspot__tickets", "model.hubspot.int_hubspot__contact_calendar_spine", "model.hubspot.int_hubspot__contact_merge_adjust", "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944"], "model.hubspot.stg_hubspot__email_event_print": ["model.hubspot.hubspot__email_event_print", "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b"], "model.hubspot.stg_hubspot__deal_company": [], "model.hubspot.stg_hubspot__ticket_company": ["model.hubspot.hubspot__tickets"], "model.hubspot.stg_hubspot__engagement_deal_tmp": ["model.hubspot.stg_hubspot__engagement_deal"], "model.hubspot.stg_hubspot__email_event_print_tmp": ["model.hubspot.stg_hubspot__email_event_print"], "model.hubspot.stg_hubspot__engagement_communication_tmp": ["model.hubspot.stg_hubspot__engagement_communication"], "model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp": ["model.hubspot.stg_hubspot__ticket_pipeline_stage"], "model.hubspot.stg_hubspot__engagement_email_tmp": ["model.hubspot.stg_hubspot__engagement_email"], "model.hubspot.stg_hubspot__engagement_tmp": ["model.hubspot.stg_hubspot__engagement"], "model.hubspot.stg_hubspot__email_event_click_tmp": ["model.hubspot.stg_hubspot__email_event_click"], "model.hubspot.stg_hubspot__company_property_history_tmp": ["model.hubspot.stg_hubspot__company_property_history"], "model.hubspot.stg_hubspot__conversation_thread_tmp": ["model.hubspot.stg_hubspot__conversation_thread"], "model.hubspot.stg_hubspot__marketing_event_list_tmp": ["model.hubspot.stg_hubspot__marketing_event_list"], "model.hubspot.stg_hubspot__deal_pipeline_tmp": ["model.hubspot.stg_hubspot__deal_pipeline"], "model.hubspot.stg_hubspot__merged_deal_tmp": ["model.hubspot.stg_hubspot__merged_deal"], "model.hubspot.stg_hubspot__conversation_channel_account_tmp": ["model.hubspot.stg_hubspot__conversation_channel_account"], "model.hubspot.stg_hubspot__deal_contact_tmp": ["model.hubspot.stg_hubspot__deal_contact"], "model.hubspot.stg_hubspot__deal_company_tmp": ["model.hubspot.stg_hubspot__deal_company"], "model.hubspot.stg_hubspot__role_tmp": ["model.hubspot.stg_hubspot__role"], "model.hubspot.stg_hubspot__marketing_event_participant_tmp": ["model.hubspot.stg_hubspot__marketing_event_participant"], "model.hubspot.stg_hubspot__ticket_engagement_tmp": ["model.hubspot.stg_hubspot__ticket_engagement"], "model.hubspot.stg_hubspot__contact_form_submission_tmp": ["model.hubspot.stg_hubspot__contact_form_submission"], "model.hubspot.stg_hubspot__marketing_event_tmp": ["model.hubspot.stg_hubspot__marketing_event"], "model.hubspot.stg_hubspot__conversation_message_history_tmp": ["model.hubspot.stg_hubspot__conversation_message_history"], "model.hubspot.stg_hubspot__engagement_call_tmp": ["model.hubspot.stg_hubspot__engagement_call"], "model.hubspot.stg_hubspot__ticket_deal_tmp": ["model.hubspot.stg_hubspot__ticket_deal"], "model.hubspot.stg_hubspot__company_list_member_tmp": ["model.hubspot.stg_hubspot__company_list_member"], "model.hubspot.stg_hubspot__engagement_note_tmp": ["model.hubspot.stg_hubspot__engagement_note"], "model.hubspot.stg_hubspot__conversation_inbox_tmp": ["model.hubspot.stg_hubspot__conversation_inbox"], "model.hubspot.stg_hubspot__ticket_contact_tmp": ["model.hubspot.stg_hubspot__ticket_contact"], "model.hubspot.stg_hubspot__ticket_pipeline_tmp": ["model.hubspot.stg_hubspot__ticket_pipeline"], "model.hubspot.stg_hubspot__email_event_open_tmp": ["model.hubspot.stg_hubspot__email_event_open"], "model.hubspot.stg_hubspot__company_tmp": ["model.hubspot.stg_hubspot__company"], "model.hubspot.stg_hubspot__deal_stage_tmp": ["model.hubspot.stg_hubspot__deal_stage"], "model.hubspot.stg_hubspot__deal_tmp": ["model.hubspot.stg_hubspot__deal"], "model.hubspot.stg_hubspot__conversation_channel_tmp": ["model.hubspot.stg_hubspot__conversation_channel"], "model.hubspot.stg_hubspot__email_event_delivered_tmp": ["model.hubspot.stg_hubspot__email_event_delivered"], "model.hubspot.stg_hubspot__property_option_tmp": ["model.hubspot.stg_hubspot__property_option"], "model.hubspot.stg_hubspot__email_event_sent_tmp": ["model.hubspot.stg_hubspot__email_event_sent"], "model.hubspot.stg_hubspot__property_tmp": ["model.hubspot.stg_hubspot__property"], "model.hubspot.stg_hubspot__ticket_tmp": ["model.hubspot.int_hubspot__ticket_calendar_spine", "model.hubspot.stg_hubspot__ticket"], "model.hubspot.stg_hubspot__engagement_meeting_tmp": ["model.hubspot.stg_hubspot__engagement_meeting"], "model.hubspot.stg_hubspot__email_event_deferred_tmp": ["model.hubspot.stg_hubspot__email_event_deferred"], "model.hubspot.stg_hubspot__contact_property_history_tmp": ["model.hubspot.stg_hubspot__contact_property_history"], "model.hubspot.stg_hubspot__ticket_company_tmp": ["model.hubspot.stg_hubspot__ticket_company"], "model.hubspot.stg_hubspot__email_event_status_change_tmp": ["model.hubspot.stg_hubspot__email_event_status_change"], "model.hubspot.stg_hubspot__contact_merge_audit_tmp": ["model.hubspot.stg_hubspot__contact_merge_audit"], "model.hubspot.stg_hubspot__contact_list_tmp": ["model.hubspot.stg_hubspot__contact_list"], "model.hubspot.stg_hubspot__conversation_actor_tmp": ["model.hubspot.stg_hubspot__conversation_actor"], "model.hubspot.stg_hubspot__email_event_tmp": ["model.hubspot.stg_hubspot__email_event"], "model.hubspot.stg_hubspot__deal_pipeline_stage_tmp": ["model.hubspot.stg_hubspot__deal_pipeline_stage"], "model.hubspot.stg_hubspot__email_campaign_tmp": ["model.hubspot.stg_hubspot__email_campaign"], "model.hubspot.stg_hubspot__team_user_tmp": ["model.hubspot.stg_hubspot__team_user"], "model.hubspot.stg_hubspot__engagement_company_tmp": ["model.hubspot.stg_hubspot__engagement_company"], "model.hubspot.stg_hubspot__marketing_event_custom_property_tmp": ["model.hubspot.stg_hubspot__marketing_event_custom_property"], "model.hubspot.stg_hubspot__owner_team_tmp": ["model.hubspot.stg_hubspot__owner_team"], "model.hubspot.stg_hubspot__email_event_forward_tmp": ["model.hubspot.stg_hubspot__email_event_forward"], "model.hubspot.stg_hubspot__email_event_dropped_tmp": ["model.hubspot.stg_hubspot__email_event_dropped"], "model.hubspot.stg_hubspot__team_tmp": ["model.hubspot.stg_hubspot__team"], "model.hubspot.stg_hubspot__users_tmp": ["model.hubspot.stg_hubspot__users"], "model.hubspot.stg_hubspot__engagement_task_tmp": ["model.hubspot.stg_hubspot__engagement_task"], "model.hubspot.stg_hubspot__contact_tmp": ["model.hubspot.stg_hubspot__contact"], "model.hubspot.stg_hubspot__submission_response_tmp": ["model.hubspot.stg_hubspot__submission_response"], "model.hubspot.stg_hubspot__ticket_property_history_tmp": ["model.hubspot.stg_hubspot__ticket_property_history"], "model.hubspot.stg_hubspot__email_event_bounce_tmp": ["model.hubspot.stg_hubspot__email_event_bounce"], "model.hubspot.stg_hubspot__contact_list_member_tmp": ["model.hubspot.stg_hubspot__contact_list_member"], "model.hubspot.stg_hubspot__company_list_tmp": ["model.hubspot.stg_hubspot__company_list"], "model.hubspot.stg_hubspot__email_event_spam_report_tmp": ["model.hubspot.stg_hubspot__email_event_spam_report"], "model.hubspot.stg_hubspot__deal_property_history_tmp": ["model.hubspot.stg_hubspot__deal_property_history"], "model.hubspot.stg_hubspot__form_tmp": ["model.hubspot.stg_hubspot__form"], "model.hubspot.stg_hubspot__engagement_contact_tmp": ["model.hubspot.stg_hubspot__engagement_contact"], "model.hubspot.stg_hubspot__owner_tmp": ["model.hubspot.stg_hubspot__owner"], "model.hubspot.stg_hubspot__conversation_message_recipient_tmp": ["model.hubspot.stg_hubspot__conversation_message_recipient"], "test.hubspot.not_null_hubspot__marketing_event_performance_marketing_event_performance_id.8b629151cb": [], "test.hubspot.unique_hubspot__marketing_event_performance_marketing_event_performance_id.b87b5be712": [], "test.hubspot.not_null_hubspot__email_sends_event_id.9fc8a8bef3": [], "test.hubspot.not_null_hubspot__email_campaigns_email_campaign_id.6b2d6f43c0": [], "test.hubspot.not_null_hubspot__contacts_contact_id.e28e88dce3": [], "test.hubspot.not_null_hubspot__contact_lists_contact_list_id.3bde1bb891": [], "test.hubspot.not_null_hubspot__email_event_bounce_event_id.39d8daa6f5": [], "test.hubspot.not_null_hubspot__email_event_clicks_event_id.f603501ca0": [], "test.hubspot.not_null_hubspot__email_event_deferred_event_id.2c6decaa91": [], "test.hubspot.not_null_hubspot__email_event_delivered_event_id.0609870be3": [], "test.hubspot.not_null_hubspot__email_event_dropped_event_id.5cfe4eeb95": [], "test.hubspot.not_null_hubspot__email_event_forward_event_id.417a73da08": [], "test.hubspot.not_null_hubspot__email_event_opens_event_id.a9fe279ee1": [], "test.hubspot.not_null_hubspot__email_event_print_event_id.9dac8a147e": [], "test.hubspot.not_null_hubspot__email_event_sent_event_id.5507dcc5b9": [], "test.hubspot.not_null_hubspot__email_event_spam_report_event_id.5ddca8771a": [], "test.hubspot.not_null_hubspot__email_event_status_change_event_id.a1737e44b3": [], "test.hubspot.unique_int_hubspot__email_aggregate_status_change_unique_key.db34784c2a": [], "test.hubspot.not_null_int_hubspot__email_aggregate_status_change_unique_key.11db4e6111": [], "test.hubspot.not_null_int_hubspot__email_metrics__by_contact_list_contact_list_id.1d3cf4caf2": [], "test.hubspot.not_null_int_hubspot__email_event_aggregates_email_send_id.ac29e6997a": [], "test.hubspot.not_null_int_hubspot__engagement_metrics__by_contact_contact_id.4a800df06b": [], "test.hubspot.unique_hubspot__daily_contact_history_contact_day_id.dea13820ba": [], "test.hubspot.not_null_hubspot__daily_contact_history_contact_day_id.54916c8e8d": [], "test.hubspot.unique_hubspot__contact_history_id.aef69ae1ec": [], "test.hubspot.not_null_hubspot__contact_history_id.eaae22e088": [], "test.hubspot.unique_hubspot__daily_ticket_history_ticket_day_id.294440dc9c": [], "test.hubspot.not_null_hubspot__daily_ticket_history_ticket_day_id.087496580e": [], "test.hubspot.not_null_hubspot__tickets_ticket_id.259c6846d7": [], "test.hubspot.not_null_hubspot__conversations_conversation_thread_id.bec1fbb084": [], "test.hubspot.not_null_hubspot__company_lists_company_list_id.2fff85156f": [], "test.hubspot.not_null_hubspot__deals_deal_id.bdbfe47fcd": [], "test.hubspot.not_null_hubspot__deal_stages_deal_stage_id.162d2d204b": [], "test.hubspot.not_null_hubspot__companies_company_id.687ec98e97": [], "test.hubspot.not_null_hubspot__engagements_engagement_id.59b32bc0d7": [], "test.hubspot.not_null_hubspot__engagement_calls_engagement_id.00f8d8357f": [], "test.hubspot.not_null_hubspot__engagement_communication_engagement_id.46a16d0095": [], "test.hubspot.not_null_hubspot__engagement_emails_engagement_id.13a39d1e09": [], "test.hubspot.not_null_hubspot__engagement_meetings_engagement_id.83a791c3df": [], "test.hubspot.not_null_hubspot__engagement_notes_engagement_id.76434ac965": [], "test.hubspot.not_null_hubspot__engagement_tasks_engagement_id.67738794ae": [], "test.hubspot.unique_hubspot__daily_deal_history_deal_day_id.8003fd4ba8": [], "test.hubspot.not_null_hubspot__daily_deal_history_deal_day_id.cfb0df8256": [], "test.hubspot.unique_hubspot__daily_company_history_company_day_id.3215ca8fbe": [], "test.hubspot.not_null_hubspot__daily_company_history_company_day_id.c62943c794": [], "test.hubspot.unique_hubspot__company_history_id.f1af964b1f": [], "test.hubspot.not_null_hubspot__company_history_id.33035793ff": [], "test.hubspot.unique_hubspot__deal_history_id.1cb93fca79": [], "test.hubspot.not_null_hubspot__deal_history_id.a1c6cd6a75": [], "test.hubspot.not_null_stg_hubspot__form_form_id.61c14dfa65": [], "test.hubspot.not_null_stg_hubspot__submission_response_conversion_id.dfac51dbe7": [], "test.hubspot.not_null_stg_hubspot__email_event_bounce_event_id.71b13d26d3": [], "test.hubspot.not_null_stg_hubspot__email_event_click_event_id.8a1be931c5": [], "test.hubspot.not_null_stg_hubspot__email_event_deferred_event_id.80293078e0": [], "test.hubspot.not_null_stg_hubspot__email_event_delivered_event_id.87c8eb3f20": [], "test.hubspot.not_null_stg_hubspot__email_event_dropped_event_id.c92d449f52": [], "test.hubspot.not_null_stg_hubspot__email_event_forward_event_id.b9a8bf63b3": [], "test.hubspot.not_null_stg_hubspot__email_event_open_event_id.a2e658fe16": [], "test.hubspot.not_null_stg_hubspot__email_event_print_event_id.94d4e09b3b": [], "test.hubspot.not_null_stg_hubspot__email_event_sent_event_id.cf77d9f15d": [], "test.hubspot.not_null_stg_hubspot__email_event_spam_report_event_id.2a56aced8f": [], "test.hubspot.not_null_stg_hubspot__email_event_status_change_event_id.c5e80297b1": [], "test.hubspot.not_null_stg_hubspot__email_event_event_id.4f287f3531": [], "test.hubspot.not_null_stg_hubspot__email_campaign_email_campaign_id.79921899a6": [], "test.hubspot.not_null_stg_hubspot__contact_list_contact_list_id.ff8e4cc29a": [], "test.hubspot.not_null_stg_hubspot__contact_contact_id.9f112f8944": [], "test.hubspot.not_null_stg_hubspot__engagement_call_engagement_id.5ceb3917bf": [], "test.hubspot.not_null_stg_hubspot__engagement_communication_engagement_id.c5263ed19b": [], "test.hubspot.not_null_stg_hubspot__engagement_email_engagement_id.175561ecca": [], "test.hubspot.not_null_stg_hubspot__engagement_meeting_engagement_id.18dd11dc28": [], "test.hubspot.not_null_stg_hubspot__engagement_note_engagement_id.244059891e": [], "test.hubspot.not_null_stg_hubspot__engagement_task_engagement_id.0bbd752d82": [], "test.hubspot.not_null_stg_hubspot__engagement_engagement_id.b26f4d328f": [], "test.hubspot.not_null_stg_hubspot__company_list_company_list_id.530c96a3b3": [], "test.hubspot.not_null_stg_hubspot__company_company_id.0d0a080d43": [], "test.hubspot.not_null_stg_hubspot__marketing_event_marketing_event_id.9709b8dbe0": [], "test.hubspot.not_null_stg_hubspot__marketing_event_list_marketing_event_list_id.a5bc1b9f7a": [], "test.hubspot.not_null_stg_hubspot__marketing_event_participant_marketing_event_participant_id.9e3c325c0b": [], "test.hubspot.not_null_stg_hubspot__conversation_actor_actor_id.aef1c209ea": [], "test.hubspot.not_null_stg_hubspot__conversation_inbox_inbox_id.752db0c77b": [], "test.hubspot.not_null_stg_hubspot__conversation_channel_channel_id.4056199aaf": [], "test.hubspot.not_null_stg_hubspot__conversation_channel_account_channel_account_id.618045f7fb": [], "test.hubspot.not_null_stg_hubspot__conversation_thread_conversation_thread_id.062fe24398": [], "test.hubspot.not_null_stg_hubspot__conversation_message_history_message_id.340a35be7e": [], "test.hubspot.not_null_stg_hubspot__conversation_message_recipient__fivetran_id.7b9b240a4b": [], "test.hubspot.not_null_stg_hubspot__ticket_ticket_id.299e7c4c53": [], "test.hubspot.not_null_stg_hubspot__deal_pipeline_stage_deal_pipeline_stage_id.d53656553e": [], "test.hubspot.not_null_stg_hubspot__deal_pipeline_deal_pipeline_id.8a0e3cd7a3": [], "test.hubspot.not_null_stg_hubspot__deal_deal_id.ff48693e20": [], "test.hubspot.not_null_stg_hubspot__merged_deal_merged_deal_id.c2d24039b9": [], "test.hubspot.not_null_stg_hubspot__merged_deal_deal_id.a843ca0610": [], "test.hubspot.not_null_stg_hubspot__role_role_id.d91bfe7f95": [], "test.hubspot.not_null_stg_hubspot__team_team_id.94eae38759": [], "test.hubspot.not_null_stg_hubspot__users_user_id.c188db944a": [], "test.hubspot.not_null_stg_hubspot__owner_owner_id.8fddc566c4": [], "source.hubspot.hubspot.calendar_event": [], "source.hubspot.hubspot.company": ["model.hubspot.stg_hubspot__company_tmp"], "source.hubspot.hubspot.company_list": ["model.hubspot.stg_hubspot__company_list_tmp"], "source.hubspot.hubspot.company_list_member": ["model.hubspot.stg_hubspot__company_list_member_tmp"], "source.hubspot.hubspot.company_property_history": ["model.hubspot.stg_hubspot__company_property_history_tmp"], "source.hubspot.hubspot.contact_merge_audit": ["model.hubspot.stg_hubspot__contact_merge_audit_tmp"], "source.hubspot.hubspot.contact": ["model.hubspot.stg_hubspot__contact_tmp"], "source.hubspot.hubspot.contact_form_submission": ["model.hubspot.stg_hubspot__contact_form_submission_tmp"], "source.hubspot.hubspot.contact_list": ["model.hubspot.stg_hubspot__contact_list_tmp"], "source.hubspot.hubspot.contact_list_member": ["model.hubspot.stg_hubspot__contact_list_member_tmp"], "source.hubspot.hubspot.contact_property_history": ["model.hubspot.stg_hubspot__contact_property_history_tmp"], "source.hubspot.hubspot.deal": ["model.hubspot.stg_hubspot__deal_tmp"], "source.hubspot.hubspot.deal_stage": ["model.hubspot.stg_hubspot__deal_stage_tmp"], "source.hubspot.hubspot.deal_company": ["model.hubspot.stg_hubspot__deal_company_tmp"], "source.hubspot.hubspot.deal_contact": ["model.hubspot.stg_hubspot__deal_contact_tmp"], "source.hubspot.hubspot.deal_pipeline": ["model.hubspot.stg_hubspot__deal_pipeline_tmp"], "source.hubspot.hubspot.deal_pipeline_stage": ["model.hubspot.stg_hubspot__deal_pipeline_stage_tmp"], "source.hubspot.hubspot.deal_property_history": ["model.hubspot.stg_hubspot__deal_property_history_tmp"], "source.hubspot.hubspot.email_campaign": ["model.hubspot.stg_hubspot__email_campaign_tmp"], "source.hubspot.hubspot.email_event": ["model.hubspot.stg_hubspot__email_event_tmp"], "source.hubspot.hubspot.email_event_bounce": ["model.hubspot.stg_hubspot__email_event_bounce_tmp"], "source.hubspot.hubspot.email_event_click": ["model.hubspot.stg_hubspot__email_event_click_tmp"], "source.hubspot.hubspot.email_event_deferred": ["model.hubspot.stg_hubspot__email_event_deferred_tmp"], "source.hubspot.hubspot.email_event_delivered": ["model.hubspot.stg_hubspot__email_event_delivered_tmp"], "source.hubspot.hubspot.email_event_dropped": ["model.hubspot.stg_hubspot__email_event_dropped_tmp"], "source.hubspot.hubspot.email_event_forward": ["model.hubspot.stg_hubspot__email_event_forward_tmp"], "source.hubspot.hubspot.email_event_open": ["model.hubspot.stg_hubspot__email_event_open_tmp"], "source.hubspot.hubspot.email_event_print": ["model.hubspot.stg_hubspot__email_event_print_tmp"], "source.hubspot.hubspot.email_event_sent": ["model.hubspot.stg_hubspot__email_event_sent_tmp"], "source.hubspot.hubspot.email_event_spam_report": ["model.hubspot.stg_hubspot__email_event_spam_report_tmp"], "source.hubspot.hubspot.email_event_status_change": ["model.hubspot.stg_hubspot__email_event_status_change_tmp"], "source.hubspot.hubspot.email_subscription": [], "source.hubspot.hubspot.email_subscription_change": [], "source.hubspot.hubspot.engagement": ["model.hubspot.stg_hubspot__engagement_tmp"], "source.hubspot.hubspot.engagement_call": ["model.hubspot.stg_hubspot__engagement_call_tmp"], "source.hubspot.hubspot.engagement_communication": ["model.hubspot.stg_hubspot__engagement_communication_tmp"], "source.hubspot.hubspot.engagement_company": ["model.hubspot.stg_hubspot__engagement_company_tmp"], "source.hubspot.hubspot.engagement_contact": ["model.hubspot.stg_hubspot__engagement_contact_tmp"], "source.hubspot.hubspot.engagement_deal": ["model.hubspot.stg_hubspot__engagement_deal_tmp"], "source.hubspot.hubspot.engagement_email": ["model.hubspot.stg_hubspot__engagement_email_tmp"], "source.hubspot.hubspot.engagement_email_cc": [], "source.hubspot.hubspot.engagement_email_to": [], "source.hubspot.hubspot.engagement_meeting": ["model.hubspot.stg_hubspot__engagement_meeting_tmp"], "source.hubspot.hubspot.engagement_note": ["model.hubspot.stg_hubspot__engagement_note_tmp"], "source.hubspot.hubspot.engagement_task": ["model.hubspot.stg_hubspot__engagement_task_tmp"], "source.hubspot.hubspot.form": ["model.hubspot.stg_hubspot__form_tmp"], "source.hubspot.hubspot.submission_response": ["model.hubspot.stg_hubspot__submission_response_tmp"], "source.hubspot.hubspot.owner": ["model.hubspot.stg_hubspot__owner_tmp"], "source.hubspot.hubspot.property": ["model.hubspot.stg_hubspot__property_tmp"], "source.hubspot.hubspot.property_option": ["model.hubspot.stg_hubspot__property_option_tmp"], "source.hubspot.hubspot.ticket_company": ["model.hubspot.stg_hubspot__ticket_company_tmp"], "source.hubspot.hubspot.ticket_contact": ["model.hubspot.stg_hubspot__ticket_contact_tmp"], "source.hubspot.hubspot.ticket_deal": ["model.hubspot.stg_hubspot__ticket_deal_tmp"], "source.hubspot.hubspot.ticket_engagement": ["model.hubspot.stg_hubspot__ticket_engagement_tmp"], "source.hubspot.hubspot.ticket_pipeline_stage": ["model.hubspot.stg_hubspot__ticket_pipeline_stage_tmp"], "source.hubspot.hubspot.ticket_pipeline": ["model.hubspot.stg_hubspot__ticket_pipeline_tmp"], "source.hubspot.hubspot.ticket_property_history": ["model.hubspot.stg_hubspot__ticket_property_history_tmp"], "source.hubspot.hubspot.ticket": ["model.hubspot.stg_hubspot__ticket_tmp"], "source.hubspot.hubspot.merged_deal": ["model.hubspot.stg_hubspot__merged_deal_tmp"], "source.hubspot.hubspot.owner_team": ["model.hubspot.stg_hubspot__owner_team_tmp"], "source.hubspot.hubspot.role": ["model.hubspot.stg_hubspot__role_tmp"], "source.hubspot.hubspot.team": ["model.hubspot.stg_hubspot__team_tmp"], "source.hubspot.hubspot.team_user": ["model.hubspot.stg_hubspot__team_user_tmp"], "source.hubspot.hubspot.users": ["model.hubspot.stg_hubspot__users_tmp"], "source.hubspot.hubspot.conversation_actor": ["model.hubspot.stg_hubspot__conversation_actor_tmp"], "source.hubspot.hubspot.conversation_inbox": ["model.hubspot.stg_hubspot__conversation_inbox_tmp"], "source.hubspot.hubspot.conversation_channel": ["model.hubspot.stg_hubspot__conversation_channel_tmp"], "source.hubspot.hubspot.conversation_channel_account": ["model.hubspot.stg_hubspot__conversation_channel_account_tmp"], "source.hubspot.hubspot.conversation_thread": ["model.hubspot.stg_hubspot__conversation_thread_tmp"], "source.hubspot.hubspot.conversation_message_history": ["model.hubspot.stg_hubspot__conversation_message_history_tmp"], "source.hubspot.hubspot.marketing_event": ["model.hubspot.stg_hubspot__marketing_event_tmp"], "source.hubspot.hubspot.marketing_event_list": ["model.hubspot.stg_hubspot__marketing_event_list_tmp"], "source.hubspot.hubspot.marketing_event_participant": ["model.hubspot.stg_hubspot__marketing_event_participant_tmp"], "source.hubspot.hubspot.marketing_event_custom_property": ["model.hubspot.stg_hubspot__marketing_event_custom_property_tmp"], "source.hubspot.hubspot.conversation_message_recipient": ["model.hubspot.stg_hubspot__conversation_message_recipient_tmp"]}, "group_map": {}, "saved_queries": {}, "semantic_models": {}, "unit_tests": {}, "functions": {}} \ No newline at end of file From edae43f088449db2bbbf9d242d74ad424506ada2 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Tue, 11 Aug 2026 09:37:21 -0500 Subject: [PATCH 10/13] Update Github Actions --- packages.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages.yml b/packages.yml index d445c69..ae48b2e 100644 --- a/packages.yml +++ b/packages.yml @@ -1,6 +1,8 @@ packages: -- package: fivetran/fivetran_utils - version: [">=0.4.0", "<0.5.0"] +# - package: fivetran/fivetran_utils +# version: [">=0.4.0", "<0.5.0"] +- git: https://github.com/fivetran/dbt_fivetran_utils.git + revision: feature/duck-db - package: dbt-labs/spark_utils version: [">=0.3.0", "<0.4.0"] \ No newline at end of file From 37a74d01c8c7e2c3a53db4769341abba85947f8b Mon Sep 17 00:00:00 2001 From: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Tue, 11 Aug 2026 13:54:29 -0500 Subject: [PATCH 11/13] Update test_scenarios.yml --- integration_tests/ci/test_scenarios.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/integration_tests/ci/test_scenarios.yml b/integration_tests/ci/test_scenarios.yml index 73b852e..9ca19d6 100644 --- a/integration_tests/ci/test_scenarios.yml +++ b/integration_tests/ci/test_scenarios.yml @@ -12,7 +12,6 @@ include_databricks_sql: true include_sqlserver: false include_duckdb: true include_dbt_compile: true -include_duckdb: false test_scenarios: - name: "Default" @@ -82,4 +81,4 @@ test_scenarios: hubspot_team_enabled: false hubspot_role_enabled: false include_incremental: false - include_dbt_seed: true \ No newline at end of file + include_dbt_seed: true From 018053ee34c002445e44d9c67b90981a499a9609 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez Date: Tue, 11 Aug 2026 14:55:49 -0400 Subject: [PATCH 12/13] bk --- models/marketing/history/hubspot__daily_contact_history.sql | 2 +- .../intermediate/int_hubspot__contact_calendar_spine.sql | 2 +- .../intermediate/int_hubspot__daily_contact_history.sql | 2 +- .../intermediate/int_hubspot__pivot_daily_contact_history.sql | 2 +- models/sales/history/hubspot__daily_company_history.sql | 2 +- models/sales/history/hubspot__daily_deal_history.sql | 2 +- .../intermediate/int_hubspot__company_calendar_spine.sql | 2 +- .../sales/intermediate/int_hubspot__daily_company_history.sql | 2 +- models/sales/intermediate/int_hubspot__daily_deal_history.sql | 2 +- .../sales/intermediate/int_hubspot__deal_calendar_spine.sql | 2 +- .../intermediate/int_hubspot__pivot_daily_company_history.sql | 2 +- .../intermediate/int_hubspot__pivot_daily_deal_history.sql | 2 +- models/staging/stg_hubspot__submission_response.sql | 4 ++++ 13 files changed, 16 insertions(+), 12 deletions(-) diff --git a/models/marketing/history/hubspot__daily_contact_history.sql b/models/marketing/history/hubspot__daily_contact_history.sql index 1b4d1e7..2affd5a 100644 --- a/models/marketing/history/hubspot__daily_contact_history.sql +++ b/models/marketing/history/hubspot__daily_contact_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='contact_day_id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql b/models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql index d0b6e4e..d2e83d7 100644 --- a/models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql +++ b/models/marketing/intermediate/int_hubspot__contact_calendar_spine.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/marketing/intermediate/int_hubspot__daily_contact_history.sql b/models/marketing/intermediate/int_hubspot__daily_contact_history.sql index fc57c5b..37529bf 100644 --- a/models/marketing/intermediate/int_hubspot__daily_contact_history.sql +++ b/models/marketing/intermediate/int_hubspot__daily_contact_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert', file_format='delta' diff --git a/models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql b/models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql index a0c6734..9709c8d 100644 --- a/models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql +++ b/models/marketing/intermediate/int_hubspot__pivot_daily_contact_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled', 'hubspot_contact_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/sales/history/hubspot__daily_company_history.sql b/models/sales/history/hubspot__daily_company_history.sql index 9b82312..2b7b336 100644 --- a/models/sales/history/hubspot__daily_company_history.sql +++ b/models/sales/history/hubspot__daily_company_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='company_day_id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/sales/history/hubspot__daily_deal_history.sql b/models/sales/history/hubspot__daily_deal_history.sql index a839579..078eb89 100644 --- a/models/sales/history/hubspot__daily_deal_history.sql +++ b/models/sales/history/hubspot__daily_deal_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='deal_day_id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/sales/intermediate/int_hubspot__company_calendar_spine.sql b/models/sales/intermediate/int_hubspot__company_calendar_spine.sql index 7ab2a09..cadd0cc 100644 --- a/models/sales/intermediate/int_hubspot__company_calendar_spine.sql +++ b/models/sales/intermediate/int_hubspot__company_calendar_spine.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/sales/intermediate/int_hubspot__daily_company_history.sql b/models/sales/intermediate/int_hubspot__daily_company_history.sql index 7029619..836dbd0 100644 --- a/models/sales/intermediate/int_hubspot__daily_company_history.sql +++ b/models/sales/intermediate/int_hubspot__daily_company_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert', file_format='delta' diff --git a/models/sales/intermediate/int_hubspot__daily_deal_history.sql b/models/sales/intermediate/int_hubspot__daily_deal_history.sql index f171099..c66b2fd 100644 --- a/models/sales/intermediate/int_hubspot__daily_deal_history.sql +++ b/models/sales/intermediate/int_hubspot__daily_deal_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert', file_format='delta' diff --git a/models/sales/intermediate/int_hubspot__deal_calendar_spine.sql b/models/sales/intermediate/int_hubspot__deal_calendar_spine.sql index e0134ba..dae89cc 100644 --- a/models/sales/intermediate/int_hubspot__deal_calendar_spine.sql +++ b/models/sales/intermediate/int_hubspot__deal_calendar_spine.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql b/models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql index ad18c1f..7b410b8 100644 --- a/models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql +++ b/models/sales/intermediate/int_hubspot__pivot_daily_company_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled', 'hubspot_company_enabled', 'hubspot_company_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql b/models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql index 69a5f38..35a8b9e 100644 --- a/models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql +++ b/models/sales/intermediate/int_hubspot__pivot_daily_deal_history.sql @@ -3,7 +3,7 @@ enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_property_history_enabled']), materialized='incremental' if hubspot.is_incremental_compatible() else 'table', partition_by = {'field': 'date_day', 'data_type': 'date'} - if target.type not in ['spark', 'databricks'] else ['date_day'], + if target.type not in ['spark', 'databricks', 'duckdb'] else ['date_day'], unique_key='id', incremental_strategy = 'insert_overwrite' if target.type not in ('snowflake', 'postgres', 'redshift') else 'delete+insert', file_format = 'delta' diff --git a/models/staging/stg_hubspot__submission_response.sql b/models/staging/stg_hubspot__submission_response.sql index 81e096a..81b1fc9 100644 --- a/models/staging/stg_hubspot__submission_response.sql +++ b/models/staging/stg_hubspot__submission_response.sql @@ -26,7 +26,11 @@ with base as ( field_name, field_value, submitted_at, + {% if target.type == 'duckdb' %} + epoch_ms(submitted_at) as submitted_timestamp, + {% else %} {{ dbt.dateadd(datepart='millisecond',interval='submitted_at', from_date_or_timestamp="cast('1970-01-01' as " ~ dbt.type_timestamp() ~ ")") }} as submitted_timestamp, + {% endif %} page_url, object_type_id, cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced From 63d3b920276b4af47d4e1c90975098548ed9f75e Mon Sep 17 00:00:00 2001 From: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Tue, 11 Aug 2026 14:39:25 -0500 Subject: [PATCH 13/13] Update schema configuration in dbt_project.yml --- integration_tests/dbt_project.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 9b094cd..5ffc1fa 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -8,8 +8,7 @@ models: +persist_docs: relation: true columns: "{{ false if target.type in ('databricks') else true }}" - +schema: "{{ 'hubspot_sqlw_integration_tests' if target.name == 'databricks-sql' else 'hubspot' }}" - # +schema: "hubspot_{{ var('directed_schema','dev') }}" ## To be used for validation testing + +schema: "hubspot_{{ var('directed_schema','dev') }}" vars: # jsons and arrays